WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#20663 closed enhancement (duplicate)

add_image_size needs a $label

Reported by: wycks Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.3.2
Component: Media Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

add_image_size() does not have a $label parameter, this effects both localization but more importantly limits the image_size_names_choose filter.

The is when you try to add an image to a post and you can select sizes via the radio buttons.

Default sizes have labels like: 'large' => __('Large')

the image_size_names_choose filter is a great new filter that allows you to alter those radio buttons, but requires you to hardcore the array values for add_image_size() since it does not have a label (unless I'm missing something).

Reference code: https://gist.github.com/2668630

Related: #19990

Change History (5)

#1 @SergeyBiryukov
9 years ago

  • Component changed from General to Media
  • Description modified (diff)

#2 @scribu
9 years ago

  • Type changed from defect (bug) to enhancement

+1 and we should make the default image sizes be registered using add_image_size(), instead of being hardcoded all over the place.

#3 @toscho
9 years ago

  • Cc info@… added

#4 @johnbillion
9 years ago

  • Cc johnbillion added

#5 @SergeyBiryukov
8 years ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #19990.

Note: See TracTickets for help on using tickets.