wppaste
WordPress

apply_filters( 'image_size_names_choose', string[] $size_names )

Since
3.3.0
Filters the names and labels of the default image sizes.

Compatibility

WordPress
since 3.3.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$size_namesstring[]
Array of image size labels keyed by their name. Default values include 'Thumbnail', 'Medium', 'Large', and 'Full Size'.

Where this hook fires · 7

  • wp-admin/includes/class-custom-background.php:645Custom_Background::wp_set_background_image()
  • wp-admin/includes/media.php:1200image_size_input_fields()
  • wp-includes/block-editor.php:168get_default_block_editor_settings()
  • wp-includes/media-template.php:913wp_print_media_templates()
  • wp-includes/media-template.php:993wp_print_media_templates()
  • wp-includes/media-template.php:1184wp_print_media_templates()
  • wp-includes/media.php:4599wp_prepare_attachment_for_js()

Source code

	 *	 * @since 3.3.0	 *	 * @param string[] $size_names Array of image size labels keyed by their name. Default values	 *                             include 'Thumbnail', 'Medium', 'Large', and 'Full Size'.	 */	$size_names = apply_filters(		'image_size_names_choose',		array(			'thumbnail' => __( 'Thumbnail' ),			'medium'    => __( 'Medium' ),			'large'     => __( 'Large' ),			'full'      => __( 'Full Size' ),

Changelog

Introduced in 3.3.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.