filtrdynamicznyod 2.3.0
pre_term_{$field}
Args 2Plik wp-includes/taxonomy.php
Opis — z kodu źródłowego
Filters a term field value before it is sanitized.
The dynamic portion of the hook name, $field, refers to the term field.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$value | mixed | Value of the term field. |
$taxonomy | string | Taxonomy slug. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_term_{$field}', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_term_{$field}', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii