<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[56600] trunk/src/wp-admin: Administration: Use `wp_admin_notice()` more in `wp-admin/`.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/56600">56600</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/56600","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>joedolson</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2023-09-17 15:31:32 +0000 (Sun, 17 Sep 2023)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Administration: Use `wp_admin_notice()` more in `wp-admin/`.

Add additional usage of `wp_admin_notice()` in `wp-admin/` on `.error` and miscellaneous usages previously overlooked. 

Follow up to <a href="https://core.trac.wordpress.org/changeset/56408">[56408]</a>, <a href="https://core.trac.wordpress.org/changeset/56409">[56409]</a>, <a href="https://core.trac.wordpress.org/changeset/56410">[56410]</a>, <a href="https://core.trac.wordpress.org/changeset/56518">[56518]</a>, <a href="https://core.trac.wordpress.org/changeset/56570">[56570]</a>, <a href="https://core.trac.wordpress.org/changeset/56571">[56571]</a>, <a href="https://core.trac.wordpress.org/changeset/56572">[56572]</a>, <a href="https://core.trac.wordpress.org/changeset/56573">[56573]</a>, <a href="https://core.trac.wordpress.org/changeset/56576">[56576]</a>, <a href="https://core.trac.wordpress.org/changeset/56589">[56589]</a>, <a href="https://core.trac.wordpress.org/changeset/56590">[56590]</a>, <a href="https://core.trac.wordpress.org/changeset/56597">[56597]</a>, <a href="https://core.trac.wordpress.org/changeset/56599">[56599]</a>.

