filtrod 6.1.0
post_class_taxonomies
Opis — z kodu źródłowego
Filters the taxonomies to generate classes for each individual term.
Default is all public taxonomies registered to the post type.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$taxonomies | string[] | List of all taxonomy names to generate classes for. |
$post_id | int | The post ID. |
$classes | string[] | An array of post class names. |
$css_class | string[] | An array of additional class names added to the post. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'post_class_taxonomies', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'post_class_taxonomies', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii