Make WordPress Core

Opened 16 months ago

Last modified 13 months ago

#45083 new enhancement

use `image_default_size` option in WP_Widget_Media_Image instead of hard-coded value

Reported by: Toro_Unit Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.8
Component: Widgets Keywords: has-patch
Focuses: Cc:
PR Number:


default image size in WP_Widget_Media_Image is 'medium'.

Should be used get_option( 'image_default_size', 'medium' )

Attachments (2)

45083.patch (716 bytes) - added by Toro_Unit 16 months ago.
45083.diff (1.0 KB) - added by welcher 13 months ago.

Download all attachments as: .zip

Change History (3)

16 months ago

#1 @welcher
13 months ago

  • Milestone changed from Awaiting Review to Future Release
  • Summary changed from use `image_default_size` option in WP_Widget_Media_Image to use `image_default_size` option in WP_Widget_Media_Image instead of hard-coded value
  • Type changed from defect (bug) to enhancement

@Toro_Unit thanks for the ticket and the patch!

This looks good to me.

I am wondering if we may want to consider adding a filter the return of the get_option call. This will allow users to change the default value of this widget without affecting the default size of other media throughout the site.

Patch updated.

13 months ago

Note: See TracTickets for help on using tickets.