WP HOOKS
filtrod 6.4.0

pre_get_available_post_mime_types

Args 2Plik wp-includes/post.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the list of available post MIME types for the given post type.

Parametry

ParametrTypOpis
$mime_typesstring[] | nullAn array of MIME types. Default null.
$typestringThe post type name. Usually 'attachment' but can be any post type.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_get_available_post_mime_types', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii