A WordPress-centric search engine for devs and theme authors



get_avatar_url ›

Since4.2.0
Deprecatedn/a
get_avatar_url ( $id_or_email, $args = null )
Parameters: (2)
  • (mixed) $id_or_email The Gravatar to retrieve a URL for. Accepts a user_id, gravatar md5 hash, user email, WP_User object, WP_Post object, or WP_Comment object.
    Required: Yes
  • (array) $args { Optional. Arguments to return instead of the default arguments.
    Required: No
    Default: null
Returns:
  • (false|string) The URL of the avatar we found, or false if we couldn't find an avatar.
Defined at:
Codex:

Retrieves the avatar URL.



Source

function get_avatar_url( $id_or_email, $args = null ) {
	$args = get_avatar_data( $id_or_email, $args );
	return $args['url'];
}