W3cubDocs

/WordPress

apply_filters( ‘rest_avatar_sizes’, int[] $sizes )

Filters the REST avatar sizes.

Description

Use this filter to adjust the array of sizes returned by the rest_get_avatar_sizes function.

Parameters

$sizesint[]
An array of int values that are the pixel sizes for avatars.
Default [ 24, 48, 96 ].

Source

return apply_filters( 'rest_avatar_sizes', array( 24, 48, 96 ) );

Changelog

Version Description
4.4.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_avatar_sizes