filtrod 4.2.0
pre_get_avatar_data
Opis — z kodu źródłowego
Filters whether to retrieve the avatar URL early.
Passing a non-null value in the 'url' member of the return array will effectively short circuit get_avatar_data(), passing the value through the {@see 'get_avatar_data'} filter and returning early.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$args | array | Arguments passed to get_avatar_data(), after processing. |
$id_or_email | mixed | The avatar to retrieve. Accepts a user ID, Gravatar SHA-256 or MD5 hash, user email, WP_User object, WP_Post object, or WP_Comment object. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_get_avatar_data', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_get_avatar_data', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii