rest_get_avatar_sizes

The timeline below displays how wordpress function rest_get_avatar_sizes has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.4

/**
 * Retrieves the pixel sizes for avatars.
 *
 * @since 4.7.0
 *
 * @return int[] List of pixel sizes for avatars. Default `[ 24, 48, 96 ]`.
 */
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));
}

WordPress Version: 4.8

/**
 * Retrieves the pixel sizes for avatars.
 *
 * @since 4.7.0
 *
 * @return array List of pixel sizes for avatars. Default `[ 24, 48, 96 ]`.
 */
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));
}

WordPress Version: 4.7

/**
 * Retrieves the pixel sizes for avatars.
 *
 * @since 4.7.0
 *
 * @return array List of pixel sizes for avatars. Default `[ 24, 48, 96 ]`.
 */
function rest_get_avatar_sizes()
{
    /**
     * Filter 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));
}