Props costdev, joedolson.
See <a href="https://core.trac.wordpress.org/ticket/57791">#57791</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminasyncuploadphp">trunk/src/wp-admin/async-upload.php</a></li>
<li><a href="#trunksrcwpadmineditcommentsphp">trunk/src/wp-admin/edit-comments.php</a></li>
<li><a href="#trunksrcwpadmineditformadvancedphp">trunk/src/wp-admin/edit-form-advanced.php</a></li>
<li><a href="#trunksrcwpadminedittagsphp">trunk/src/wp-admin/edit-tags.php</a></li>
<li><a href="#trunksrcwpadminimportphp">trunk/src/wp-admin/import.php</a></li>
<li><a href="#trunksrcwpadminnavmenusphp">trunk/src/wp-admin/nav-menus.php</a></li>
<li><a href="#trunksrcwpadminplugineditorphp">trunk/src/wp-admin/plugin-editor.php</a></li>
<li><a href="#trunksrcwpadminpluginsphp">trunk/src/wp-admin/plugins.php</a></li>
<li><a href="#trunksrcwpadminthemeeditorphp">trunk/src/wp-admin/theme-editor.php</a></li>
<li><a href="#trunksrcwpadminthemeinstallphp">trunk/src/wp-admin/theme-install.php</a></li>
<li><a href="#trunksrcwpadminthemesphp">trunk/src/wp-admin/themes.php</a></li>
<li><a href="#trunksrcwpadminupdatecorephp">trunk/src/wp-admin/update-core.php</a></li>
<li><a href="#trunksrcwpadminusereditphp">trunk/src/wp-admin/user-edit.php</a></li>
<li><a href="#trunksrcwpadminusernewphp">trunk/src/wp-admin/user-new.php</a></li>
<li><a href="#trunksrcwpadminusersphp">trunk/src/wp-admin/users.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminasyncuploadphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/async-upload.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/async-upload.php       2023-09-17 15:21:07 UTC (rev 56599)
+++ trunk/src/wp-admin/async-upload.php 2023-09-17 15:31:32 UTC (rev 56600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -113,8 +113,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> $id = media_handle_upload( 'async-upload', $post_id );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_wp_error( $id ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        printf(
-               '<div class="error-div error">%s <strong>%s</strong><br />%s</div>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $message = sprintf(
+               '%s <strong>%s</strong><br />%s',
</ins><span class="cx" style="display: block; padding: 0 10px">                 sprintf(
</span><span class="cx" style="display: block; padding: 0 10px">                        '<button type="button" class="dismiss button-link" onclick="jQuery(this).parents(\'div.media-item\').slideUp(200, function(){jQuery(this).remove();});">%s</button>',
</span><span class="cx" style="display: block; padding: 0 10px">                        __( 'Dismiss' )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -126,6 +126,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                ),
</span><span class="cx" style="display: block; padding: 0 10px">                esc_html( $id->get_error_message() )
</span><span class="cx" style="display: block; padding: 0 10px">        );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        wp_admin_notice(
+               $message,
+               array(
+                       'additional_classes' => array( 'error-div', 'error' ),
+                       'paragraph_wrap'     => false,
+               )
+       );
</ins><span class="cx" style="display: block; padding: 0 10px">         exit;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunksrcwpadmineditcommentsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/edit-comments.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/edit-comments.php      2023-09-17 15:21:07 UTC (rev 56599)
+++ trunk/src/wp-admin/edit-comments.php        2023-09-17 15:31:32 UTC (rev 56600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -301,7 +301,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        break;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px">        if ( $error_msg ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                echo '<div id="moderated" class="error"><p>' . $error_msg . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         wp_admin_notice(
+                       $error_msg,
+                       array(
+                               'id'                 => 'moderated',
+                               'additional_classes' => array( 'error' ),
+                       )
+               );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunksrcwpadmineditformadvancedphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/edit-form-advanced.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/edit-form-advanced.php 2023-09-17 15:21:07 UTC (rev 56599)
+++ trunk/src/wp-admin/edit-form-advanced.php   2023-09-17 15:31:32 UTC (rev 56600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -462,12 +462,21 @@
</span><span class="cx" style="display: block; padding: 0 10px">                )
</span><span class="cx" style="display: block; padding: 0 10px">        );
</span><span class="cx" style="display: block; padding: 0 10px"> endif;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+$connection_lost_message = sprintf(
+       '<span class="spinner"></span> %1$s <span class="hide-if-no-sessionstorage">%2$s</span>',
+       __( '<strong>Connection lost.</strong> Saving has been disabled until you are reconnected.' ),
+       __( 'This post is being backed up in your browser, just in case.' )
+);
+
+wp_admin_notice(
+       $connection_lost_message,
+       array(
+               'id'                 => 'lost-connection-notice',
+               'additional_classes' => array( 'error', 'hidden' ),
+       )
+);
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<div id="lost-connection-notice" class="error hidden">
-       <p><span class="spinner"></span> <?php _e( '<strong>Connection lost.</strong> Saving has been disabled until you are reconnected.' ); ?>
-       <span class="hide-if-no-sessionstorage"><?php _e( 'This post is being backed up in your browser, just in case.' ); ?></span>
-       </p>
-</div>
</del><span class="cx" style="display: block; padding: 0 10px"> <form name="post" action="post.php" method="post" id="post"
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcwpadminedittagsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/edit-tags.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/edit-tags.php  2023-09-17 15:21:07 UTC (rev 56599)
+++ trunk/src/wp-admin/edit-tags.php    2023-09-17 15:31:32 UTC (rev 56600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -348,9 +348,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> <hr class="wp-header-end">
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php if ( $message ) : ?>
-<div id="message" class="<?php echo $class; ?> notice is-dismissible"><p><?php echo $message; ?></p></div>
-       <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+if ( $message ) :
+       wp_admin_notice(
+               $message,
+               array(
+                       'id'                 => 'message',
+                       'additional_classes' => array( $class ),
+                       'dismissible'        => true,
+               )
+       );
</ins><span class="cx" style="display: block; padding: 0 10px">         $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'error' ), $_SERVER['REQUEST_URI'] );
</span><span class="cx" style="display: block; padding: 0 10px"> endif;
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span></span></pre></div>
<a id="trunksrcwpadminimportphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/import.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/import.php     2023-09-17 15:21:07 UTC (rev 56599)
+++ trunk/src/wp-admin/import.php       2023-09-17 15:31:32 UTC (rev 56600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -60,16 +60,21 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="wrap">
</span><span class="cx" style="display: block; padding: 0 10px"> <h1><?php echo esc_html( $title ); ?></h1>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php if ( ! empty( $_GET['invalid'] ) ) : ?>
-       <div class="error">
-               <p><strong><?php _e( 'Error:' ); ?></strong>
-                       <?php
-                       /* translators: %s: Importer slug. */
-                       printf( __( 'The %s importer is invalid or is not installed.' ), '<strong>' . esc_html( $_GET['invalid'] ) . '</strong>' );
-                       ?>
-               </p>
-       </div>
-<?php endif; ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+if ( ! empty( $_GET['invalid'] ) ) :
+       $importer_not_installed = '<strong>' . __( 'Error:' ) . '</strong> ' . sprintf(
+               /* translators: %s: Importer slug. */
+               __( 'The %s importer is invalid or is not installed.' ),
+               '<strong>' . esc_html( $_GET['invalid'] ) . '</strong>'
+       );
+       wp_admin_notice(
+               $importer_not_installed,
+               array(
+                       'additional_classes' => array( 'error' ),
+               )
+       );
+endif;
+?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <p><?php _e( 'If you have posts or comments in another system, WordPress can import those into this site. To get started, choose a system to import from below:' ); ?></p>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span></span></pre></div>
<a id="trunksrcwpadminnavmenusphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/nav-menus.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/nav-menus.php  2023-09-17 15:21:07 UTC (rev 56599)
+++ trunk/src/wp-admin/nav-menus.php    2023-09-17 15:31:32 UTC (rev 56600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -384,7 +384,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                $_nav_menu_selected_id = wp_update_nav_menu_object( 0, array( 'menu-name' => $new_menu_title ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                if ( is_wp_error( $_nav_menu_selected_id ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        $messages[] = '<div id="message" class="error notice is-dismissible"><p>' . $_nav_menu_selected_id->get_error_message() . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 $messages[] = wp_get_admin_notice(
+                                               $_nav_menu_selected_id->get_error_message(),
+                                               array(
+                                                       'id'                 => 'message',
+                                                       'additional_classes' => array( 'error' ),
+                                                       'dismissible'        => true,
+                                               )
+                                       );
</ins><span class="cx" style="display: block; padding: 0 10px">                                 } else {
</span><span class="cx" style="display: block; padding: 0 10px">                                        $_menu_object            = wp_get_nav_menu_object( $_nav_menu_selected_id );
</span><span class="cx" style="display: block; padding: 0 10px">                                        $nav_menu_selected_id    = $_nav_menu_selected_id;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -435,7 +442,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        exit;
</span><span class="cx" style="display: block; padding: 0 10px">                                }
</span><span class="cx" style="display: block; padding: 0 10px">                        } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __( 'Please enter a valid menu name.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         $messages[] = wp_get_admin_notice(
+                                       __( 'Please enter a valid menu name.' ),
+                                       array(
+                                               'id'                 => 'message',
+                                               'additional_classes' => array( 'error' ),
+                                               'dismissible'        => true,
+                                       )
+                               );
</ins><span class="cx" style="display: block; padding: 0 10px">                         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        // Update existing menu.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -457,7 +471,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $menu_title = trim( esc_html( $_POST['menu-name'] ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( ! $menu_title ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __( 'Please enter a valid menu name.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         $messages[] = wp_get_admin_notice(
+                                       __( 'Please enter a valid menu name.' ),
+                                       array(
+                                               'id'                 => 'message',
+                                               'additional_classes' => array( 'error' ),
+                                               'dismissible'        => true,
+                                       )
+                               );
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $menu_title = $_menu_object->name;
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -510,7 +531,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        // Set menu locations.
</span><span class="cx" style="display: block; padding: 0 10px">                        set_theme_mod( 'nav_menu_locations', $menu_locations );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Menu locations updated.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $messages[] = wp_get_admin_notice(
+                               __( 'Menu locations updated.' ),
+                               array(
+                                       'id'                 => 'message',
+                                       'additional_classes' => array( 'updated' ),
+                                       'dismissible'        => true,
+                               )
+                       );
</ins><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                break;
</span></span></pre></div>
<a id="trunksrcwpadminplugineditorphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/plugin-editor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/plugin-editor.php      2023-09-17 15:21:07 UTC (rev 56599)
+++ trunk/src/wp-admin/plugin-editor.php        2023-09-17 15:31:32 UTC (rev 56600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -29,7 +29,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">        ?>
</span><span class="cx" style="display: block; padding: 0 10px">        <div class="wrap">
</span><span class="cx" style="display: block; padding: 0 10px">                <h1><?php echo esc_html( $title ); ?></h1>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                <div id="message" class="error"><p><?php _e( 'No plugins are currently available.' ); ?></p></div>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         <?php
+               wp_admin_notice(
+                       __( 'No plugins are currently available.' ),
+                       array(
+                               'id'                 => 'message',
+                               'additional_classes' => array( 'error' ),
+                       )
+               );
+               ?>
</ins><span class="cx" style="display: block; padding: 0 10px">         </div>
</span><span class="cx" style="display: block; padding: 0 10px">        <?php
</span><span class="cx" style="display: block; padding: 0 10px">        require_once ABSPATH . 'wp-admin/admin-footer.php';
</span></span></pre></div>
<a id="trunksrcwpadminpluginsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/plugins.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/plugins.php    2023-09-17 15:21:07 UTC (rev 56599)
+++ trunk/src/wp-admin/plugins.php      2023-09-17 15:31:32 UTC (rev 56600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -339,15 +339,31 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                ?>
</span><span class="cx" style="display: block; padding: 0 10px">                                <?php if ( 1 === $plugins_to_delete ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px">                                        <h1><?php _e( 'Delete Plugin' ); ?></h1>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        <?php if ( $have_non_network_plugins && is_network_admin() ) : ?>
-                                               <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php _e( 'This plugin may be active on other sites in the network.' ); ?></p></div>
-                                       <?php endif; ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 <?php
+                                       if ( $have_non_network_plugins && is_network_admin() ) :
+                                               $maybe_active_plugin = '<strong>' . __( 'Caution:' ) . '</strong> ' . __( 'This plugin may be active on other sites in the network.' );
+                                               wp_admin_notice(
+                                                       $maybe_active_plugin,
+                                                       array(
+                                                               'additional_classes' => array( 'error' ),
+                                                       )
+                                               );
+                                       endif;
+                                       ?>
</ins><span class="cx" style="display: block; padding: 0 10px">                                         <p><?php _e( 'You are about to remove the following plugin:' ); ?></p>
</span><span class="cx" style="display: block; padding: 0 10px">                                <?php else : ?>
</span><span class="cx" style="display: block; padding: 0 10px">                                        <h1><?php _e( 'Delete Plugins' ); ?></h1>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        <?php if ( $have_non_network_plugins && is_network_admin() ) : ?>
-                                               <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php _e( 'These plugins may be active on other sites in the network.' ); ?></p></div>
-                                       <?php endif; ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 <?php
+                                       if ( $have_non_network_plugins && is_network_admin() ) :
+                                               $maybe_active_plugins = '<strong>' . __( 'Caution:' ) . '</strong> ' . __( 'These plugins may be active on other sites in the network.' );
+                                               wp_admin_notice(
+                                                       $maybe_active_plugins,
+                                                       array(
+                                                               'additional_classes' => array( 'error' ),
+                                                       )
+                                               );
+                                       endif;
+                                       ?>
</ins><span class="cx" style="display: block; padding: 0 10px">                                         <p><?php _e( 'You are about to remove the following plugins:' ); ?></p>
</span><span class="cx" style="display: block; padding: 0 10px">                                <?php endif; ?>
</span><span class="cx" style="display: block; padding: 0 10px">                                        <ul class="ul-disc">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -607,14 +623,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $invalid = validate_active_plugins();
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $invalid ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">        foreach ( $invalid as $plugin_file => $error ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                echo '<div id="message" class="error"><p>';
-               printf(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $deactivated_message = sprintf(
</ins><span class="cx" style="display: block; padding: 0 10px">                         /* translators: 1: Plugin file, 2: Error message. */
</span><span class="cx" style="display: block; padding: 0 10px">                        __( 'The plugin %1$s has been deactivated due to an error: %2$s' ),
</span><span class="cx" style="display: block; padding: 0 10px">                        '<code>' . esc_html( $plugin_file ) . '</code>',
</span><span class="cx" style="display: block; padding: 0 10px">                        esc_html( $error->get_error_message() )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                echo '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         wp_admin_notice(
+                       $deactivated_message,
+                       array(
+                               'id'                 => 'message',
+                               'additional_classes' => array( 'error' ),
+                       )
+               );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunksrcwpadminthemeeditorphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/theme-editor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/theme-editor.php       2023-09-17 15:21:07 UTC (rev 56599)
+++ trunk/src/wp-admin/theme-editor.php 2023-09-17 15:31:32 UTC (rev 56600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -262,7 +262,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $theme->errors() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        echo '<div class="error"><p><strong>' . __( 'This theme is broken.' ) . '</strong> ' . $theme->errors()->get_error_message() . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_admin_notice(
+               '<strong>' . __( 'This theme is broken.' ) . '</strong> ' . $theme->errors()->get_error_message(),
+               array(
+                       'additional_classes' => array( 'error' ),
+               )
+       );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -294,7 +299,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $error ) :
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        echo '<div class="error"><p>' . __( 'File does not exist! Please double check the name and try again.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_admin_notice(
+               __( 'File does not exist! Please double check the name and try again.' ),
+               array(
+                       'additional_classes' => array( 'error' ),
+               )
+       );
</ins><span class="cx" style="display: block; padding: 0 10px"> else :
</span><span class="cx" style="display: block; padding: 0 10px">        ?>
</span><span class="cx" style="display: block; padding: 0 10px">        <form name="template" id="template" action="theme-editor.php" method="post">
</span></span></pre></div>
<a id="trunksrcwpadminthemeinstallphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/theme-install.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/theme-install.php      2023-09-17 15:21:07 UTC (rev 56599)
+++ trunk/src/wp-admin/theme-install.php        2023-09-17 15:31:32 UTC (rev 56600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -183,9 +183,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        <hr class="wp-header-end">
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        <div class="error hide-if-js">
-               <p><?php _e( 'The Theme Installer screen requires JavaScript.' ); ?></p>
-       </div>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php
+       wp_admin_notice(
+               __( 'The Theme Installer screen requires JavaScript.' ),
+               array(
+                       'additional_classes' => array( 'error', 'hide-if-js' ),
+               )
+       );
+       ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        <div class="upload-theme">
</span><span class="cx" style="display: block; padding: 0 10px">        <?php install_themes_upload(); ?>
</span></span></pre></div>
<a id="trunksrcwpadminthemesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/themes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/themes.php     2023-09-17 15:21:07 UTC (rev 56599)
+++ trunk/src/wp-admin/themes.php       2023-09-17 15:31:32 UTC (rev 56600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -345,7 +345,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $current_theme = wp_get_theme();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $current_theme->errors() && ( ! is_multisite() || current_user_can( 'manage_network_themes' ) ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        echo '<div class="error"><p>' . __( 'Error:' ) . ' ' . $current_theme->errors()->get_error_message() . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_admin_notice(
+               __( 'Error:' ) . ' ' . $current_theme->errors()->get_error_message(),
+               array(
+                       'additional_classes' => array( 'error' ),
+               )
+       );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> $current_theme_actions = array();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -438,79 +443,88 @@
</span><span class="cx" style="display: block; padding: 0 10px">        <?php } ?>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        <?php if ( $theme['hasUpdate'] ) : ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                <?php if ( $theme['updateResponse']['compatibleWP'] && $theme['updateResponse']['compatiblePHP'] ) : ?>
-                       <div class="update-message notice inline notice-warning notice-alt"><p>
-                               <?php if ( $theme['hasPackage'] ) : ?>
-                                       <?php _e( 'New version available. <button class="button-link" type="button">Update now</button>' ); ?>
-                               <?php else : ?>
-                                       <?php _e( 'New version available.' ); ?>
-                               <?php endif; ?>
-                       </p></div>
-               <?php else : ?>
-                       <div class="update-message notice inline notice-error notice-alt"><p>
-                               <?php
-                               if ( ! $theme['updateResponse']['compatibleWP'] && ! $theme['updateResponse']['compatiblePHP'] ) {
-                                       printf(
-                                               /* 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']
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         <?php
+               if ( $theme['updateResponse']['compatibleWP'] && $theme['updateResponse']['compatiblePHP'] ) :
+                       if ( $theme['hasPackage'] ) {
+                               $new_version_available = __( 'New version available. <button class="button-link" type="button">Update now</button>' );
+                       } 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. */
+                                               ' ' . __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ),
+                                               self_admin_url( 'update-core.php' ),
+                                               esc_url( wp_get_update_php_url() )
</ins><span class="cx" style="display: block; padding: 0 10px">                                         );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        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. */
-                                                       ' ' . __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ),
-                                                       self_admin_url( 'update-core.php' ),
-                                                       esc_url( wp_get_update_php_url() )
-                                               );
-                                               wp_update_php_annotation( '</p><p><em>', '</em>' );
-                                       } elseif ( current_user_can( 'update_core' ) ) {
-                                               printf(
-                                                       /* translators: %s: URL to WordPress Updates screen. */
-                                                       ' ' . __( '<a href="%s">Please update WordPress</a>.' ),
-                                                       self_admin_url( 'update-core.php' )
-                                               );
-                                       } elseif ( current_user_can( 'update_php' ) ) {
-                                               printf(
-                                                       /* translators: %s: URL to Update PHP page. */
-                                                       ' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
-                                                       esc_url( wp_get_update_php_url() )
-                                               );
-                                               wp_update_php_annotation( '</p><p><em>', '</em>' );
-                                       }
-                               } 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']
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 wp_update_php_annotation( '</p><p><em>', '</em>', false );
+                               } elseif ( current_user_can( 'update_core' ) ) {
+                                       $theme_update_error .= sprintf(
+                                               /* translators: %s: URL to WordPress Updates screen. */
+                                               ' ' . __( '<a href="%s">Please update WordPress</a>.' ),
+                                               self_admin_url( 'update-core.php' )
</ins><span class="cx" style="display: block; padding: 0 10px">                                         );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        if ( current_user_can( 'update_core' ) ) {
-                                               printf(
-                                                       /* translators: %s: URL to WordPress Updates screen. */
-                                                       ' ' . __( '<a href="%s">Please update WordPress</a>.' ),
-                                                       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']
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         } elseif ( current_user_can( 'update_php' ) ) {
+                                       $theme_update_error .= sprintf(
+                                               /* translators: %s: URL to Update PHP page. */
+                                               ' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
+                                               esc_url( wp_get_update_php_url() )
</ins><span class="cx" style="display: block; padding: 0 10px">                                         );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        if ( current_user_can( 'update_php' ) ) {
-                                               printf(
-                                                       /* translators: %s: URL to Update PHP page. */
-                                                       ' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
-                                                       esc_url( wp_get_update_php_url() )
-                                               );
-                                               wp_update_php_annotation( '</p><p><em>', '</em>' );
-                                       }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 wp_update_php_annotation( '</p><p><em>', '</em>', false );
</ins><span class="cx" style="display: block; padding: 0 10px">                                 }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                ?>
-                       </p></div>
-               <?php endif; ?>
-       <?php endif; ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 } 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. */
+                                               ' ' . __( '<a href="%s">Please update WordPress</a>.' ),
+                                               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. */
+                                               ' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
+                                               esc_url( wp_get_update_php_url() )
+                                       );
+                                       wp_update_php_annotation( '</p><p><em>', '</em>', false );
+                               }
+                       }
+                       wp_admin_notice(
+                               $theme_update_error,
+                               array(
+                                       'type'               => 'error',
+                                       'additional_classes' => array( 'notice-alt', 'inline', 'update-message' ),
+                               )
+                       );
+               endif;
+       endif;
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        <?php
</del><span class="cx" style="display: block; padding: 0 10px">         if ( ! $theme['compatibleWP'] || ! $theme['compatiblePHP'] ) {
</span><span class="cx" style="display: block; padding: 0 10px">                $message = '';
</span><span class="cx" style="display: block; padding: 0 10px">                if ( ! $theme['compatibleWP'] && ! $theme['compatiblePHP'] ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -566,9 +580,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        )
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        ?>
</del><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        <?php
</del><span class="cx" style="display: block; padding: 0 10px">         /* translators: %s: Theme name. */
</span><span class="cx" style="display: block; padding: 0 10px">        $details_aria_label = sprintf( _x( 'View Theme Details for %s', 'theme' ), $theme['name'] );
</span><span class="cx" style="display: block; padding: 0 10px">        ?>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -662,7 +674,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        <td></td>
</span><span class="cx" style="display: block; padding: 0 10px">                <?php } ?>
</span><span class="cx" style="display: block; padding: 0 10px">        </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        <?php foreach ( $broken_themes as $broken_theme ) : ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php
+       foreach ( $broken_themes as $broken_theme ) :
+               ?>
</ins><span class="cx" style="display: block; padding: 0 10px">                 <tr>
</span><span class="cx" style="display: block; padding: 0 10px">                        <td><?php echo $broken_theme->get( 'Name' ) ? $broken_theme->display( 'Name' ) : esc_html( $broken_theme->get_stylesheet() ); ?></td>
</span><span class="cx" style="display: block; padding: 0 10px">                        <td><?php echo $broken_theme->errors()->get_error_message(); ?></td>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -723,7 +737,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px">                        ?>
</span><span class="cx" style="display: block; padding: 0 10px">                </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        <?php endforeach; ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         <?php
+       endforeach;
+       ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> </table>
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunksrcwpadminupdatecorephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/update-core.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/update-core.php        2023-09-17 15:21:07 UTC (rev 56599)
+++ trunk/src/wp-admin/update-core.php  2023-09-17 15:31:32 UTC (rev 56600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1072,16 +1072,22 @@
</span><span class="cx" style="display: block; padding: 0 10px">                if ( 'themes' === $upgrade_error ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $theme_updates = get_theme_updates();
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( ! empty( $theme_updates ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                echo '<div class="error"><p>';
-                               _e( 'Please select one or more themes to update.' );
-                               echo '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         wp_admin_notice(
+                                       __( 'Please select one or more themes to update.' ),
+                                       array(
+                                               'additional_classes' => array( 'error' ),
+                                       )
+                               );
</ins><span class="cx" style="display: block; padding: 0 10px">                         }
</span><span class="cx" style="display: block; padding: 0 10px">                } else {
</span><span class="cx" style="display: block; padding: 0 10px">                        $plugin_updates = get_plugin_updates();
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( ! empty( $plugin_updates ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                echo '<div class="error"><p>';
-                               _e( 'Please select one or more plugins to update.' );
-                               echo '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         wp_admin_notice(
+                                       __( 'Please select one or more plugins to update.' ),
+                                       array(
+                                               'additional_classes' => array( 'error' ),
+                                       )
+                               );
</ins><span class="cx" style="display: block; padding: 0 10px">                         }
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span></span></pre></div>
<a id="trunksrcwpadminusereditphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/user-edit.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/user-edit.php  2023-09-17 15:21:07 UTC (rev 56599)
+++ trunk/src/wp-admin/user-edit.php    2023-09-17 15:31:32 UTC (rev 56600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -244,11 +244,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                endif;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                if ( isset( $errors ) && is_wp_error( $errors ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        ?>
-                       <div class="error">
-                               <p><?php echo implode( "</p>\n<p>", $errors->get_error_messages() ); ?></p>
-                       </div>
-                       <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 wp_admin_notice(
+                               implode( "</p>\n<p>", $errors->get_error_messages() ),
+                               array(
+                                       'additional_classes' => array( 'error' ),
+                               )
+                       );
</ins><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px">                ?>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunksrcwpadminusernewphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/user-new.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/user-new.php   2023-09-17 15:21:07 UTC (rev 56599)
+++ trunk/src/wp-admin/user-new.php     2023-09-17 15:31:32 UTC (rev 56600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -381,17 +381,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> </h1>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php if ( isset( $errors ) && is_wp_error( $errors ) ) : ?>
-       <div class="error">
-               <ul>
-               <?php
-               foreach ( $errors->get_error_messages() as $err ) {
-                       echo "<li>$err</li>\n";
-               }
-               ?>
-               </ul>
-       </div>
-       <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+if ( isset( $errors ) && is_wp_error( $errors ) ) :
+       $error_message = '';
+       foreach ( $errors->get_error_messages() as $err ) {
+               $error_message .= "<li>$err</li>\n";
+       }
+       wp_admin_notice(
+               '<ul>' . $error_message . '</ul>',
+               array(
+                       'additional_classes' => array( 'error' ),
+                       'paragraph_wrap'     => false,
+               )
+       );
</ins><span class="cx" style="display: block; padding: 0 10px"> endif;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $messages ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -408,15 +410,21 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) : ?>
-       <div class="error">
-               <?php
-               foreach ( $add_user_errors->get_error_messages() as $message ) {
-                       echo "<p>$message</p>";
-               }
-               ?>
-       </div>
-<?php endif; ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) :
+       $error_message = '';
+       foreach ( $add_user_errors->get_error_messages() as $message ) {
+               $error_message .= "<p>$message</p>\n";
+       }
+       wp_admin_notice(
+               $error_message,
+               array(
+                       'additional_classes' => array( 'error' ),
+                       'paragraph_wrap'     => false,
+               )
+       );
+endif;
+?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <div id="ajax-response"></div>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span></span></pre></div>
<a id="trunksrcwpadminusersphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/users.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/users.php      2023-09-17 15:21:07 UTC (rev 56599)
+++ trunk/src/wp-admin/users.php        2023-09-17 15:31:32 UTC (rev 56600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -339,11 +339,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">                <div class="wrap">
</span><span class="cx" style="display: block; padding: 0 10px">                <h1><?php _e( 'Delete Users' ); ?></h1>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                <?php if ( isset( $_REQUEST['error'] ) ) : ?>
-                       <div class="error">
-                               <p><strong><?php _e( 'Error:' ); ?></strong> <?php _e( 'Please select an option.' ); ?></p>
-                       </div>
-               <?php endif; ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         <?php
+               if ( isset( $_REQUEST['error'] ) ) :
+                       wp_admin_notice(
+                               '<strong>' . __( 'Error:' ) . '</strong> ' . __( 'Please select an option.' ),
+                               array(
+                                       'additional_classes' => array( 'error' ),
+                               )
+                       );
+               endif;
+               ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                <?php if ( 1 === count( $all_user_ids ) ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px">                        <p><?php _e( 'You have specified this user for deletion:' ); ?></p>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -742,17 +747,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">                endif;
</span><span class="cx" style="display: block; padding: 0 10px">                ?>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                <?php if ( isset( $errors ) && is_wp_error( $errors ) ) : ?>
-                       <div class="error">
-                               <ul>
-                               <?php
-                               foreach ( $errors->get_error_messages() as $err ) {
-                                       echo "<li>$err</li>\n";
-                               }
-                               ?>
-                               </ul>
-                       </div>
-                       <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         <?php
+               if ( isset( $errors ) && is_wp_error( $errors ) ) :
+                       $error_message = '';
+                       foreach ( $errors->get_error_messages() as $err ) {
+                               $error_message .= "<li>$err</li>\n";
+                       }
+                       wp_admin_notice(
+                               '<ul>' . $error_message . '</ul>',
+                               array(
+                                       'additional_classes' => array( 'error' ),
+                               )
+                       );
</ins><span class="cx" style="display: block; padding: 0 10px">                 endif;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                if ( ! empty( $messages ) ) {
</span></span></pre>
</div>
</div>

</body>
</html>