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 ) { |
205 | 205 | * @since 5.3.0 |
206 | 206 | * @access private |
207 | 207 | * |
208 | | * $padam array $new_sizes Array defining what sizes to create. |
| 208 | * @param array $new_sizes Array defining what sizes to create. |
209 | 209 | * @param string $file Full path to the image file. |
210 | 210 | * @param array $image_meta The attachment meta data array. |
211 | 211 | * @param int $attachment_id Attachment Id to process. |
… |
… |
function _wp_make_subsizes( $new_sizes, $file, $image_meta, $attachment_id ) { |
235 | 235 | 'large' => null, |
236 | 236 | 'thumbnail' => null, |
237 | 237 | 'medium_large' => null, |
| 238 | 'extra_large' => null, |
238 | 239 | ); |
239 | 240 | |
240 | 241 | $new_sizes = array_filter( array_merge( $priority, $new_sizes ) ); |
diff --git src/wp-admin/includes/schema.php src/wp-admin/includes/schema.php
index 92fd6d6619..394e2405c8 100644
|
|
function populate_options( array $options = array() ) { |
546 | 546 | |
547 | 547 | // 5.3.0 |
548 | 548 | 'admin_email_lifespan' => ( time() + 6 * MONTH_IN_SECONDS ), |
| 549 | 'extra_large_size_w' => 2048, |
| 550 | 'extra_large_size_h' => 0, |
549 | 551 | ); |
550 | 552 | |
551 | 553 | // 3.3 |
diff --git src/wp-admin/options.php src/wp-admin/options.php
index 4c3a7ef3a7..3ec40bea32 100644
|
|
$whitelist_options = array( |
126 | 126 | 'medium_size_h', |
127 | 127 | 'large_size_w', |
128 | 128 | 'large_size_h', |
| 129 | 'extra_large_size_w', |
| 130 | 'extra_large_size_h', |
129 | 131 | 'image_default_size', |
130 | 132 | 'image_default_align', |
131 | 133 | 'image_default_link_type', |
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 { |
202 | 202 | * @since 3.5.0 |
203 | 203 | * |
204 | 204 | * @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'. |
206 | 207 | * |
207 | 208 | * Either a height or width must be provided. |
208 | 209 | * If one of the two is set to null, the resize will |
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 { |
415 | 415 | * @since 3.5.0 |
416 | 416 | * |
417 | 417 | * @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'. |
419 | 420 | * |
420 | 421 | * Either a height or width must be provided. |
421 | 422 | * If one of the two is set to null, the resize will |
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 { |
611 | 611 | 'readonly' => false, |
612 | 612 | 'option' => 'large_size_h', |
613 | 613 | ), |
| 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 | ), |
614 | 624 | 'default_comment_status' => array( |
615 | 625 | 'desc' => __( 'Allow people to submit comments on new posts.' ), |
616 | 626 | 'readonly' => false, |
diff --git src/wp-includes/formatting.php src/wp-includes/formatting.php
index 512d17e67b..02d0e2bfdd 100644
|
|
function sanitize_option( $option, $value ) { |
4506 | 4506 | case 'medium_large_size_h': |
4507 | 4507 | case 'large_size_w': |
4508 | 4508 | case 'large_size_h': |
| 4509 | case 'extra_large_size_w': |
| 4510 | case 'extra_large_size_h': |
4509 | 4511 | case 'mailserver_port': |
4510 | 4512 | case 'comment_max_links': |
4511 | 4513 | case 'page_on_front': |
diff --git src/wp-includes/media.php src/wp-includes/media.php
index 27b1eb8f6e..e22b1cdcc3 100644
|
|
function wp_get_additional_image_sizes() { |
33 | 33 | * The `$size` parameter accepts either an array or a string. The supported string |
34 | 34 | * values are 'thumb' or 'thumbnail' for the given thumbnail size or defaults at |
35 | 35 | * 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. |
39 | 39 | * |
40 | 40 | * Finally, there is a filter named {@see 'editor_max_image_size'}, that will be |
41 | 41 | * called on the calculated array for width and height, respectively. The second |
… |
… |
function image_constrain_size_for_editor( $width, $height, $size = 'medium', $co |
87 | 87 | if ( intval( $content_width ) > 0 ) { |
88 | 88 | $max_width = min( intval( $content_width ), $max_width ); |
89 | 89 | } |
90 | | } elseif ( $size === 'large' ) { |
| 90 | } elseif ( 'large' === $size || 'extra_large' === $size ) { |
91 | 91 | /* |
92 | 92 | * We're inserting a large size image into the editor. If it's a really |
93 | 93 | * big image we'll scale it down to fit reasonably within the editor |
94 | 94 | * itself, and within the theme's content width if it's known. The user |
95 | 95 | * can resize it in the editor if they wish. |
96 | 96 | */ |
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" ) ); |
99 | 99 | |
100 | 100 | if ( intval( $content_width ) > 0 ) { |
101 | 101 | $max_width = min( intval( $content_width ), $max_width ); |
… |
… |
function image_get_intermediate_size( $post_id, $size = 'thumbnail' ) { |
806 | 806 | * @return array Returns a filtered array of image size strings. |
807 | 807 | */ |
808 | 808 | function get_intermediate_image_sizes() { |
809 | | $default_sizes = array( 'thumbnail', 'medium', 'medium_large', 'large' ); |
| 809 | $default_sizes = array( 'thumbnail', 'medium', 'medium_large', 'large', 'extra_large' ); |
810 | 810 | $additional_sizes = wp_get_additional_image_sizes(); |
811 | 811 | |
812 | 812 | if ( ! empty( $additional_sizes ) ) { |
… |
… |
function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac |
1200 | 1200 | * |
1201 | 1201 | * @since 4.4.0 |
1202 | 1202 | * |
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'. |
1204 | 1204 | * @param array $size_array Array of width and height values in pixels (in that order). |
1205 | 1205 | */ |
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 ); |
1207 | 1207 | |
1208 | 1208 | // Array to hold URL candidates. |
1209 | 1209 | $sources = array(); |
diff --git src/wp-includes/version.php src/wp-includes/version.php
index 350c2676d7..5110c574af 100644
|
|
$wp_version = '5.3-alpha-45282-src'; |
20 | 20 | * |
21 | 21 | * @global int $wp_db_version |
22 | 22 | */ |
23 | | $wp_db_version = 45805; |
| 23 | $wp_db_version = 45806; |
24 | 24 | |
25 | 25 | /** |
26 | 26 | * Holds the TinyMCE version |