Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



pre_get_avatar ›

Seit4.2.0
Veraltetn/v
apply_filters( 'pre_get_avatar', null, $id_or_email, $args )
Parameter: (3)
  • (string) $avatar HTML for the user's avatar. Default null.
    Erforderlich: Ja
  • (mixed) $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, user email, WP_User object, WP_Post object, or WP_Comment object.
    Erforderlich: Ja
  • (array) $args Arguments passed to get_avatar_url(), after processing.
    Erforderlich: Ja
Definiert in:
Codex:

Filters whether to retrieve the avatar URL early.

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





Quellcode

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