rest_get_avatar_sizes

Advertisement

Summery Summery

Retrieves the pixel sizes for avatars.

Syntax Syntax

rest_get_avatar_sizes()

Return Return

(int[]) List of pixel sizes for avatars. Default [ 24, 48, 96 ].

Source Source

File: wp-includes/rest-api.php

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

	return rest_sanitize_value_from_schema( $value, $args, $param );

Advertisement

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Advertisement

Leave a Reply

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