filtrod 3.1.0
get_the_categories
Opis — z kodu źródłowego
Filters the array of categories to return for a post.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$categories | \WP_Term[] | An array of categories to return for the post. |
$post_id | int | false | The 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
}
// 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