Browse Source

Update to WordPress 5.4.1. For more information, see https://wordpress.org/news/2020/04/wordpress-5-4-1/

pull/240/head 5.4.1
Pantheon Automation 10 months ago
parent
commit
bdfa6f25c8
56 changed files with 311 additions and 135 deletions
  1. +33
    -0
      wp-admin/about.php
  2. +2
    -1
      wp-admin/css/about-rtl.css
  3. +1
    -1
      wp-admin/css/about-rtl.min.css
  4. +2
    -1
      wp-admin/css/about.css
  5. +1
    -1
      wp-admin/css/about.min.css
  6. +17
    -6
      wp-admin/css/edit-rtl.css
  7. +1
    -1
      wp-admin/css/edit-rtl.min.css
  8. +17
    -6
      wp-admin/css/edit.css
  9. +1
    -1
      wp-admin/css/edit.min.css
  10. +4
    -4
      wp-admin/freedoms.php
  11. BIN
      wp-admin/images/w-logo-blue.png
  12. +0
    -15
      wp-admin/includes/deprecated.php
  13. +1
    -1
      wp-includes/assets/script-loader-packages.php
  14. +1
    -1
      wp-includes/blocks/rss.php
  15. +1
    -1
      wp-includes/blocks/search.php
  16. +50
    -23
      wp-includes/class-wp-customize-manager.php
  17. +1
    -1
      wp-includes/class-wp-object-cache.php
  18. +0
    -4
      wp-includes/class-wp-query.php
  19. +4
    -0
      wp-includes/css/dist/block-directory/style-rtl.css
  20. +4
    -0
      wp-includes/css/dist/block-directory/style.css
  21. +4
    -0
      wp-includes/css/dist/block-editor/style-rtl.css
  22. +4
    -0
      wp-includes/css/dist/block-editor/style.css
  23. +4
    -0
      wp-includes/css/dist/block-library/editor-rtl.css
  24. +4
    -0
      wp-includes/css/dist/block-library/editor.css
  25. +10
    -1
      wp-includes/css/dist/block-library/style-rtl.css
  26. +1
    -1
      wp-includes/css/dist/block-library/style-rtl.min.css
  27. +10
    -1
      wp-includes/css/dist/block-library/style.css
  28. +1
    -1
      wp-includes/css/dist/block-library/style.min.css
  29. +4
    -0
      wp-includes/css/dist/block-library/theme-rtl.css
  30. +4
    -0
      wp-includes/css/dist/block-library/theme.css
  31. +4
    -0
      wp-includes/css/dist/edit-post/style-rtl.css
  32. +4
    -0
      wp-includes/css/dist/edit-post/style.css
  33. +4
    -0
      wp-includes/css/dist/editor/editor-styles-rtl.css
  34. +4
    -0
      wp-includes/css/dist/editor/editor-styles.css
  35. +4
    -0
      wp-includes/css/dist/editor/style-rtl.css
  36. +4
    -0
      wp-includes/css/dist/editor/style.css
  37. +4
    -0
      wp-includes/css/dist/format-library/style-rtl.css
  38. +4
    -0
      wp-includes/css/dist/format-library/style.css
  39. +0
    -5
      wp-includes/css/media-views-rtl.css
  40. +1
    -1
      wp-includes/css/media-views-rtl.min.css
  41. +0
    -5
      wp-includes/css/media-views.css
  42. +1
    -1
      wp-includes/css/media-views.min.css
  43. +15
    -0
      wp-includes/deprecated.php
  44. +18
    -1
      wp-includes/formatting.php
  45. +10
    -14
      wp-includes/js/dist/block-editor.js
  46. +2
    -2
      wp-includes/js/dist/block-editor.min.js
  47. +2
    -2
      wp-includes/js/dist/block-library.js
  48. +1
    -1
      wp-includes/js/dist/block-library.min.js
  49. +15
    -6
      wp-includes/post.php
  50. +1
    -1
      wp-includes/rest-api/endpoints/class-wp-rest-controller.php
  51. +11
    -11
      wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php
  52. +6
    -4
      wp-includes/taxonomy.php
  53. +1
    -1
      wp-includes/user.php
  54. +1
    -1
      wp-includes/version.php
  55. +1
    -1
      wp-mail.php
  56. +6
    -6
      wp-settings.php

+ 33
- 0
wp-admin/about.php View File

@ -40,6 +40,39 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
</nav>
</div>
<div class="about__section changelog">
<div class="column">
<h2><?php _e( 'Maintenance and Security Releases' ); ?></h2>
<p>
<?php
printf(
/* translators: 1: WordPress version number, 2: plural number of bugs. More than one security issue. */
_n(
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.',
11
),
'5.4.1',
number_format_i18n( 11 )
);
?>
<?php
printf(
/* translators: %s: HelpHub URL */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version */
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
sanitize_title( '5.4.1' )
)
);
?>
</p>
</div>
</div>
<hr />
<div class="about__section is-feature has-accent-background-color">
<h1><?php _e( 'Say hello to more and better.' ); ?></h1>

+ 2
- 1
wp-admin/css/about-rtl.css View File

@ -318,7 +318,8 @@
line-height: 1.4;
}
.about__container h3 {
.about__container h3,
.about__container h2.is-smaller-heading {
margin-top: 0;
font-size: 1em;
}

+ 1
- 1
wp-admin/css/about-rtl.min.css
File diff suppressed because it is too large
View File


+ 2
- 1
wp-admin/css/about.css View File

@ -317,7 +317,8 @@
line-height: 1.4;
}
.about__container h3 {
.about__container h3,
.about__container h2.is-smaller-heading {
margin-top: 0;
font-size: 1em;
}

+ 1
- 1
wp-admin/css/about.min.css
File diff suppressed because it is too large
View File


+ 17
- 6
wp-admin/css/edit-rtl.css View File

@ -449,7 +449,7 @@ form#tags-filter {
#post-body #visibility:before,
.curtime #timestamp:before,
#post-body .misc-pub-revisions:before,
#post-body .misc-pub-response-to:before,
#post-body .misc-pub-response-to:before,
#post-body .misc-pub-comment-status:before {
color: #82878c;
}
@ -458,7 +458,7 @@ form#tags-filter {
#post-body #visibility:before,
.curtime #timestamp:before,
#post-body .misc-pub-revisions:before,
#post-body .misc-pub-response-to:before,
#post-body .misc-pub-response-to:before,
#post-body .misc-pub-comment-status:before {
font: normal 20px/1 dashicons;
speak: none;
@ -470,7 +470,7 @@ form#tags-filter {
-moz-osx-font-smoothing: grayscale;
}
#post-body .misc-pub-post-status:before,
#post-body .misc-pub-post-status:before,
#post-body .misc-pub-comment-status:before {
content: "\f173";
}
@ -757,21 +757,32 @@ form#tags-filter {
margin-bottom: 1em;
}
.policy-text p:not(.privacy-policy-tutorial):not(.wp-policy-help) {
.policy-text > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help),
.policy-text div > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help) {
background-color: #fff;
margin: 0;
padding: 1em;
}
.policy-text p:not(.privacy-policy-tutorial):not(.wp-policy-help) + p:not(.privacy-policy-tutorial):not(.wp-policy-help) {
.policy-text > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help) + *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help),
.policy-text div > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help) + *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help) {
padding-top: 0;
}
.hide-privacy-policy-tutorial p:not(.privacy-policy-tutorial):not(.wp-policy-help) {
.hide-privacy-policy-tutorial > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help) {
margin: 1em 0;
padding: 0;
}
.policy-text ul li,
.policy-text ol li {
margin-right: 2em;
}
.policy-text ul {
list-style: disc;
}
strong.wp-policy-help, /* For back-compat, see #49282 */
strong.privacy-policy-tutorial {
display: block;

+ 1
- 1
wp-admin/css/edit-rtl.min.css
File diff suppressed because it is too large
View File


+ 17
- 6
wp-admin/css/edit.css View File

@ -448,7 +448,7 @@ form#tags-filter {
#post-body #visibility:before,
.curtime #timestamp:before,
#post-body .misc-pub-revisions:before,
#post-body .misc-pub-response-to:before,
#post-body .misc-pub-response-to:before,
#post-body .misc-pub-comment-status:before {
color: #82878c;
}
@ -457,7 +457,7 @@ form#tags-filter {
#post-body #visibility:before,
.curtime #timestamp:before,
#post-body .misc-pub-revisions:before,
#post-body .misc-pub-response-to:before,
#post-body .misc-pub-response-to:before,
#post-body .misc-pub-comment-status:before {
font: normal 20px/1 dashicons;
speak: none;
@ -469,7 +469,7 @@ form#tags-filter {
-moz-osx-font-smoothing: grayscale;
}
#post-body .misc-pub-post-status:before,
#post-body .misc-pub-post-status:before,
#post-body .misc-pub-comment-status:before {
content: "\f173";
}
@ -756,21 +756,32 @@ form#tags-filter {
margin-bottom: 1em;
}
.policy-text p:not(.privacy-policy-tutorial):not(.wp-policy-help) {
.policy-text > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help),
.policy-text div > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help) {
background-color: #fff;
margin: 0;
padding: 1em;
}
.policy-text p:not(.privacy-policy-tutorial):not(.wp-policy-help) + p:not(.privacy-policy-tutorial):not(.wp-policy-help) {
.policy-text > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help) + *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help),
.policy-text div > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help) + *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help) {
padding-top: 0;
}
.hide-privacy-policy-tutorial p:not(.privacy-policy-tutorial):not(.wp-policy-help) {
.hide-privacy-policy-tutorial > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(div):not(.privacy-policy-tutorial):not(.wp-policy-help) {
margin: 1em 0;
padding: 0;
}
.policy-text ul li,
.policy-text ol li {
margin-left: 2em;
}
.policy-text ul {
list-style: disc;
}
strong.wp-policy-help, /* For back-compat, see #49282 */
strong.privacy-policy-tutorial {
display: block;

+ 1
- 1
wp-admin/css/edit.min.css
File diff suppressed because it is too large
View File


+ 4
- 4
wp-admin/freedoms.php View File

@ -64,22 +64,22 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<div class="about__section has-4-columns">
<div class="column">
<div class="freedoms-image"></div>
<h3><?php _e( 'The 1st Freedom' ); ?></h3>
<h2 class="is-smaller-heading"><?php _e( 'The 1st Freedom' ); ?></h2>
<p><?php _e( 'To run the program for any purpose.' ); ?></p>
</div>
<div class="column">
<div class="freedoms-image"></div>
<h3><?php _e( 'The 2nd Freedom' ); ?></h3>
<h2 class="is-smaller-heading"><?php _e( 'The 2nd Freedom' ); ?></h2>
<p><?php _e( 'To study how the program works and change it to make it do what you wish.' ); ?></p>
</div>
<div class="column">
<div class="freedoms-image"></div>
<h3><?php _e( 'The 3rd Freedom' ); ?></h3>
<h2 class="is-smaller-heading"><?php _e( 'The 3rd Freedom' ); ?></h2>
<p><?php _e( 'To redistribute.' ); ?></p>
</div>
<div class="column">
<div class="freedoms-image"></div>
<h3><?php _e( 'The 4th Freedom' ); ?></h3>
<h2 class="is-smaller-heading"><?php _e( 'The 4th Freedom' ); ?></h2>
<p><?php _e( 'To distribute copies of your modified versions to others.' ); ?></p>
</div>
</div>

BIN
wp-admin/images/w-logo-blue.png View File

Before After
Width: 80  |  Height: 80  |  Size: 3.0 KiB Width: 80  |  Height: 80  |  Size: 4.0 KiB

+ 0
- 15
wp-admin/includes/deprecated.php View File

@ -1563,19 +1563,4 @@ class WP_Privacy_Data_Removal_Requests_Table extends WP_Privacy_Data_Removal_Req
*/
function _wp_privacy_requests_screen_options() {
_deprecated_function( __FUNCTION__, '5.3.0' );
}
/**
* Return the user request object for the specified request ID.
*
* @since 4.9.6
* @deprecated 5.4.0 Use wp_get_user_request()
* @see wp_get_user_request()
*
* @param int $request_id The ID of the user request.
* @return WP_User_Request|false
*/
function wp_get_user_request_data( $request_id ) {
_deprecated_function( __FUNCTION__, '5.4.0', 'wp_get_user_request()' );
return wp_get_user_request( $request_id );
}

+ 1
- 1
wp-includes/assets/script-loader-packages.php
File diff suppressed because it is too large
View File


+ 1
- 1
wp-includes/blocks/rss.php View File

@ -92,7 +92,7 @@ function render_block_core_rss( $attributes ) {
$class .= ' ' . $attributes['className'];
}
return "<ul class='{$class}'>{$list_items}</ul>";
return sprintf( "<ul class='%s'>%s</ul>", esc_attr( $class ), $list_items );
}
/**

+ 1
- 1
wp-includes/blocks/search.php View File

@ -57,7 +57,7 @@ function render_block_core_search( $attributes ) {
return sprintf(
'<form class="%s" role="search" method="get" action="%s">%s</form>',
$class,
esc_attr( $class ),
esc_url( home_url( '/' ) ),
$label_markup . $input_markup . $button_markup
);

+ 50
- 23
wp-includes/class-wp-customize-manager.php View File

@ -2923,22 +2923,11 @@ final class WP_Customize_Manager {
add_filter( 'wp_save_post_revision_post_has_changed', array( $this, '_filter_revision_post_has_changed' ), 5, 3 );
/*
* Update the changeset post. The publish_customize_changeset action
* will cause the settings in the changeset to be saved via
* WP_Customize_Setting::save().
* Update the changeset post. The publish_customize_changeset action will cause the settings in the
* changeset to be saved via WP_Customize_Setting::save(). Updating a post with publish status will
* trigger WP_Customize_Manager::publish_changeset_values().
*/
// Prevent content filters from corrupting JSON in post_content.
$has_kses = ( false !== has_filter( 'content_save_pre', 'wp_filter_post_kses' ) );
if ( $has_kses ) {
kses_remove_filters();
}
$has_targeted_link_rel_filters = ( false !== has_filter( 'content_save_pre', 'wp_targeted_link_rel' ) );
if ( $has_targeted_link_rel_filters ) {
wp_remove_targeted_link_rel_filters();
}
// Note that updating a post with publish status will trigger WP_Customize_Manager::publish_changeset_values().
add_filter( 'wp_insert_post_data', array( $this, 'preserve_insert_changeset_post_content' ), 5, 3 );
if ( $changeset_post_id ) {
if ( $args['autosave'] && 'auto-draft' !== get_post_status( $changeset_post_id ) ) {
// See _wp_translate_postdata() for why this is required as it will use the edit_post meta capability.
@ -2969,14 +2958,7 @@ final class WP_Customize_Manager {
$this->_changeset_post_id = $r; // Update cached post ID for the loaded changeset.
}
}
// Restore removed content filters.
if ( $has_kses ) {
kses_init_filters();
}
if ( $has_targeted_link_rel_filters ) {
wp_init_targeted_link_rel_filters();
}
remove_filter( 'wp_insert_post_data', array( $this, 'preserve_insert_changeset_post_content' ), 5 );
$this->_changeset_data = null; // Reset so WP_Customize_Manager::changeset_data() will re-populate with updated contents.
@ -2994,6 +2976,51 @@ final class WP_Customize_Manager {
return $response;
}
/**
* Preserve the initial JSON post_content passed to save into the post.
*
* This is needed to prevent KSES and other {@see 'content_save_pre'} filters
* from corrupting JSON data.
*
* Note that WP_Customize_Manager::validate_setting_values() have already
* run on the setting values being serialized as JSON into the post content
* so it is pre-sanitized.
*
* Also, the sanitization logic is re-run through the respective
* WP_Customize_Setting::sanitize() method when being read out of the
* changeset, via WP_Customize_Manager::post_value(), and this sanitized
* value will also be sent into WP_Customize_Setting::update() for
* persisting to the DB.
*
* Multiple users can collaborate on a single changeset, where one user may
* have the unfiltered_html capability but another may not. A user with
* unfiltered_html may add a script tag to some field which needs to be kept
* intact even when another user updates the changeset to modify another field
* when they do not have unfiltered_html.
*
* @since 5.4.1
*
* @param array $data An array of slashed and processed post data.
* @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data.
* @param array $unsanitized_postarr An array of slashed yet *unsanitized* and unprocessed post data as originally passed to wp_insert_post().
* @return array Filtered post data.
*/
public function preserve_insert_changeset_post_content( $data, $postarr, $unsanitized_postarr ) {
if (
isset( $data['post_type'] ) &&
isset( $unsanitized_postarr['post_content'] ) &&
'customize_changeset' === $data['post_type'] ||
(
'revision' === $data['post_type'] &&
! empty( $data['post_parent'] ) &&
'customize_changeset' === get_post_type( $data['post_parent'] )
)
) {
$data['post_content'] = $unsanitized_postarr['post_content'];
}
return $data;
}
/**
* Trash or delete a changeset post.
*

+ 1
- 1
wp-includes/class-wp-object-cache.php View File

@ -441,7 +441,7 @@ class WP_Object_Cache {
echo '</p>';
echo '<ul>';
foreach ( $this->cache as $group => $cache ) {
echo "<li><strong>Group:</strong> $group - ( " . number_format( strlen( serialize( $cache ) ) / KB_IN_BYTES, 2 ) . 'k )</li>';
echo '<li><strong>Group:</strong> ' . esc_html( $group ) . ' - ( ' . number_format( strlen( serialize( $cache ) ) / KB_IN_BYTES, 2 ) . 'k )</li>';
}
echo '</ul>';
}

+ 0
- 4
wp-includes/class-wp-query.php View File

@ -811,10 +811,6 @@ class WP_Query {
$this->is_single = true;
} elseif ( $qv['p'] ) {
$this->is_single = true;
} elseif ( ( '' !== $qv['hour'] ) && ( '' !== $qv['minute'] ) && ( '' !== $qv['second'] ) && ( '' != $qv['year'] ) && ( '' != $qv['monthnum'] ) && ( '' != $qv['day'] ) ) {
// If year, month, day, hour, minute, and second are set,
// a single post is being queried.
$this->is_single = true;
} elseif ( '' != $qv['pagename'] || ! empty( $qv['page_id'] ) ) {
$this->is_page = true;
$this->is_single = false;

+ 4
- 0
wp-includes/css/dist/block-directory/style-rtl.css View File

@ -10,6 +10,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/

+ 4
- 0
wp-includes/css/dist/block-directory/style.css View File

@ -10,6 +10,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/

+ 4
- 0
wp-includes/css/dist/block-editor/style-rtl.css View File

@ -10,6 +10,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/

+ 4
- 0
wp-includes/css/dist/block-editor/style.css View File

@ -10,6 +10,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/

+ 4
- 0
wp-includes/css/dist/block-library/editor-rtl.css View File

@ -10,6 +10,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/

+ 4
- 0
wp-includes/css/dist/block-library/editor.css View File

@ -10,6 +10,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/

+ 10
- 1
wp-includes/css/dist/block-library/style-rtl.css View File

@ -10,6 +10,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/
@ -87,7 +91,12 @@
.wp-block-buttons .wp-block-button {
display: inline-block;
margin: 4px; }
margin-left: 8px;
margin-bottom: 8px; }
.wp-block-buttons.alignright .wp-block-button {
margin-left: none;
margin-right: 8px; }
.wp-block-buttons.aligncenter {
text-align: center; }

+ 1
- 1
wp-includes/css/dist/block-library/style-rtl.min.css
File diff suppressed because it is too large
View File


+ 10
- 1
wp-includes/css/dist/block-library/style.css View File

@ -10,6 +10,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/
@ -88,7 +92,12 @@
.wp-block-buttons .wp-block-button {
display: inline-block;
margin: 4px; }
margin-right: 8px;
margin-bottom: 8px; }
.wp-block-buttons.alignright .wp-block-button {
margin-right: none;
margin-left: 8px; }
.wp-block-buttons.aligncenter {
text-align: center; }

+ 1
- 1
wp-includes/css/dist/block-library/style.min.css
File diff suppressed because it is too large
View File


+ 4
- 0
wp-includes/css/dist/block-library/theme-rtl.css View File

@ -10,6 +10,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/

+ 4
- 0
wp-includes/css/dist/block-library/theme.css View File

@ -10,6 +10,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/

+ 4
- 0
wp-includes/css/dist/edit-post/style-rtl.css View File

@ -10,6 +10,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/

+ 4
- 0
wp-includes/css/dist/edit-post/style.css View File

@ -10,6 +10,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/

+ 4
- 0
wp-includes/css/dist/editor/editor-styles-rtl.css View File

@ -10,6 +10,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/

+ 4
- 0
wp-includes/css/dist/editor/editor-styles.css View File

@ -10,6 +10,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/

+ 4
- 0
wp-includes/css/dist/editor/style-rtl.css View File

@ -11,6 +11,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/

+ 4
- 0
wp-includes/css/dist/editor/style.css View File

@ -11,6 +11,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/

+ 4
- 0
wp-includes/css/dist/format-library/style-rtl.css View File

@ -10,6 +10,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/

+ 4
- 0
wp-includes/css/dist/format-library/style.css View File

@ -10,6 +10,10 @@
/**
* Often re-used variables
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Breakpoint mixins
*/

+ 0
- 5
wp-includes/css/media-views-rtl.css View File

@ -1527,11 +1527,6 @@
display: inline-block !important;
}
div.moxie-shim.moxie-shim-html5,
div.moxie-shim.moxie-shim-html5 input[type="file"] {
display: none;
}
/**
* Selection
*/

+ 1
- 1
wp-includes/css/media-views-rtl.min.css
File diff suppressed because it is too large
View File


+ 0
- 5
wp-includes/css/media-views.css View File

@ -1526,11 +1526,6 @@
display: inline-block !important;
}
div.moxie-shim.moxie-shim-html5,
div.moxie-shim.moxie-shim-html5 input[type="file"] {
display: none;
}
/**
* Selection
*/

+ 1
- 1
wp-includes/css/media-views.min.css
File diff suppressed because it is too large
View File


+ 15
- 0
wp-includes/deprecated.php View File

@ -3950,3 +3950,18 @@ function wp_ajax_press_this_add_category() {
wp_send_json_error( array( 'errorMessage' => __( 'The Press This plugin is required.' ) ) );
}
}
/**
* Return the user request object for the specified request ID.
*
* @since 4.9.6
* @deprecated 5.4.0 Use wp_get_user_request()
* @see wp_get_user_request()
*
* @param int $request_id The ID of the user request.
* @return WP_User_Request|false
*/
function wp_get_user_request_data( $request_id ) {
_deprecated_function( __FUNCTION__, '5.4.0', 'wp_get_user_request()' );
return wp_get_user_request( $request_id );
}

+ 18
- 1
wp-includes/formatting.php View File

@ -2005,6 +2005,24 @@ function remove_accents( $string ) {
function sanitize_file_name( $filename ) {
$filename_raw = $filename;
$special_chars = array( '?', '[', ']', '/', '\\', '=', '<', '>', ':', ';', ',', "'", '"', '&', '$', '#', '*', '(', ')', '|', '~', '`', '!', '{', '}', '%', '+', chr( 0 ) );
// Check for support for utf8 in the installed PCRE library once and store the result in a static.
static $utf8_pcre = null;
if ( ! isset( $utf8_pcre ) ) {
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
$utf8_pcre = @preg_match( '/^./u', 'a' );
}
if ( ! seems_utf8( $filename ) ) {
$_ext = pathinfo( $filename, PATHINFO_EXTENSION );
$_name = pathinfo( $filename, PATHINFO_FILENAME );
$filename = sanitize_title_with_dashes( $_name ) . '.' . $_ext;
}
if ( $utf8_pcre ) {
$filename = preg_replace( "#\x{00a0}#siu", ' ', $filename );
}
/**
* Filters the list of characters to remove from a filename.
*
@ -2014,7 +2032,6 @@ function sanitize_file_name( $filename ) {
* @param string $filename_raw The original filename to be sanitized.
*/
$special_chars = apply_filters( 'sanitize_file_name_chars', $special_chars, $filename_raw );
$filename = preg_replace( "#\x{00a0}#siu", ' ', $filename );
$filename = str_replace( $special_chars, '', $filename );
$filename = str_replace( array( '%20', '+' ), '-', $filename );
$filename = preg_replace( '/[\r\n\t -]+/', '-', $filename );

+ 10
- 14
wp-includes/js/dist/block-editor.js View File

@ -14577,7 +14577,7 @@ function useMultiSelection(ref) {
startContainer = _selection$getRangeAt.startContainer,
endContainer = _selection$getRangeAt.endContainer;
if (!blockNode.contains(startContainer) || !blockNode.contains(endContainer)) {
if (!!blockNode && (!blockNode.contains(startContainer) || !blockNode.contains(endContainer))) {
_selection.removeAllRanges();
}
}
@ -14683,15 +14683,6 @@ function useMultiSelection(ref) {
startClientId.current = clientId;
anchorElement.current = document.activeElement;
if (anchorElement.current) {
var blockInspector = document.querySelector('.block-editor-block-inspector');
if (blockInspector && blockInspector.contains(anchorElement.current)) {
return;
}
}
startMultiSelect(); // `onSelectionStart` is called after `mousedown` and `mouseleave`
// (from a block). The selection ends when `mouseup` happens anywhere
// in the window.
@ -25355,20 +25346,23 @@ function MultiSelectScrollIntoView() {
var selector = function selector(select) {
var _select = select('core/block-editor'),
getBlockSelectionEnd = _select.getBlockSelectionEnd,
hasMultiSelection = _select.hasMultiSelection,
isMultiSelecting = _select.isMultiSelecting;
return {
selectionEnd: getBlockSelectionEnd(),
isMultiSelection: hasMultiSelection(),
isMultiSelecting: isMultiSelecting()
};
};
var _useSelect = Object(external_this_wp_data_["useSelect"])(selector, []),
isMultiSelection = _useSelect.isMultiSelection,
selectionEnd = _useSelect.selectionEnd,
isMultiSelecting = _useSelect.isMultiSelecting;
Object(external_this_wp_element_["useEffect"])(function () {
if (!selectionEnd || isMultiSelecting) {
if (!selectionEnd || isMultiSelecting || !isMultiSelection) {
return;
}
@ -25388,7 +25382,7 @@ function MultiSelectScrollIntoView() {
lib_default()(extentNode, scrollContainer, {
onlyScrollIfNeeded: true
});
}, [selectionEnd, isMultiSelecting]);
}, [isMultiSelection, selectionEnd, isMultiSelecting]);
return null;
}
@ -25434,6 +25428,7 @@ function isKeyDownEligibleForStartTyping(event) {
function ObserveTyping(_ref) {
var children = _ref.children,
setSafeTimeout = _ref.setTimeout;
var typingContainer = Object(external_this_wp_element_["useRef"])();
var lastMouseMove = Object(external_this_wp_element_["useRef"])();
var isTyping = Object(external_this_wp_data_["useSelect"])(function (select) {
return select('core/block-editor').isTyping();
@ -25525,9 +25520,9 @@ function ObserveTyping(_ref) {
var type = event.type,
target = event.target; // Abort early if already typing, or key press is incurred outside a
// text field (e.g. arrow-ing through toolbar buttons).
// Ignore typing in a block toolbar
// Ignore typing if outside the current DOM container
if (isTyping || !Object(external_this_wp_dom_["isTextField"])(target) || target.closest('.block-editor-block-toolbar')) {
if (isTyping || !Object(external_this_wp_dom_["isTextField"])(target) || !typingContainer.current.contains(target)) {
return;
} // Special-case keydown because certain keys do not emit a keypress
// event. Conversely avoid keydown as the canonical event since there
@ -25564,6 +25559,7 @@ function ObserveTyping(_ref) {
return Object(external_this_wp_element_["createElement"])("div", {
ref: typingContainer,
onFocus: stopTypingOnNonTextField,
onKeyPress: startTypingInTextField,
onKeyDown: Object(external_this_lodash_["over"])([startTypingInTextField, stopTypingOnEscapeKey])

+ 2
- 2
wp-includes/js/dist/block-editor.min.js
File diff suppressed because it is too large
View File


+ 2
- 2
wp-includes/js/dist/block-library.js View File

@ -15949,8 +15949,8 @@ function (_Component) {
};
});
return {
defaultImageWidth: imageDimensions[featuredImageSizeSlug].width,
defaultImageHeight: imageDimensions[featuredImageSizeSlug].height,
defaultImageWidth: Object(external_this_lodash_["get"])(imageDimensions, [featuredImageSizeSlug, 'width'], 0),
defaultImageHeight: Object(external_this_lodash_["get"])(imageDimensions, [featuredImageSizeSlug, 'height'], 0),
imageSizeOptions: imageSizeOptions,
latestPosts: !Array.isArray(posts) ? posts : posts.map(function (post) {
if (post.featured_media) {

+ 1
- 1
wp-includes/js/dist/block-library.min.js
File diff suppressed because it is too large
View File


+ 15
- 6
wp-includes/post.php View File

@ -3565,6 +3565,9 @@ function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
function wp_insert_post( $postarr, $wp_error = false ) {
global $wpdb;
// Capture original pre-sanitized array for passing into filters.
$unsanitized_postarr = $postarr;
$user_id = get_current_user_id();
$defaults = array(
@ -3889,21 +3892,27 @@ function wp_insert_post( $postarr, $wp_error = false ) {
* Filters attachment post data before it is updated in or added to the database.
*
* @since 3.9.0
* @since 5.4.1 `$unsanitized_postarr` argument added.
*
* @param array $data An array of sanitized attachment post data.
* @param array $postarr An array of unsanitized attachment post data.
* @param array $data An array of slashed, sanitized, and processed attachment post data.
* @param array $postarr An array of slashed and sanitized attachment post data, but not processed.
* @param array $unsanitized_postarr An array of slashed yet *unsanitized* and unprocessed attachment post data
* as originally passed to wp_insert_post().
*/
$data = apply_filters( 'wp_insert_attachment_data', $data, $postarr );
$data = apply_filters( 'wp_insert_attachment_data', $data, $postarr, $unsanitized_postarr );
} else {
/**
* Filters slashed post data just before it is inserted into the database.
*
* @since 2.7.0
* @since 5.4.1 `$unsanitized_postarr` argument added.
*
* @param array $data An array of slashed post data.
* @param array $postarr An array of sanitized, but otherwise unmodified post data.
* @param array $data An array of slashed, sanitized, and processed post data.
* @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data.
* @param array $unsanitized_postarr An array of slashed yet *unsanitized* and unprocessed post data as
* originally passed to wp_insert_post().
*/
$data = apply_filters( 'wp_insert_post_data', $data, $postarr );
$data = apply_filters( 'wp_insert_post_data', $data, $postarr, $unsanitized_postarr );
}
$data = wp_unslash( $data );
$where = array( 'ID' => $post_ID );

+ 1
- 1
wp-includes/rest-api/endpoints/class-wp-rest-controller.php View File

@ -451,7 +451,7 @@ abstract class WP_REST_Controller {
continue;
}
if ( ! in_array( $field_name, $requested_fields, true ) ) {
if ( ! rest_is_field_included( $field_name, $requested_fields ) ) {
continue;
}

+ 11
- 11
wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php View File

@ -384,16 +384,6 @@ class WP_REST_Revisions_Controller extends WP_REST_Controller {
return $parent;
}
$parent_post_type = get_post_type_object( $parent->post_type );
if ( ! current_user_can( $parent_post_type->cap->delete_post, $parent->ID ) ) {
return new WP_Error(
'rest_cannot_delete',
__( 'Sorry, you are not allowed to delete revisions of this post.' ),
array( 'status' => rest_authorization_required_code() )
);
}
$revision = $this->get_revision( $request['id'] );
if ( is_wp_error( $revision ) ) {
return $revision;
@ -417,6 +407,16 @@ class WP_REST_Revisions_Controller extends WP_REST_Controller {
return $parent;
}
$parent_post_type = get_post_type_object( $parent->post_type );
if ( ! current_user_can( $parent_post_type->cap->delete_post, $parent->ID ) ) {
return new WP_Error(
'rest_cannot_delete',
__( 'Sorry, you are not allowed to delete revisions of this post.' ),
array( 'status' => rest_authorization_required_code() )
);
}
$revision = $this->get_revision( $request['id'] );
if ( is_wp_error( $revision ) ) {
return $revision;
@ -446,7 +446,7 @@ class WP_REST_Revisions_Controller extends WP_REST_Controller {
* @since 4.7.0
*
* @param WP_REST_Request $request Full details about the request.
* @return true|WP_Error True on success, or WP_Error object on failure.
* @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
*/
public function delete_item( $request ) {
$revision = $this->get_revision( $request['id'] );

+ 6
- 4
wp-includes/taxonomy.php View File

@ -4248,24 +4248,26 @@ function get_term_link( $term, $taxonomy = '' ) {
* Filters the tag link.
*
* @since 2.3.0
* @deprecated 2.5.0 Use {@see 'term_link'} instead.
* @since 2.5.0 Deprecated in favor of {@see 'term_link'} filter.
* @since 5.4.1 Restored (un-deprecated).
*
* @param string $termlink Tag link URL.
* @param int $term_id Term ID.
*/
$termlink = apply_filters_deprecated( 'tag_link', array( $termlink, $term->term_id ), '2.5.0', 'term_link' );
$termlink = apply_filters( 'tag_link', $termlink, $term->term_id );
} elseif ( 'category' === $taxonomy ) {
/**
* Filters the category link.
*
* @since 1.5.0
* @deprecated 2.5.0 Use {@see 'term_link'} instead.
* @since 2.5.0 Deprecated in favor of {@see 'term_link'} filter.
* @since 5.4.1 Restored (un-deprecated).
*
* @param string $termlink Category link URL.
* @param int $term_id Term ID.
*/
$termlink = apply_filters_deprecated( 'category_link', array( $termlink, $term->term_id ), '2.5.0', 'term_link' );
$termlink = apply_filters( 'category_link', $termlink, $term->term_id );
}
/**

+ 1
- 1
wp-includes/user.php View File

@ -1803,7 +1803,7 @@ function wp_insert_user( $userdata ) {
}
if ( $update ) {
if ( $user_email !== $old_user_data->user_email ) {
if ( $user_email !== $old_user_data->user_email || $user_pass !== $old_user_data->user_pass ) {
$data['user_activation_key'] = '';
}
$wpdb->update( $wpdb->users, $data, compact( 'ID' ) );

+ 1
- 1
wp-includes/version.php View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.4';
$wp_version = '5.4.1';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

+ 1
- 1
wp-mail.php View File

@ -213,7 +213,7 @@ for ( $i = 1; $i <= $count; $i++ ) {
$post_title = xmlrpc_getposttitle( $content );
if ( '' === $post_title ) {
if ( '' === trim( $post_title ) ) {
$post_title = $subject;
}

+ 6
- 6
wp-settings.php View File

@ -365,12 +365,6 @@ if ( ! is_multisite() ) {
wp_recovery_mode()->initialize();
}
// Create an instance of WP_Site_Health so that Cron events may fire.
if ( ! class_exists( 'WP_Site_Health' ) ) {
require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
}
WP_Site_Health::get_instance();
// Load active plugins.
foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
wp_register_plugin_realpath( $plugin );
@ -523,6 +517,12 @@ unset( $theme );
*/
do_action( 'after_setup_theme' );
// Create an instance of WP_Site_Health so that Cron events may fire.
if ( ! class_exists( 'WP_Site_Health' ) ) {
require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
}
WP_Site_Health::get_instance();
// Set up current user.
$GLOBALS['wp']->init();

Loading…
Cancel
Save