filtrod 5.5.0
default_category_post_types
Opis — z kodu źródłowego
Filters post types (in addition to 'post') that require a default category.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$post_types | string[] | An array of post type names. Default empty array. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'default_category_post_types', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_filter( 'default_category_post_types', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii