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 'get_avatar_data' filter and returning early.
Parameters
$argsarray
Arguments passed to get_avatar_data(), after processing.
$id_or_emailmixed
The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash, user email, WP_User object, WP_Post object, or WP_Comment object.
4474* @since 4.2.04475*4476* @param array$args Arguments passed to get_avatar_data(), after processing.4477* @param mixed$id_or_email The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash,4478* user email, WP_User object, WP_Post object,or WP_Comment object.4479*/4480$args=apply_filters('pre_get_avatar_data',$args,$id_or_email);44814482if(isset($args['url'])){4483/** This filter is documented in wp-includes/link-template.php */4484returnapply_filters('get_avatar_data',$args,$id_or_email);4485}4486
History
Introduced in 4.2.0. Unchanged from 6.7.7 through 7.1.0.