get_avatar_url filter-hook . WP 4.2.0
Filters the avatar URL.
Usage
add_filter( 'get_avatar_url', 'filter_function_name_2975', 10, 3 ); function filter_function_name_2975( $url, $id_or_email, $args ){ // filter... return $url; }
- $url(string)
- The URL of the avatar.
- $id_or_email(mixed)
- The Gravatar to retrieve. Accepts a user ID, Gravatar MD5 hash, user email, WP_User object, WP_Post object, or WP_Comment object.
- $args(array)
- Arguments passed to get_avatar_data(), after processing.
Changelog
Since 4.2.0 | Introduced. |
Where the hook is called
wp-includes/link-template.php 4283
$args['url'] = apply_filters( 'get_avatar_url', $url, $id_or_email, $args );