Make WordPress Core

Ticket #43524: 43524.2.patch

File 43524.2.patch, 1.7 KB (added by azaozz, 4 years ago)
  • src/wp-includes/default-filters.php

     
    521521// Media
    522522add_action( 'wp_playlist_scripts', 'wp_playlist_scripts' );
    523523add_action( 'customize_controls_enqueue_scripts', 'wp_plupload_default_settings' );
     524add_action( 'plugins_loaded', '_wp_add_additional_image_sizes', 0 );
    524525
    525526// Nav menu
    526527add_filter( 'nav_menu_item_id', '_nav_menu_item_id_use_once', 10, 2 );
  • src/wp-includes/media.php

     
    12001200         *
    12011201         * @since 4.4.0
    12021202         *
    1203          * @param int   $max_width  The maximum image width to be included in the 'srcset'. Default '1600'.
     1203         * @param int   $max_width  The maximum image width to be included in the 'srcset'. Default '2560'.
    12041204         * @param array $size_array Array of width and height values in pixels (in that order).
    12051205         */
    1206         $max_srcset_image_width = apply_filters( 'max_srcset_image_width', 1600, $size_array );
     1206        $max_srcset_image_width = apply_filters( 'max_srcset_image_width', 2560, $size_array );
    12071207
    12081208        // Array to hold URL candidates.
    12091209        $sources = array();
     
    43234323                'done' => $done,
    43244324        );
    43254325}
     4326
     4327/**
     4328 * Add additional default image sub-sizes.
     4329 *
     4330 * These sizes are added to `$_wp_additional_image_sizes`.
     4331 *
     4332 * @since 5.3.0
     4333 * @access private
     4334 */
     4335function _wp_add_additional_image_sizes() {
     4336        // 2x medium_large size
     4337        add_image_size( '1536x1536', 1536, 1536 );
     4338        // 2x large size
     4339        add_image_size( '2048x2048', 2048, 2048 );
     4340}