Summery Summery

Filters whether to retrieve the avatar URL early.

Syntax Syntax

apply_filters( 'pre_get_avatar', string|null $avatar, mixed $id_or_email, array $args )

Description Description

Passing a non-null value will effectively short-circuit get_avatar(), passing the value through the ‘get_avatar’ filter and returning early.

Parameters Parameters


(string|null) HTML for the user's avatar. Default null.


(mixed) The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, user email, WP_User object, WP_Post object, or WP_Comment object.


(array) Arguments passed to get_avatar_url(), after processing.

Source Source

File: wp-includes/pluggable.php


Changelog Changelog

Version Description
4.2.0 Introduced.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.