
什么是Caniuse及如何使用它提升网站
rest_get_avatar_sizes ( No parameters )
rest_get_avatar_sizes: 这个函数用来获取在WordPress注册的头像尺寸。它返回一个头像尺寸名称和它们相应尺寸的数组。
检索头像的像素大小。
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 ) ); }