Make WordPress Core

Ticket #45083: 45083.diff

File 45083.diff, 1.0 KB (added by welcher, 6 years ago)
  • src/wp-includes/widgets/class-wp-widget-media-image.php

    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 { 
    6767                                'size'              => array(
    6868                                        'type'        => 'string',
    6969                                        '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' ) ),
    7179                                        'description' => __( 'Size' ),
    7280                                ),
    7381                                'width'             => array( // Via 'customWidth', only when size=custom; otherwise via 'width'.