diff --git a/wp-admin/themes.php b/wp-admin/themes.php
index 9fb3701a12..d5d8c150e3 100644
--- a/wp-admin/themes.php
+++ b/wp-admin/themes.php
@@ -345,7 +345,12 @@ if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) {
$current_theme = wp_get_theme();
if ( $current_theme->errors() && ( ! is_multisite() || current_user_can( 'manage_network_themes' ) ) ) {
- echo '
' . __( 'Error:' ) . ' ' . $current_theme->errors()->get_error_message() . '
';
+ wp_admin_notice(
+ __( 'Error:' ) . ' ' . $current_theme->errors()->get_error_message(),
+ array(
+ 'additional_classes' => array( 'error' ),
+ )
+ );
}
$current_theme_actions = array();
@@ -438,79 +443,88 @@ foreach ( $themes as $theme ) :
-
-
-
- Update now' ); ?>
-
-
-
-
-
-
- Update now' );
+ } else {
+ $new_version_available = __( 'New version available.' );
+ }
+ wp_admin_notice(
+ $new_version_available,
+ array(
+ 'type' => 'warning',
+ 'additional_classes' => array( 'notice-alt', 'inline', 'update-message' ),
+ )
+ );
+ else :
+ $theme_update_error = '';
+ if ( ! $theme['updateResponse']['compatibleWP'] && ! $theme['updateResponse']['compatiblePHP'] ) {
+ $theme_update_error .= sprintf(
+ /* translators: %s: Theme name. */
+ __( 'There is a new version of %s available, but it does not work with your versions of WordPress and PHP.' ),
+ $theme['name']
+ );
+ if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
+ $theme_update_error .= sprintf(
+ /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
+ ' ' . __( 'Please update WordPress, and then learn more about updating PHP.' ),
+ self_admin_url( 'update-core.php' ),
+ esc_url( wp_get_update_php_url() )
);
- if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
- printf(
- /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
- ' ' . __( 'Please update WordPress, and then learn more about updating PHP.' ),
- self_admin_url( 'update-core.php' ),
- esc_url( wp_get_update_php_url() )
- );
- wp_update_php_annotation( '
', '' );
- } elseif ( current_user_can( 'update_core' ) ) {
- printf(
- /* translators: %s: URL to WordPress Updates screen. */
- ' ' . __( 'Please update WordPress.' ),
- self_admin_url( 'update-core.php' )
- );
- } elseif ( current_user_can( 'update_php' ) ) {
- printf(
- /* translators: %s: URL to Update PHP page. */
- ' ' . __( 'Learn more about updating PHP.' ),
- esc_url( wp_get_update_php_url() )
- );
- wp_update_php_annotation( '
', '' );
- }
- } elseif ( ! $theme['updateResponse']['compatibleWP'] ) {
- printf(
- /* translators: %s: Theme name. */
- __( 'There is a new version of %s available, but it does not work with your version of WordPress.' ),
- $theme['name']
+ wp_update_php_annotation( '
', '', false );
+ } elseif ( current_user_can( 'update_core' ) ) {
+ $theme_update_error .= sprintf(
+ /* translators: %s: URL to WordPress Updates screen. */
+ ' ' . __( 'Please update WordPress.' ),
+ self_admin_url( 'update-core.php' )
);
- if ( current_user_can( 'update_core' ) ) {
- printf(
- /* translators: %s: URL to WordPress Updates screen. */
- ' ' . __( 'Please update WordPress.' ),
- self_admin_url( 'update-core.php' )
- );
- }
- } elseif ( ! $theme['updateResponse']['compatiblePHP'] ) {
- printf(
- /* translators: %s: Theme name. */
- __( 'There is a new version of %s available, but it does not work with your version of PHP.' ),
- $theme['name']
+ } elseif ( current_user_can( 'update_php' ) ) {
+ $theme_update_error .= sprintf(
+ /* translators: %s: URL to Update PHP page. */
+ ' ' . __( 'Learn more about updating PHP.' ),
+ esc_url( wp_get_update_php_url() )
);
- if ( current_user_can( 'update_php' ) ) {
- printf(
- /* translators: %s: URL to Update PHP page. */
- ' ' . __( 'Learn more about updating PHP.' ),
- esc_url( wp_get_update_php_url() )
- );
- wp_update_php_annotation( '
', '' );
- }
+ wp_update_php_annotation( '
', '', false );
}
- ?>
-
-
-
+ } elseif ( ! $theme['updateResponse']['compatibleWP'] ) {
+ $theme_update_error .= sprintf(
+ /* translators: %s: Theme name. */
+ __( 'There is a new version of %s available, but it does not work with your version of WordPress.' ),
+ $theme['name']
+ );
+ if ( current_user_can( 'update_core' ) ) {
+ $theme_update_error .= sprintf(
+ /* translators: %s: URL to WordPress Updates screen. */
+ ' ' . __( '
Please update WordPress.' ),
+ self_admin_url( 'update-core.php' )
+ );
+ }
+ } elseif ( ! $theme['updateResponse']['compatiblePHP'] ) {
+ $theme_update_error .= sprintf(
+ /* translators: %s: Theme name. */
+ __( 'There is a new version of %s available, but it does not work with your version of PHP.' ),
+ $theme['name']
+ );
+ if ( current_user_can( 'update_php' ) ) {
+ $theme_update_error .= sprintf(
+ /* translators: %s: URL to Update PHP page. */
+ ' ' . __( '
Learn more about updating PHP.' ),
+ esc_url( wp_get_update_php_url() )
+ );
+ wp_update_php_annotation( '
', '', false );
+ }
+ }
+ wp_admin_notice(
+ $theme_update_error,
+ array(
+ 'type' => 'error',
+ 'additional_classes' => array( 'notice-alt', 'inline', 'update-message' ),
+ )
+ );
+ endif;
+ endif;
-
-
@@ -662,7 +674,9 @@ if ( ! is_multisite() && $broken_themes ) {
|
-
+
get( 'Name' ) ? $broken_theme->display( 'Name' ) : esc_html( $broken_theme->get_stylesheet() ); ?> |
errors()->get_error_message(); ?> |
@@ -723,7 +737,9 @@ if ( ! is_multisite() && $broken_themes ) {
}
?>
-
+
diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php
index 28f92ca303..acd6cf7bf7 100644
--- a/wp-admin/update-core.php
+++ b/wp-admin/update-core.php
@@ -1072,16 +1072,22 @@ if ( 'upgrade-core' === $action ) {
if ( 'themes' === $upgrade_error ) {
$theme_updates = get_theme_updates();
if ( ! empty( $theme_updates ) ) {
- echo '", $errors->get_error_messages() ),
+ array(
+ 'additional_classes' => array( 'error' ),
+ )
+ );
}
?>
diff --git a/wp-admin/user-new.php b/wp-admin/user-new.php
index b516f4f460..7ef33a8132 100644
--- a/wp-admin/user-new.php
+++ b/wp-admin/user-new.php
@@ -381,17 +381,19 @@ if ( current_user_can( 'create_users' ) ) {
?>
-
-
-
-
-
+ ' . __( 'Error:' ) . ' ' . __( 'Please select an option.' ),
+ array(
+ 'additional_classes' => array( 'error' ),
+ )
+ );
+ endif;
+ ?>
@@ -742,17 +747,18 @@ switch ( $wp_list_table->current_action() ) {
endif;
?>
-
-
-
- get_error_messages() as $err ) {
- echo "- $err
\n";
- }
- ?>
-
-
- get_error_messages() as $err ) {
+ $error_message .= "
$err\n";
+ }
+ wp_admin_notice(
+ '
',
+ array(
+ 'additional_classes' => array( 'error' ),
+ )
+ );
endif;
if ( ! empty( $messages ) ) {
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 1a3388a73a..4e8bfc2334 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '6.4-alpha-56599';
+$wp_version = '6.4-alpha-56600';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.