wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



pre_get_avatar › Les Filtres WordPress

Depuis4.2.0
Dépréciéen/a
apply_filters( 'pre_get_avatar', null, $id_or_email, $args )
Paramètres: (3)
  • (string|null) $avatar HTML for the user's avatar. Default null.
    Requis: Oui
  • (mixed) $id_or_email The avatar to retrieve. Accepts a user ID, Gravatar MD5 hash, user email, WP_User object, WP_Post object, or WP_Comment object.
    Requis: Oui
  • (array) $args Arguments passed to get_avatar_url(), after processing.
    Requis: Oui
Défini(e) dans:
Codex:

Allows the HTML for a user's avatar to be returned early.

Returning a non-null value will effectively short-circuit get_avatar(), passing the value through the {@see 'get_avatar'} filter and returning early.





Source

$avatar = apply_filters( 'pre_get_avatar', null, $id_or_email, $args );