From 52ce85d0a54e08e7e732907ad0441d29aa763198 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 19 Jun 2020 16:49:58 +0000 Subject: [PATCH] Plugins and Themes Auto-Updates: - Fix displaying of errors on the Themes screen. - Correct the classes used for the error messages, and use `notice-alt` as notices are mostly shown on a white background. Props afercia, azaozz. Fixes #50405. git-svn-id: https://develop.svn.wordpress.org/trunk@48092 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/wp/updates.js | 6 +++--- src/wp-admin/includes/class-wp-ms-themes-list-table.php | 2 +- src/wp-admin/includes/class-wp-plugins-list-table.php | 2 +- src/wp-admin/themes.php | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/js/_enqueues/wp/updates.js b/src/js/_enqueues/wp/updates.js index ff8cb07e96..761f31fdd2 100644 --- a/src/js/_enqueues/wp/updates.js +++ b/src/js/_enqueues/wp/updates.js @@ -2719,7 +2719,7 @@ } // Clear any previous errors. - $parent.find( '.notice.error' ).addClass( 'hidden' ); + $parent.find( '.notice.notice-error' ).addClass( 'hidden' ); // Show loading status. if ( 'enable' === action ) { @@ -2752,7 +2752,7 @@ errorMessage = __( 'The request could not be completed.' ); } - $parent.find( '.notice.error' ).removeClass( 'hidden' ).find( 'p' ).text( errorMessage ); + $parent.find( '.notice.notice-error' ).removeClass( 'hidden' ).find( 'p' ).text( errorMessage ); wp.a11y.speak( errorMessage, 'polite' ); return; } @@ -2808,7 +2808,7 @@ $document.trigger( 'wp-auto-update-setting-changed', { state: action, type: type, asset: asset } ); } ) .fail( function() { - $parent.find( '.notice.error' ) + $parent.find( '.notice.notice-error' ) .removeClass( 'hidden' ) .find( 'p' ) .text( __( 'The request could not be completed.' ) ); diff --git a/src/wp-admin/includes/class-wp-ms-themes-list-table.php b/src/wp-admin/includes/class-wp-ms-themes-list-table.php index 8c039ec767..96b738608d 100644 --- a/src/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -775,7 +775,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table { */ echo apply_filters( 'theme_auto_update_setting_html', $html, $stylesheet, $theme ); - echo ''; + echo ''; } /** diff --git a/src/wp-admin/includes/class-wp-plugins-list-table.php b/src/wp-admin/includes/class-wp-plugins-list-table.php index 0ac1719bec..ee5833aba1 100644 --- a/src/wp-admin/includes/class-wp-plugins-list-table.php +++ b/src/wp-admin/includes/class-wp-plugins-list-table.php @@ -1096,7 +1096,7 @@ class WP_Plugins_List_Table extends WP_List_Table { */ echo apply_filters( 'plugin_auto_update_setting_html', $html, $plugin_file, $plugin_data ); - echo ''; + echo ''; echo ''; break; diff --git a/src/wp-admin/themes.php b/src/wp-admin/themes.php index b6551fcbc9..fa442bb5e2 100644 --- a/src/wp-admin/themes.php +++ b/src/wp-admin/themes.php @@ -559,7 +559,7 @@ if ( ! is_multisite() && $broken_themes ) { */ function wp_theme_auto_update_setting_template() { $template = ' -

+

<# if ( data.autoupdate ) { #> @@ -579,8 +579,8 @@ function wp_theme_auto_update_setting_template() { <# } #>
' . wp_get_auto_update_message() . ' <# } #> - -

+ +
'; /**