Filter hook 'pre_get_avatar'
in WP Core File wp-includes/pluggable.php at line 2910
Description
Allows the HTML for a user's avatar to be returned early. Returning a non-null value will effectively short-circuit get_avatar(), passing the value through the {@see 'get_avatar'} filter and returning early.
Occurrences
Filename |
Line Number |
wp-includes/pluggable.php |
2910 |
Parameters
Type |
Name |
Description |
string|null |
$avatar |
HTML for the user's avatar. Default null. |
mixed |
$id_or_email |
The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash, user email, WP_User object, WP_Post object, or WP_Comment object. |
array |
$args |
Arguments passed to get_avatar_url(), after processing. |
PHP Doc
/**
* Allows the HTML for a user's avatar to be returned early.
*
* Returning a non-null value will effectively short-circuit get_avatar(), passing
* the value through the {@see 'get_avatar'} filter and returning early.
*
* @since 4.2.0
*
* @param string|null $avatar HTML for the user's avatar. Default null.
* @param mixed $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash,
* user email, WP_User object, WP_Post object, or WP_Comment object.
* @param array $args Arguments passed to get_avatar_url(), after processing.
*/