filtrod 6.4.0
pre_get_available_post_mime_types
Opis — z kodu źródłowego
Filters the list of available post MIME types for the given post type.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$mime_types | string[] | null | An array of MIME types. Default null. |
$type | string | The 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
}
// 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