Skip to content

Commit

Permalink
Update to WordPress 5.5.1. For more information, see https://wordpres…
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantheon Automation authored and pwtyler committed Sep 1, 2020
1 parent 57d34e3 commit b5ed05d
Show file tree
Hide file tree
Showing 60 changed files with 822 additions and 185 deletions.
39 changes: 36 additions & 3 deletions wp-admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,45 @@

<hr />

<div class="about__section has-subtle-background-color">
<div class="column">
<h2><?php _e( 'Maintenance and Security Releases' ); ?></h2>
<p>
<?php
printf(
/* translators: 1: WordPress version number, 2: Plural number of bugs. */
_n(
'<strong>Version %1$s</strong> addressed %2$s bug.',
'<strong>Version %1$s</strong> addressed %2$s bugs.',
44
),
'5.5.1',
number_format_i18n( 44 )
);
?>
<?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.5.1' )
)
);
?>
</p>
</div>
</div>

<hr />

<div class="about__section has-1-column">
<div class="column">
<h2><?php _e( 'Speed' ); ?></h2>
<p><strong><?php _e( 'Posts and pages feel faster, thanks to lazy-loaded images.' ); ?></strong></p>
<p><?php _e( 'Images give your story a lot of impact, but they can sometimes make your site seem slow.' ); ?></p>
<p><?php _e( 'In WordPress 5.5, images wait to load until they’re just about to scroll into view. The technical term is ‘lazy loading.’' ); ?></p>
<p><?php _e( 'In WordPress 5.5, images wait to load until they’re just about to scroll into view. The technical term is ‘lazy loading’.' ); ?></p>
<p><?php _e( 'On mobile, lazy loading can also keep browsers from loading files meant for other devices. That can save your readers money on data — and help preserve battery life.' ); ?></p>
</div>
</div>
Expand All @@ -75,7 +108,7 @@
<div class="column">
<h2><?php _ex( 'Search', 'sitemap' ); ?></h2>
<p><strong><?php _e( 'Say hello to your new sitemap.' ); ?></strong></p>
<p><?php _e( 'WordPress sites work well with search engines. ' ); ?></p>
<p><?php _e( 'WordPress sites work well with search engines.' ); ?></p>
<p><?php _e( 'Now, by default, WordPress 5.5 includes an XML sitemap that helps search engines discover your most important pages from the very minute you go live.' ); ?></p>
<p><?php _e( 'So more people will find your site sooner, giving you more time to engage, retain and convert them to subscribers, customers or whatever fits your definition of success.' ); ?></p>
</div>
Expand Down Expand Up @@ -149,7 +182,7 @@
<div class="about__section has-1-column">
<div class="column">
<h2><?php _e( 'Accessibility' ); ?></h2>
<p><?php _e( 'Every release adds improvements to the accessible publishing experience, and that remains true for WordPress 5.5. ' ); ?></p>
<p><?php _e( 'Every release adds improvements to the accessible publishing experience, and that remains true for WordPress 5.5.' ); ?></p>
<p><?php _e( 'Now you can copy links in media screens and modal dialogs with a button, instead of trying to highlight a line of text.' ); ?></p>
<p><?php _e( 'You can also move meta boxes with the keyboard, and edit images in WordPress with your assistive device, as it can read you the instructions in the image editor.' ); ?></p>
</div>
Expand Down
10 changes: 9 additions & 1 deletion wp-admin/admin-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,19 @@
}
}

$error = error_get_last();

// Print a CSS class to make PHP errors visible.
if ( error_get_last() && WP_DEBUG && WP_DEBUG_DISPLAY && ini_get( 'display_errors' ) ) {
if ( $error && WP_DEBUG && WP_DEBUG_DISPLAY && ini_get( 'display_errors' )
// Don't print the class for PHP notices in wp-config.php, as they happen before WP_DEBUG takes effect,
// and should not be displayed with the `error_reporting` level previously set in wp-load.php.
&& ( E_NOTICE !== $error['type'] || 'wp-config.php' !== wp_basename( $error['file'] ) )
) {
$admin_body_class .= ' php-error';
}

unset( $error );

?>
</head>
<?php
Expand Down
4 changes: 0 additions & 4 deletions wp-admin/css/colors/modern/colors-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,3 @@ div#wp-responsive-toggle a:before {
.wp-full-overlay-footer .devices button:focus:before {
color: #3858e9;
}

#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu {
padding-bottom: 12px;
}
2 changes: 1 addition & 1 deletion wp-admin/css/colors/modern/colors-rtl.min.css

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions wp-admin/css/colors/modern/colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,3 @@ div#wp-responsive-toggle a:before {
.wp-full-overlay-footer .devices button:focus:before {
color: #3858e9;
}

