Core Function
View Source on Trac ↗ rest_get_avatar_urls()
rest_get_avatar_urls( mixed $id_or_email ) Retrieves the avatar URLs in various sizes.
Parameters 1 required
| Name / Type | Description |
|---|---|
| mixed | $id_or_email The avatar 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 |
Return Value
((string)
| false)[] Avatar URLs keyed by size. Each value can be a URL string or boolean false.
Function Information
Since Version
4.7.0
Source File
wp-includes/rest-api.php
Advertisement