WP HOOKS
filtrod 6.1.0

post_class_taxonomies

Args 4Plik wp-includes/post-template.phpDokumentacja WP ↗

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

ParametrTypOpis
$taxonomiesstring[]List of all taxonomy names to generate classes for.
$post_idintThe post ID.
$classesstring[]An array of post class names.
$css_classstring[]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
}

Popularne w tej kategorii