filtrdynamicznyod 2.3.0
term_{$field}
Args 4Plik wp-includes/taxonomy.php
Opis — z kodu źródłowego
Filters the term field sanitized for display.
The dynamic portion of the hook name, $field, refers to the term field name.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$value | mixed | Value of the term field. |
$term_id | int | Term ID. |
$taxonomy | string | Taxonomy slug. |
$context | string | Context to retrieve the term field value. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'term_{$field}', '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( 'term_{$field}', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii