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.
4486* @since 4.2.04487*4488* @param array$args Arguments passed to get_avatar_data(), after processing.4489* @param mixed$id_or_email The avatar to retrieve. Accepts a user ID, Gravatar SHA-256orMD5 hash,4490* user email, WP_User object, WP_Post object,or WP_Comment object.4491*/4492$args=apply_filters('pre_get_avatar_data',$args,$id_or_email);44934494if(isset($args['url'])){4495/** This filter is documented in wp-includes/link-template.php */4496returnapply_filters('get_avatar_data',$args,$id_or_email);4497}4498
History
Introduced in 4.2.0. Unchanged from 6.7.7 through 7.1.0.