检索头像的像素大小。
原型
rest_get_avatar_sizes()
返回值
(array)
化身的像素大小列表。默认
源文件
路径:wp-includes/rest-api.php
<?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 array $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 ) );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/rest_get_avatar_sizes/