WP HOOKS
filtrod 3.1.0

get_the_categories

Args 2Plik wp-includes/category-template.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the array of categories to return for a post.

Parametry

ParametrTypOpis
$categories\WP_Term[]An array of categories to return for the post.
$post_idint | falseThe post ID.

Wywołanie

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

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

Popularne w tej kategorii