Core Function
View Source on Trac ↗ get_avatar_url()
get_avatar_url( mixed $id_or_email, mixed $args = null ) Retrieves the avatar URL.
Parameters 2 required
| Name / Type | Description |
|---|---|
| mixed | $id_or_email The avatar to retrieve a URL for. Accepts a user ID, Gravatar SHA-256 or MD5 hash, user email, WP_User object, WP_Post object, or WP_Comment object. Required |
| array | $args { Optional. Arguments to use instead of the default arguments. Required |
Return Value
((string)
| false) The URL of the avatar on success, false on failure.
Function Information
Since Version
4.2.0
Source File
wp-includes/link-template.php
Advertisement