#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu {
padding-bottom: 12px;
}
2 changes: 1 addition & 1 deletion wp-admin/css/colors/modern/colors.min.css

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions wp-admin/css/colors/modern/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,4 @@ $notification-color: $highlight-color;
$link: $highlight-color;
$link-focus: darken($highlight-color, 10%);


@import "../_admin.scss";

#adminmenu .wp-submenu, #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu {
padding-bottom: 12px;
}
4 changes: 3 additions & 1 deletion wp-admin/includes/class-theme-installer-skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ private function do_overwrite() {
$all_themes = wp_get_themes( array( 'errors' => null ) );

foreach ( $all_themes as $theme ) {
if ( rtrim( $theme->get_stylesheet_directory(), '/' ) !== $folder ) {
$stylesheet_dir = wp_normalize_path( $theme->get_stylesheet_directory() );

if ( rtrim( $stylesheet_dir, '/' ) !== $folder ) {
continue;
}

Expand Down
4 changes: 2 additions & 2 deletions wp-admin/includes/class-walker-category-checklist.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ public function start_el( &$output, $category, $depth = 0, $args = array(), $id
$name = 'tax_input[' . $taxonomy . ']';
}

$args['popular_cats'] = empty( $args['popular_cats'] ) ? array() : $args['popular_cats'];
$args['popular_cats'] = ! empty( $args['popular_cats'] ) ? array_map( 'intval', $args['popular_cats'] ) : array();

$class = in_array( $category->term_id, $args['popular_cats'], true ) ? ' class="popular-category"' : '';

$args['selected_cats'] = empty( $args['selected_cats'] ) ? array() : $args['selected_cats'];
$args['selected_cats'] = ! empty( $args['selected_cats'] ) ? array_map( 'intval', $args['selected_cats'] ) : array();

if ( ! empty( $args['list_only'] ) ) {
$aria_checked = 'false';
Expand Down
20 changes: 13 additions & 7 deletions wp-admin/includes/class-wp-automatic-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,11 @@ public function should_update( $type, $item, $context ) {
* adjust core updates.
*
* @since 3.7.0
* @since 5.5.0 The `$update` parameter accepts the value of null.
*
* @param bool $update Whether to update.
* @param object $item The update offer.
* @param bool|null $update Whether to update. The value of null is internally used
* to detect whether nothing has hooked into this filter.
* @param object $item The update offer.
*/
$update = apply_filters( "auto_update_{$type}", $update, $item );

Expand Down Expand Up @@ -879,7 +881,7 @@ protected function send_email( $type, $core_update, $result = null ) {
*
* @since 5.5.0
*
* @param array $update_results The result of updates tasks.
* @param array $update_results The results of update tasks.
*/
protected function after_plugin_theme_update( $update_results ) {
$successful_updates = array();
Expand All @@ -889,10 +891,12 @@ protected function after_plugin_theme_update( $update_results ) {
* Filters whether to send an email following an automatic background plugin update.
*
* @since 5.5.0
* @since 5.5.1 Added the $update_results parameter.
*
* @param bool $enabled True if plugins notifications are enabled, false otherwise.
* @param bool $enabled True if plugins notifications are enabled, false otherwise.
* @param array $update_results The results of plugins update tasks.
*/
$notifications_enabled = apply_filters( 'auto_plugin_update_send_email', true );
$notifications_enabled = apply_filters( 'auto_plugin_update_send_email', true, $update_results['plugin'] );

if ( ! empty( $update_results['plugin'] ) && $notifications_enabled ) {
foreach ( $update_results['plugin'] as $update_result ) {
Expand All @@ -908,10 +912,12 @@ protected function after_plugin_theme_update( $update_results ) {
* Filters whether to send an email following an automatic background theme update.
*
* @since 5.5.0
* @since 5.5.1 Added the $update_results parameter.
*
* @param bool $enabled True if notifications are enabled, false otherwise.
* @param bool $enabled True if notifications are enabled, false otherwise.
* @param array $update_results The results of theme update tasks.
*/
$notifications_enabled = apply_filters( 'auto_theme_update_send_email', true );
$notifications_enabled = apply_filters( 'auto_theme_update_send_email', true, $update_results['theme'] );

if ( ! empty( $update_results['theme'] ) && $notifications_enabled ) {
foreach ( $update_results['theme'] as $update_result ) {
Expand Down
32 changes: 19 additions & 13 deletions wp-admin/includes/class-wp-debug-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ static function debug_data() {
$upload_dir = wp_upload_dir();
$permalink_structure = get_option( 'permalink_structure' );
$is_ssl = is_ssl();
$is_multisite = is_multisite();
$users_can_register = get_option( 'users_can_register' );
$blog_public = get_option( 'blog_public' );
$default_comment_status = get_option( 'default_comment_status' );
$is_multisite = is_multisite();
$environment_type = wp_get_environment_type();
$core_version = get_bloginfo( 'version' );
$core_updates = get_core_updates();
$core_update_needed = '';
Expand Down Expand Up @@ -99,6 +100,11 @@ static function debug_data() {
'value' => $is_ssl ? __( 'Yes' ) : __( 'No' ),
'debug' => $is_ssl,
),
'multisite' => array(
'label' => __( 'Is this a multisite?' ),
'value' => $is_multisite ? __( 'Yes' ) : __( 'No' ),
'debug' => $is_multisite,
),
'user_registration' => array(
'label' => __( 'Can anyone register on this site?' ),
'value' => $users_can_register ? __( 'Yes' ) : __( 'No' ),
Expand All @@ -114,10 +120,10 @@ static function debug_data() {
'value' => 'open' === $default_comment_status ? _x( 'Open', 'comment status' ) : _x( 'Closed', 'comment status' ),
'debug' => $default_comment_status,
),
'multisite' => array(
'label' => __( 'Is this a multisite?' ),
'value' => $is_multisite ? __( 'Yes' ) : __( 'No' ),
'debug' => $is_multisite,
'environment_type' => array(
'label' => __( 'Environment type' ),
'value' => $environment_type,
'debug' => $environment_type,
),
),
);
Expand Down Expand Up @@ -531,10 +537,10 @@ static function debug_data() {
);
} else {
// Get the PHP ini directive values.
$post_max_size = ini_get( 'post_max_size' );
$upload_max_size = ini_get( 'upload_max_filesize' );
$max_file_uploads = ini_get( 'max_file_uploads' );
$effective = min( wp_convert_hr_to_bytes( $post_max_size ), wp_convert_hr_to_bytes( $upload_max_size ) );
$post_max_size = ini_get( 'post_max_size' );
$upload_max_filesize = ini_get( 'upload_max_filesize' );
$max_file_uploads = ini_get( 'max_file_uploads' );
$effective = min( wp_convert_hr_to_bytes( $post_max_size ), wp_convert_hr_to_bytes( $upload_max_filesize ) );

// Add info in Media section.
$info['wp-media']['fields']['file_uploads'] = array(
Expand All @@ -548,7 +554,7 @@ static function debug_data() {
);
$info['wp-media']['fields']['upload_max_filesize'] = array(
'label' => __( 'Max size of an uploaded file' ),
'value' => $upload_max_size,
'value' => $upload_max_filesize,
);
$info['wp-media']['fields']['max_effective_size'] = array(
'label' => __( 'Max effective file size' ),
Expand Down Expand Up @@ -711,15 +717,15 @@ static function debug_data() {
);
}

$info['wp-server']['fields']['max_input_time'] = array(
$info['wp-server']['fields']['max_input_time'] = array(
'label' => __( 'Max input time' ),
'value' => ini_get( 'max_input_time' ),
);
$info['wp-server']['fields']['upload_max_size'] = array(
$info['wp-server']['fields']['upload_max_filesize'] = array(
'label' => __( 'Upload max filesize' ),
'value' => ini_get( 'upload_max_filesize' ),
);
$info['wp-server']['fields']['php_post_max_size'] = array(
$info['wp-server']['fields']['php_post_max_size'] = array(
'label' => __( 'PHP post max size' ),
'value' => ini_get( 'post_max_size' ),
);
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/includes/class-wp-filesystem-ftpext.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function get_contents( $file ) {
$contents .= fread( $temphandle, 8 * KB_IN_BYTES );
}

fclose( $temphangle );
fclose( $temphandle );
unlink( $tempfile );

return $contents;
Expand Down
10 changes: 5 additions & 5 deletions wp-admin/includes/class-wp-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ protected function bulk_actions( $which = '' ) {

echo "</select>\n";

submit_button( __( 'Apply' ), 'action', "doaction$two", false, array( 'id' => "doaction$two" ) );
submit_button( __( 'Apply' ), 'action', '', false, array( 'id' => "doaction$two" ) );
echo "\n";
}

Expand All @@ -493,14 +493,14 @@ public function current_action() {
return false;
}

if ( isset( $_REQUEST['doaction2'] ) && isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) {
return $_REQUEST['action2'];
}

if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) {
return $_REQUEST['action'];
}

if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) {
return $_REQUEST['action2'];
}

return false;
}

Expand Down
Loading

0 comments on commit b5ed05d

Please sign in to comment.