A WordPress-centric search engine for devs and theme authors



rest_get_avatar_sizes ›

Since4.7.0
Deprecatedn/a
rest_get_avatar_sizes ( No parameters )
Returns:
  • (array) List of pixel sizes for avatars. Default `[ 24, 48, 96 ]`.
Defined at:
Codex:

Retrieves the pixel sizes for avatars.



Source

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