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 SHA-256 or MD5 hash, user email, WP_User object, WP_Post object, or WP_Comment object.
4471* @since 4.2.04472*4473* @param array$args Arguments passed to get_avatar_data(), after processing.4474* @param mixed$id_or_email The avatar to retrieve. Accepts a user ID, Gravatar SHA-256orMD5 hash,4475* user email, WP_User object, WP_Post object,or WP_Comment object.4476*/4477$args=apply_filters('pre_get_avatar_data',$args,$id_or_email);44784479if(isset($args['url'])){4480/** This filter is documented in wp-includes/link-template.php */4481returnapply_filters('get_avatar_data',$args,$id_or_email);4482}4483
History
Introduced in 4.2.0. Unchanged from 6.7.7 through 7.1.0.