diff --git src/wp-includes/widgets/class-wp-widget-media-image.php src/wp-includes/widgets/class-wp-widget-media-image.php
index 00b605420a..d26b34fad0 100644
|
|
class WP_Widget_Media_Image extends WP_Widget_Media { |
67 | 67 | 'size' => array( |
68 | 68 | 'type' => 'string', |
69 | 69 | 'enum' => array_merge( get_intermediate_image_sizes(), array( 'full', 'custom' ) ), |
70 | | 'default' => 'medium', |
| 70 | |
| 71 | /** |
| 72 | * Allow changing the default value without affecting the saved option. |
| 73 | * |
| 74 | * @since 5.1.0 |
| 75 | * |
| 76 | * @param string The value of the image_default_size option. |
| 77 | */ |
| 78 | 'default' => apply_filters( 'widget_media_image_default_size', get_option( 'image_default_size', 'medium' ) ), |
71 | 79 | 'description' => __( 'Size' ), |
72 | 80 | ), |
73 | 81 | 'width' => array( // Via 'customWidth', only when size=custom; otherwise via 'width'. |