filtrdynamicznyod 2.3.0
get_{$taxonomy}
Args 2Plik wp-includes/taxonomy.php
Opis — z kodu źródłowego
Filters a taxonomy term object.
The dynamic portion of the hook name, $taxonomy, refers to the slug of the term's taxonomy.
Possible hook names include:
get_categoryget_post_tag
Hook dynamiczny — możliwe nazwy
get_categoryget_post_tagParametry
| Parametr | Typ | Opis |
|---|---|---|
$_term | \WP_Term | Term object. |
$taxonomy | string | The taxonomy slug. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_{$taxonomy}', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_{$taxonomy}', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii