Make WordPress Core

Ticket #43524: 43524.patch

File 43524.patch, 7.8 KB (added by pierlo, 5 years ago)
  • src/wp-admin/includes/image.php

    diff --git src/wp-admin/includes/image.php src/wp-admin/includes/image.php
    index 9328b1d7d3..eb2c36ce1b 100644
    function wp_create_image_subsizes( $file, $image_meta, $attachment_id ) { 
    205205 * @since 5.3.0
    206206 * @access private
    207207 *
    208  * $padam array  $new_sizes     Array defining what sizes to create.
     208 * @param array  $new_sizes     Array defining what sizes to create.
    209209 * @param string $file          Full path to the image file.
    210210 * @param array  $image_meta    The attachment meta data array.
    211211 * @param int    $attachment_id Attachment Id to process.
    function _wp_make_subsizes( $new_sizes, $file, $image_meta, $attachment_id ) { 
    235235                        'large'        => null,
    236236                        'thumbnail'    => null,
    237237                        'medium_large' => null,
     238                        'extra_large'  => null,
    238239                );
    239240
    240241                $new_sizes = array_filter( array_merge( $priority, $new_sizes ) );
  • src/wp-admin/includes/schema.php

    diff --git src/wp-admin/includes/schema.php src/wp-admin/includes/schema.php
    index 92fd6d6619..394e2405c8 100644
    function populate_options( array $options = array() ) { 
    546546
    547547                // 5.3.0
    548548                'admin_email_lifespan'            => ( time() + 6 * MONTH_IN_SECONDS ),
     549                'extra_large_size_w'              => 2048,
     550                'extra_large_size_h'              => 0,
    549551        );
    550552
    551553        // 3.3
  • src/wp-admin/options.php

    diff --git src/wp-admin/options.php src/wp-admin/options.php
    index 4c3a7ef3a7..3ec40bea32 100644
    $whitelist_options = array( 
    126126                'medium_size_h',
    127127                'large_size_w',
    128128                'large_size_h',
     129                'extra_large_size_w',
     130                'extra_large_size_h',
    129131                'image_default_size',
    130132                'image_default_align',
    131133                'image_default_link_type',
  • src/wp-includes/class-wp-image-editor-gd.php

    diff --git src/wp-includes/class-wp-image-editor-gd.php src/wp-includes/class-wp-image-editor-gd.php
    index daec6b3d04..42d1d79fc3 100644
    class WP_Image_Editor_GD extends WP_Image_Editor { 
    202202         * @since 3.5.0
    203203         *
    204204         * @param array $sizes {
    205          *     An array of image size arrays. Default sizes are 'small', 'medium', 'medium_large', 'large'.
     205         *     An array of image size arrays. Default sizes are 'small', 'medium',
     206         *     'medium_large', 'large', 'extra_large'.
    206207         *
    207208         *     Either a height or width must be provided.
    208209         *     If one of the two is set to null, the resize will
  • src/wp-includes/class-wp-image-editor-imagick.php

    diff --git src/wp-includes/class-wp-image-editor-imagick.php src/wp-includes/class-wp-image-editor-imagick.php
    index 1228ca0575..3ec22922e6 100644
    class WP_Image_Editor_Imagick extends WP_Image_Editor { 
    415415         * @since 3.5.0
    416416         *
    417417         * @param array $sizes {
    418          *     An array of image size arrays. Default sizes are 'thumbnail', 'medium', 'medium_large', 'large'.
     418         *     An array of image size arrays. Default sizes are 'thumbnail', 'medium',
     419         *     'medium_large', 'large', 'extra_large'.
    419420         *
    420421         *     Either a height or width must be provided.
    421422         *     If one of the two is set to null, the resize will
  • src/wp-includes/class-wp-xmlrpc-server.php

    diff --git src/wp-includes/class-wp-xmlrpc-server.php src/wp-includes/class-wp-xmlrpc-server.php
    index 260c6f86dc..b3999bec67 100644
    class wp_xmlrpc_server extends IXR_Server { 
    611611                                'readonly' => false,
    612612                                'option'   => 'large_size_h',
    613613                        ),
     614                        'extra_large_size_w'            => array(
     615                                'desc'     => __( 'Extra large size image width' ),
     616                                'readonly' => false,
     617                                'option'   => 'extra_large_size_w',
     618                        ),
     619                        'extra_large_size_h'            => array(
     620                                'desc'     => __( 'Extra large size image height' ),
     621                                'readonly' => false,
     622                                'option'   => 'extra_large_size_h',
     623                        ),
    614624                        'default_comment_status'  => array(
    615625                                'desc'     => __( 'Allow people to submit comments on new posts.' ),
    616626                                'readonly' => false,
  • src/wp-includes/formatting.php

    diff --git src/wp-includes/formatting.php src/wp-includes/formatting.php
    index 512d17e67b..02d0e2bfdd 100644
    function sanitize_option( $option, $value ) { 
    45064506                case 'medium_large_size_h':
    45074507                case 'large_size_w':
    45084508                case 'large_size_h':
     4509                case 'extra_large_size_w':
     4510                case 'extra_large_size_h':
    45094511                case 'mailserver_port':
    45104512                case 'comment_max_links':
    45114513                case 'page_on_front':
  • src/wp-includes/media.php

    diff --git src/wp-includes/media.php src/wp-includes/media.php
    index 27b1eb8f6e..e22b1cdcc3 100644
    function wp_get_additional_image_sizes() { 
    3333 * The `$size` parameter accepts either an array or a string. The supported string
    3434 * values are 'thumb' or 'thumbnail' for the given thumbnail size or defaults at
    3535 * 128 width and 96 height in pixels. Also supported for the string value is
    36  * 'medium', 'medium_large' and 'full'. The 'full' isn't actually supported, but any value other
    37  * than the supported will result in the content_width size or 500 if that is
    38  * not set.
     36 * 'medium', 'medium_large', 'large', 'extra_large' and 'full'. The 'full' isn't
     37 * actually supported, but any value other than the supported will result in the
     38 * content_width size or 500 if that is not set.
    3939 *
    4040 * Finally, there is a filter named {@see 'editor_max_image_size'}, that will be
    4141 * called on the calculated array for width and height, respectively. The second
    function image_constrain_size_for_editor( $width, $height, $size = 'medium', $co 
    8787                if ( intval( $content_width ) > 0 ) {
    8888                        $max_width = min( intval( $content_width ), $max_width );
    8989                }
    90         } elseif ( $size === 'large' ) {
     90        } elseif ( 'large' === $size || 'extra_large' === $size ) {
    9191                /*
    9292                 * We're inserting a large size image into the editor. If it's a really
    9393                 * big image we'll scale it down to fit reasonably within the editor
    9494                 * itself, and within the theme's content width if it's known. The user
    9595                 * can resize it in the editor if they wish.
    9696                 */
    97                 $max_width  = intval( get_option( 'large_size_w' ) );
    98                 $max_height = intval( get_option( 'large_size_h' ) );
     97                $max_width  = intval( get_option( "{$size}_size_w" ) );
     98                $max_height = intval( get_option( "{$size}_size_h" ) );
    9999
    100100                if ( intval( $content_width ) > 0 ) {
    101101                        $max_width = min( intval( $content_width ), $max_width );
    function image_get_intermediate_size( $post_id, $size = 'thumbnail' ) { 
    806806 * @return array Returns a filtered array of image size strings.
    807807 */
    808808function get_intermediate_image_sizes() {
    809         $default_sizes    = array( 'thumbnail', 'medium', 'medium_large', 'large' );
     809        $default_sizes    = array( 'thumbnail', 'medium', 'medium_large', 'large', 'extra_large' );
    810810        $additional_sizes = wp_get_additional_image_sizes();
    811811
    812812        if ( ! empty( $additional_sizes ) ) {
    function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac 
    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 '2624'.
    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', 2624, $size_array );
    12071207
    12081208        // Array to hold URL candidates.
    12091209        $sources = array();
  • src/wp-includes/version.php

    diff --git src/wp-includes/version.php src/wp-includes/version.php
    index 350c2676d7..5110c574af 100644
    $wp_version = '5.3-alpha-45282-src'; 
    2020 *
    2121 * @global int $wp_db_version
    2222 */
    23 $wp_db_version = 45805;
     23$wp_db_version = 45806;
    2424
    2525/**
    2626 * Holds the TinyMCE version