Update WordPress to latest trunk.

parent 40d7cb15
......@@ -263,9 +263,9 @@ function wp_create_image_subsizes( $file, $attachment_id ) {
}
if ( ! is_wp_error( $resized ) ) {
// Append the threshold size to the image file name. It will look like "my-image-2560.jpg".
// Append the threshold size to the image file name. It will look like "my-image-scaled-2560.jpg".
// This doesn't affect the sub-sizes names as they are generated from the original image (for best quality).
$saved = $editor->save( $editor->generate_filename( $threshold ) );
$saved = $editor->save( $editor->generate_filename( 'scaled-' . $threshold ) );
if ( ! is_wp_error( $saved ) ) {
$image_meta = _wp_image_meta_replace_original( $saved, $file, $image_meta, $attachment_id );
......
......@@ -179,7 +179,13 @@ div[data-type="core/button"] div[data-block] {
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit .block-core-columns {
display: flex;
flex-direction: column;
flex: 1 0 auto; }
flex: 1 1 auto; }
@supports ((position: -webkit-sticky) or (position: sticky)) {
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"],
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit,
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit > div[data-block],
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit .block-core-columns {
flex: 1; } }
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] {
padding-right: 0;
padding-left: 0;
......
......@@ -180,7 +180,13 @@ div[data-type="core/button"] div[data-block] {
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit .block-core-columns {
display: flex;
flex-direction: column;
flex: 1 0 auto; }
flex: 1 1 auto; }
@supports ((position: -webkit-sticky) or (position: sticky)) {
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"],
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit,
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit > div[data-block],
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit .block-core-columns {
flex: 1; } }
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] {
padding-left: 0;
padding-right: 0;
......
......@@ -2268,6 +2268,7 @@
}
/* Buttons group in IE 11. */
.media-frame .setting-group .button-group,
.image-details .embed-media-settings .setting .button-group {
width: auto;
}
......
This diff is collapsed.
......@@ -2268,6 +2268,7 @@
}
/* Buttons group in IE 11. */
.media-frame .setting-group .button-group,
.image-details .embed-media-settings .setting .button-group {
width: auto;
}
......
This diff is collapsed.
......@@ -2835,7 +2835,24 @@ function _make_url_clickable_cb( $matches ) {
return $matches[0];
}
return $matches[1] . "<a href=\"$url\" rel=\"nofollow\">$url</a>" . $suffix;
if ( 'comment_text' === current_filter() ) {
$rel = 'nofollow ugc';
} else {
$rel = 'nofollow';
}
/**
* Filters the rel value that is added to URL matches converted to links.
*
* @since 5.3.0
*
* @param string $rel The rel value.
* @param string $url The matched URL being converted to a link tag.
*/
$rel = apply_filters( 'make_clickable_rel', $rel, $url );
$rel = esc_attr( $rel );
return $matches[1] . "<a href=\"$url\" rel=\"$rel\">$url</a>" . $suffix;
}
/**
......@@ -2865,7 +2882,17 @@ function _make_web_ftp_clickable_cb( $matches ) {
return $matches[0];
}
return $matches[1] . "<a href=\"$dest\" rel=\"nofollow\">$dest</a>$ret";
if ( 'comment_text' === current_filter() ) {
$rel = 'nofollow ugc';
} else {
$rel = 'nofollow';
}
/** This filter is documented in wp-includes/formatting.php */
$rel = apply_filters( 'make_clickable_rel', $rel, $dest );
$rel = esc_attr( $rel );
return $matches[1] . "<a href=\"$dest\" rel=\"$rel\">$dest</a>$ret";
}
/**
......@@ -3148,7 +3175,7 @@ function wp_targeted_link_rel_callback( $matches ) {
*
* @since 5.1.0
*
* @param string The rel values.
* @param string $rel The rel values.
* @param string $link_html The matched content of the link tag including all HTML attributes.
*/
$rel = apply_filters( 'wp_targeted_link_rel', 'noopener noreferrer', $link_html );
......
......@@ -540,9 +540,6 @@ function (_Component) {
} else {
var frameConfig = {
title: title,
button: {
text: Object(external_this_wp_i18n_["__"])('Select')
},
multiple: multiple
};
......
This diff is collapsed.
......@@ -752,6 +752,10 @@ function removeQueryArgs(url) {
*/
function prependHTTP(url) {
if (!url) {
return url;
}
url = url.trim();
if (!USABLE_HREF_REGEXP.test(url) && !EMAIL_REGEXP.test(url)) {
......
This diff is collapsed.
......@@ -427,7 +427,7 @@ jQuery( document ).ready( function( $ ) {
});
// Attempt to create image sub-sizes when an image was uploaded successfully
// but the server responded with an HTTP 500 or 502 error.
// but the server responded with an HTTP 5xx error.
tryAgain = function( up, error ) {
var file = error.file;
var times;
......@@ -465,7 +465,7 @@ jQuery( document ).ready( function( $ ) {
}
});
if ( error.message && error.status !== 500 && error.status !== 502 ) {
if ( error.message && ( error.status < 500 || error.status >= 600 ) ) {
wpQueueError( error.message );
} else {
wpQueueError( pluploadL10n.http_error_image );
......@@ -504,8 +504,8 @@ jQuery( document ).ready( function( $ ) {
wpQueueError( message || pluploadL10n.http_error_image );
}
}).fail( function( jqXHR ) {
// If another HTTP 500 error, try try again...
if ( jqXHR.status === 500 || jqXHR.status === 502 ) {
// If another HTTP 5xx error, try try again...
if ( jqXHR.status >= 500 && jqXHR.status < 600 ) {
tryAgain( up, error );
return;
}
......@@ -582,8 +582,8 @@ jQuery( document ).ready( function( $ ) {
var isImage = error.file && error.file.type && error.file.type.indexOf( 'image/' ) === 0;
var status = error && error.status;
// If the file is an image and the error is HTTP 500 or 502 try to create sub-sizes again.
if ( ( status === 500 || status === 502 ) && isImage ) {
// If the file is an image and the error is HTTP 5xx try to create sub-sizes again.
if ( isImage && status >= 500 && status < 600 ) {
tryAgain( up, error );
return;
}
......
This diff is collapsed.
......@@ -109,7 +109,7 @@ window.wp = window.wp || {};
/**
* Attempt to create image sub-sizes when an image was uploaded successfully
* but the server responded with HTTP 500 or 502 error.
* but the server responded with HTTP 5xx error.
*
* @since 5.3.0
*
......@@ -184,8 +184,8 @@ window.wp = window.wp || {};
error( message, data, file, 'no-retry' );
}
}).fail( function( jqXHR ) {
// If another HTTP 500 or 502 error, try try again...
if ( jqXHR.status === 500 || jqXHR.status === 502 ) {
// If another HTTP 5xx error, try try again...
if ( jqXHR.status >= 500 && jqXHR.status < 600 ) {
tryAgain( message, data, file );
return;
}
......@@ -209,8 +209,8 @@ window.wp = window.wp || {};
var isImage = file.type && file.type.indexOf( 'image/' ) === 0;
var status = data && data.status;
// If the file is an image and the error is HTTP 500 or 502 try to create sub-sizes again.
if ( retry !== 'no-retry' && isImage && ( status === 500 || status === 502 ) ) {
// If the file is an image and the error is HTTP 5xx try to create sub-sizes again.
if ( retry !== 'no-retry' && isImage && status >= 500 && status < 600 ) {
tryAgain( message, data, file );
return;
}
......
This diff is collapsed.
......@@ -470,6 +470,9 @@ function do_action( $tag, ...$arg ) {
if ( empty( $arg ) ) {
$arg[] = '';
} elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) {
// Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
$arg[0] = $arg[0][0];
}
$wp_filter[ $tag ]->do_action( $arg );
......
......@@ -430,7 +430,7 @@ abstract class WP_REST_Meta_Fields {
$type = ! empty( $rest_args['schema']['type'] ) ? $rest_args['schema']['type'] : $type;
if ( null === $rest_args['schema']['default'] ) {
$rest_args['schema']['default'] = $this->get_default_for_type( $type );
$rest_args['schema']['default'] = static::get_empty_value_for_type( $type );
}
$rest_args['schema'] = $this->default_additional_properties_to_false( $rest_args['schema'] );
......@@ -501,6 +501,10 @@ abstract class WP_REST_Meta_Fields {
$schema = $args['schema']['items'];
}
if ( '' === $value && in_array( $schema['type'], array( 'boolean', 'integer', 'number' ), true ) ) {
$value = static::get_empty_value_for_type( $schema['type'] );
}
if ( is_wp_error( rest_validate_value_from_schema( $value, $schema ) ) ) {
return null;
}
......@@ -559,14 +563,14 @@ abstract class WP_REST_Meta_Fields {
}
/**
* Gets the default value for a schema type.
* Gets the empty value for a schema type.
*
* @since 5.3.0
*
* @param string $type The schema type.
* @return mixed
*/
protected function get_default_for_type( $type ) {
protected static function get_empty_value_for_type( $type ) {
switch ( $type ) {
case 'string':
return '';
......
......@@ -226,34 +226,34 @@ function wp_default_packages_scripts( &$scripts ) {
$packages_versions = array(
'a11y' => '2.5.1',
'annotations' => '1.7.2',
'api-fetch' => '3.6.2',
'api-fetch' => '3.6.3',
'autop' => '2.5.1',
'blob' => '2.5.1',
'block-editor' => '3.2.2',
'block-library' => '2.9.2',
'block-editor' => '3.2.3',
'block-library' => '2.9.3',
'block-serialization-default-parser' => '3.4.1',
'blocks' => '6.7.2',
'components' => '8.3.2',
'compose' => '3.7.2',
'core-data' => '2.7.2',
'data-controls' => '1.3.2',
'core-data' => '2.7.3',
'data-controls' => '1.3.3',
'data' => '4.9.2',
'date' => '3.5.0',
'deprecated' => '2.6.1',
'dom-ready' => '2.5.1',
'dom' => '2.5.2',
'edit-post' => '3.8.2',
'editor' => '9.7.2',
'edit-post' => '3.8.3',
'editor' => '9.7.3',
'element' => '2.8.2',
'escape-html' => '1.5.1',
'format-library' => '1.9.2',
'format-library' => '1.9.3',
'hooks' => '2.6.0',
'html-entities' => '2.5.0',
'i18n' => '3.6.1',
'is-shallow-equal' => '1.6.1',
'keycodes' => '2.6.2',
'list-reusable-blocks' => '1.8.2',
'media-utils' => '1.2.2',
'list-reusable-blocks' => '1.8.3',
'media-utils' => '1.2.3',
'notices' => '1.8.2',
'nux' => '3.7.2',
'plugins' => '2.7.2',
......@@ -261,9 +261,9 @@ function wp_default_packages_scripts( &$scripts ) {
'redux-routine' => '3.6.2',
'rich-text' => '3.7.2',
'shortcode' => '2.4.1',
'server-side-render' => '1.3.2',
'server-side-render' => '1.3.3',
'token-list' => '1.6.1',
'url' => '2.8.1',
'url' => '2.8.2',
'viewport' => '2.8.2',
'wordcount' => '2.6.2',
);
......
......@@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-RC1-46561';
$wp_version = '5.3-RC1-46568';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment