Uses
Uses | Description |
---|---|
wp-includes/rest-api.php: rest_avatar_sizes | Filters the REST avatar sizes. |
wp-includes/plugin.php: apply_filters() | Calls the callback functions that have been added to a filter hook. |
Retrieves the pixel sizes for avatars.
(int[]) List of pixel sizes for avatars. Default [ 24, 48, 96 ]
.
File: wp-includes/rest-api.php
function rest_get_avatar_sizes() { /** * Filters the REST avatar sizes. * * Use this filter to adjust the array of sizes returned by the * `rest_get_avatar_sizes` function. * * @since 4.4.0 * * @param int[] $sizes An array of int values that are the pixel sizes for avatars. * Default `[ 24, 48, 96 ]`. */ return apply_filters( 'rest_avatar_sizes', array( 24, 48, 96 ) ); }
Version | Description |
---|---|
4.7.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/rest_get_avatar_sizes