rest_avatar_sizes WordPress Filter Hook
The `rest_avatar_sizes` filter hook allows you to modify the list of avatar sizes that are available to be used in the WordPress REST API. This can be useful if you want to add or remove avatar sizes for your theme or plugin.
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
- $sizes
(int[])An array of int values that are the pixel sizes for avatars. Default
[ 24, 48, 96 ]
.
Source
File: wp-includes/rest-api.php
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |