Summery Summery

Retrieves the avatar urls in various sizes.

Syntax Syntax

rest_get_avatar_urls( mixed $id_or_email )

Parameters Parameters


(mixed) (Required) 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.

Return Return

(array) Avatar URLs keyed by size. Each value can be a URL string or boolean false.

Source Source

File: wp-includes/rest-api.php

 * @param WP_REST_Request $request
 * @param string          $param
 * @return true|WP_Error
function rest_validate_request_arg( $value, $request, $param ) {
	$attributes = $request->get_attributes();
	if ( ! isset( $attributes['args'][ $param ] ) || ! is_array( $attributes['args'][ $param ] ) ) {
		return true;
	$args = $attributes['args'][ $param ];


Changelog Changelog

Version Description
4.7.0 Introduced.

See also See also


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.