rest_get_avatar_sizes(): int[]

Retrieves the pixel sizes for avatars.


Return

int[] List of pixel sizes for avatars. Default [ 24, 48, 96 ].


Top ↑

Source

File: wp-includes/rest-api.php. View all references

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 ) );
}

Top ↑

Hooks



Top ↑

Changelog

Changelog
Version Description
4.7.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.