filtrdynamicznyod 2.8.0
the_author_{$field}
Args 2Plik wp-includes/author-template.php
Opis — z kodu źródłowego
Filters the value of the requested user metadata.
The filter name is dynamic and depends on the $field parameter of the function.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$author_meta | string | The value of the metadata. |
$user_id | int | false | The user ID. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'the_author_{$field}', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'the_author_{$field}', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii