filtrdynamicznyod 2.3.0
{$taxonomy}_{$field}
Args 3Plik wp-includes/taxonomy.php
Opis — z kodu źródłowego
Filters the taxonomy field sanitized for display.
The dynamic portions of the filter name, $taxonomy, and $field, refer to the taxonomy slug and taxonomy field, respectively.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$value | mixed | Value of the taxonomy field. |
$term_id | int | Term ID. |
$context | string | Context to retrieve the taxonomy field value. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( '{$taxonomy}_{$field}', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( '{$taxonomy}_{$field}', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii