filtrdynamicznyod 2.8.0
get_the_author_{$field}
Args 3Plik 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 |
|---|---|---|
$value | string | The value of the metadata. |
$user_id | int | The user ID for the value. |
$original_user_id | int | false | The original user ID, as passed to the function. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_the_author_{$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( 'get_the_author_{$field}', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii