<!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>[56573] trunk/src/wp-admin: Administration: Use `wp_admin_notice()` for `.updated`.</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/56573">56573</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/56573","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-14 02:13:42 +0000 (Thu, 14 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()` for `.updated`.

Add usages of `wp_admin_notice()` and `wp_get_admin_notice()` on `.updated` in the root level of `/wp-admin/`. Ongoing task to implement new function across core.

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

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmineditcommentsphp">trunk/src/wp-admin/edit-comments.php</a></li>
<li><a href="#trunksrcwpadmineditlinkformphp">trunk/src/wp-admin/edit-link-form.php</a></li>
<li><a href="#trunksrcwpadmineditphp">trunk/src/wp-admin/edit.php</a></li>
<li><a href="#trunksrcwpadminlinkmanagerphp">trunk/src/wp-admin/link-manager.php</a></li>
<li><a href="#trunksrcwpadminnavmenusphp">trunk/src/wp-admin/nav-menus.php</a></li>
<li><a href="#trunksrcwpadminoptionsgeneralphp">trunk/src/wp-admin/options-general.php</a></li>
<li><a href="#trunksrcwpadminpluginsphp">trunk/src/wp-admin/plugins.php</a></li>
<li><a href="#trunksrcwpadminthemesphp">trunk/src/wp-admin/themes.php</a></li>
<li><a href="#trunksrcwpadminuploadphp">trunk/src/wp-admin/upload.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>
<li><a href="#trunksrcwpadminwidgetsformphp">trunk/src/wp-admin/widgets-form.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<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-14 01:23:37 UTC (rev 56572)
+++ trunk/src/wp-admin/edit-comments.php        2023-09-14 02:13:42 UTC (rev 56573)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -411,9 +411,13 @@
</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">-                printf(
-                       '<div id="moderated" class="updated notice is-dismissible"><p>%s</p></div>',
-                       implode( "<br />\n", $messages )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         wp_admin(
+                       implode( "<br />\n", $messages ),
+                       array(
+                               'id'                 => 'moderated',
+                               '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"> }
</span></span></pre></div>
<a id="trunksrcwpadmineditlinkformphp"></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-link-form.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/edit-link-form.php     2023-09-14 01:23:37 UTC (rev 56572)
+++ trunk/src/wp-admin/edit-link-form.php       2023-09-14 02:13:42 UTC (rev 56573)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -91,9 +91,18 @@
</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 ( isset( $_GET['added'] ) ) : ?>
-<div id="message" class="updated notice is-dismissible"><p><?php _e( 'Link added.' ); ?></p></div>
-<?php endif; ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+if ( isset( $_GET['added'] ) ) {
+       wp_admin_notice(
+               __( 'Link added.' ),
+               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"> <form name="<?php echo esc_attr( $form_name ); ?>" id="<?php echo esc_attr( $form_name ); ?>" method="post" action="link.php">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span></span></pre></div>
<a id="trunksrcwpadmineditphp"></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.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/edit.php       2023-09-14 01:23:37 UTC (rev 56572)
+++ trunk/src/wp-admin/edit.php 2023-09-14 02:13:42 UTC (rev 56573)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -469,9 +469,13 @@
</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"> if ( $messages ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        printf(
-               '<div id="message" class="updated notice is-dismissible"><p>%s</p></div>',
-               implode( ' ', $messages )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_admin_notice(
+               implode( ' ', $messages ),
+               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"> unset( $messages );
</span></span></pre></div>
<a id="trunksrcwpadminlinkmanagerphp"></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/link-manager.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/link-manager.php       2023-09-14 01:23:37 UTC (rev 56572)
+++ trunk/src/wp-admin/link-manager.php 2023-09-14 02:13:42 UTC (rev 56573)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -119,11 +119,17 @@
</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 ( isset( $_REQUEST['deleted'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        echo '<div id="message" class="updated notice is-dismissible"><p>';
</del><span class="cx" style="display: block; padding: 0 10px">         $deleted = (int) $_REQUEST['deleted'];
</span><span class="cx" style="display: block; padding: 0 10px">        /* translators: %s: Number of links. */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        printf( _n( '%s link deleted.', '%s links deleted.', $deleted ), $deleted );
-       echo '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $deleted_message = sprintf( _n( '%s link deleted.', '%s links deleted.', $deleted ), $deleted );
+       wp_admin_notice(
+               $deleted_message,
+               array(
+                       'id'                 => 'message',
+                       'additional_classes' => array( 'updated' ),
+                       'dismissible'        => true,
+               )
+       );
</ins><span class="cx" style="display: block; padding: 0 10px">         $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'deleted' ), $_SERVER['REQUEST_URI'] );
</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="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-14 01:23:37 UTC (rev 56572)
+++ trunk/src/wp-admin/nav-menus.php    2023-09-14 02:13:42 UTC (rev 56573)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -281,7 +281,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">                check_admin_referer( 'delete-menu_item_' . $menu_item_id );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                if ( is_nav_menu_item( $menu_item_id ) && wp_delete_post( $menu_item_id, true ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'The menu item has been successfully deleted.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $messages[] = wp_get_admin_notice(
+                               __( 'The menu item has been successfully deleted.' ),
+                               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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -302,9 +309,23 @@
</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">                if ( is_wp_error( $deletion ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $messages[] = '<div id="message" class="error notice is-dismissible"><p>' . $deletion->get_error_message() . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $messages[] = wp_get_admin_notice(
+                               $deletion->get_error_message(),
+                               array(
+                                       'id'                 => 'message',
+                                       'additional_classes' => array( 'error' ),
+                                       'dismissible'        => true,
+                               )
+                       );
</ins><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="updated notice is-dismissible"><p>' . __( 'The menu has been successfully deleted.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $messages[] = wp_get_admin_notice(
+                               __( 'The menu has been successfully deleted.' ),
+                               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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -320,13 +341,27 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $deletion = wp_delete_nav_menu( $menu_id_to_delete );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( is_wp_error( $deletion ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $messages[]     = '<div id="message" class="error notice is-dismissible"><p>' . $deletion->get_error_message() . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         $messages[]     = wp_get_admin_notice(
+                                       $deletion->get_error_message(),
+                                       array(
+                                               'id'                 => 'message',
+                                               'additional_classes' => array( 'error' ),
+                                               'dismissible'        => true,
+                                       )
+                               );
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $deletion_error = true;
</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><span class="cx" style="display: block; padding: 0 10px">                if ( empty( $deletion_error ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Selected menus have been successfully deleted.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $messages[] = wp_get_admin_notice(
+                               __( 'Selected menus have been successfully deleted.' ),
+                               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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -431,7 +466,14 @@
</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><span class="cx" style="display: block; padding: 0 10px">                                        $_menu_object = $_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_title = $_menu_object->name;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -614,11 +656,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_initial_nav_menu_meta_boxes();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_theme_supports( 'menus' ) && ! $num_locations ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $messages[] = '<div id="message" class="updated"><p>' . sprintf(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $message_no_theme_support = sprintf(
</ins><span class="cx" style="display: block; padding: 0 10px">                 /* translators: %s: URL to Widgets screen. */
</span><span class="cx" style="display: block; padding: 0 10px">                __( 'Your theme does not natively support menus, but you can use them in sidebars by adding a &#8220;Navigation Menu&#8221; widget on the <a href="%s">Widgets</a> screen.' ),
</span><span class="cx" style="display: block; padding: 0 10px">                admin_url( 'widgets.php' )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ );
+       $messages[] = wp_get_admin_notice(
+               $message_no_theme_support,
+               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"> if ( ! $locations_screen ) : // Main tab.
</span></span></pre></div>
<a id="trunksrcwpadminoptionsgeneralphp"></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/options-general.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/options-general.php    2023-09-14 01:23:37 UTC (rev 56572)
+++ trunk/src/wp-admin/options-general.php      2023-09-14 02:13:42 UTC (rev 56573)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -139,25 +139,25 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <p class="description" id="new-admin-email-description"><?php _e( 'This address is used for admin purposes. If you change this, an email will be sent to your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>' ); ?></p>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> $new_admin_email = get_option( 'new_admin_email' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-if ( $new_admin_email && get_option( 'admin_email' ) !== $new_admin_email ) :
-       ?>
-       <div class="updated inline">
-       <p>
-       <?php
-               printf(
-                       /* translators: %s: New admin email. */
-                       __( 'There is a pending change of the admin email to %s.' ),
-                       '<code>' . esc_html( $new_admin_email ) . '</code>'
-               );
-               printf(
-                       ' <a href="%1$s">%2$s</a>',
-                       esc_url( wp_nonce_url( admin_url( 'options.php?dismiss=new_admin_email' ), 'dismiss-' . get_current_blog_id() . '-new_admin_email' ) ),
-                       __( 'Cancel' )
-               );
-       ?>
-       </p>
-       </div>
-<?php endif; ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+if ( $new_admin_email && get_option( 'admin_email' ) !== $new_admin_email ) {
+       $pending_admin_email_message  = sprintf(
+               /* translators: %s: New admin email. */
+               __( 'There is a pending change of the admin email to %s.' ),
+               '<code>' . esc_html( $new_admin_email ) . '</code>'
+       );
+       $pending_admin_email_message .= sprintf(
+               ' <a href="%1$s">%2$s</a>',
+               esc_url( wp_nonce_url( admin_url( 'options.php?dismiss=new_admin_email' ), 'dismiss-' . get_current_blog_id() . '-new_admin_email' ) ),
+               __( 'Cancel' )
+       );
+       wp_admin_notice(
+               $pending_admin_email_message,
+               array(
+                       'additional_classes' => array( 'updated', 'inline' ),
+               )
+       );
+}
+?>
</ins><span class="cx" style="display: block; padding: 0 10px"> </td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</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-14 01:23:37 UTC (rev 56572)
+++ trunk/src/wp-admin/plugins.php      2023-09-14 02:13:42 UTC (rev 56573)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -618,7 +618,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">-if ( isset( $_GET['error'] ) ) :
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+if ( isset( $_GET['error'] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        if ( isset( $_GET['main'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                $errmsg = __( 'You cannot delete a plugin while it is active on the main site.' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -639,10 +639,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $errmsg = __( 'Plugin could not be activated because it triggered a <strong>fatal error</strong>.' );
</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">-        ?>
-       <div id="message" class="error"><p><?php echo $errmsg; ?></p>
-       <?php
-
</del><span class="cx" style="display: block; padding: 0 10px">         if ( ! isset( $_GET['main'] ) && ! isset( $_GET['charsout'] )
</span><span class="cx" style="display: block; padding: 0 10px">                && isset( $_GET['_error_nonce'] ) && wp_verify_nonce( $_GET['_error_nonce'], 'plugin-activation-error_' . $plugin )
</span><span class="cx" style="display: block; padding: 0 10px">        ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -655,66 +651,71 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        admin_url( 'plugins.php' )
</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">-                ?>
-               <iframe style="border:0" width="100%" height="70px" src="<?php echo esc_url( $iframe_url ); ?>"></iframe>
-               <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $errmsg .= '<iframe style="border:0" width="100%" height="70px" src="' . esc_url( $iframe_url ) . '"></iframe>';
</ins><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">-        ?>
-       </div>
-       <?php
-elseif ( isset( $_GET['deleted'] ) ) :
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_admin_notice(
+               $errmsg,
+               array(
+                       'id'                 => 'message',
+                       'additional_classes' => array( 'error' ),
+               )
+       );
+
+} elseif ( isset( $_GET['deleted'] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">         $delete_result = get_transient( 'plugins_delete_result_' . $user_ID );
</span><span class="cx" style="display: block; padding: 0 10px">        // Delete it once we're done.
</span><span class="cx" style="display: block; padding: 0 10px">        delete_transient( 'plugins_delete_result_' . $user_ID );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        if ( is_wp_error( $delete_result ) ) :
-               ?>
-               <div id="message" class="error notice is-dismissible">
-                       <p>
-                               <?php
-                               printf(
-                                       /* translators: %s: Error message. */
-                                       __( 'Plugin could not be deleted due to an error: %s' ),
-                                       esc_html( $delete_result->get_error_message() )
-                               );
-                               ?>
-                       </p>
-               </div>
-               <?php else : ?>
-               <div id="message" class="updated notice is-dismissible">
-                       <p>
-                               <?php
-                               if ( 1 === (int) $_GET['deleted'] ) {
-                                       _e( 'The selected plugin has been deleted.' );
-                               } else {
-                                       _e( 'The selected plugins have been deleted.' );
-                               }
-                               ?>
-                       </p>
-               </div>
-       <?php endif; ?>
-<?php elseif ( isset( $_GET['activate'] ) ) : ?>
-       <div id="message" class="updated notice is-dismissible"><p><?php _e( 'Plugin activated.' ); ?></p></div>
-<?php elseif ( isset( $_GET['activate-multi'] ) ) : ?>
-       <div id="message" class="updated notice is-dismissible"><p><?php _e( 'Selected plugins activated.' ); ?></p></div>
-<?php elseif ( isset( $_GET['deactivate'] ) ) : ?>
-       <div id="message" class="updated notice is-dismissible"><p><?php _e( 'Plugin deactivated.' ); ?></p></div>
-<?php elseif ( isset( $_GET['deactivate-multi'] ) ) : ?>
-       <div id="message" class="updated notice is-dismissible"><p><?php _e( 'Selected plugins deactivated.' ); ?></p></div>
-<?php elseif ( 'update-selected' === $action ) : ?>
-       <div id="message" class="updated notice is-dismissible"><p><?php _e( 'All selected plugins are up to date.' ); ?></p></div>
-<?php elseif ( isset( $_GET['resume'] ) ) : ?>
-       <div id="message" class="updated notice is-dismissible"><p><?php _e( 'Plugin resumed.' ); ?></p></div>
-<?php elseif ( isset( $_GET['enabled-auto-update'] ) ) : ?>
-       <div id="message" class="updated notice is-dismissible"><p><?php _e( 'Plugin will be auto-updated.' ); ?></p></div>
-<?php elseif ( isset( $_GET['disabled-auto-update'] ) ) : ?>
-       <div id="message" class="updated notice is-dismissible"><p><?php _e( 'Plugin will no longer be auto-updated.' ); ?></p></div>
-<?php elseif ( isset( $_GET['enabled-auto-update-multi'] ) ) : ?>
-       <div id="message" class="updated notice is-dismissible"><p><?php _e( 'Selected plugins will be auto-updated.' ); ?></p></div>
-<?php elseif ( isset( $_GET['disabled-auto-update-multi'] ) ) : ?>
-       <div id="message" class="updated notice is-dismissible"><p><?php _e( 'Selected plugins will no longer be auto-updated.' ); ?></p></div>
-<?php endif; ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( is_wp_error( $delete_result ) ) {
+               $plugin_not_deleted_message = sprintf(
+                       /* translators: %s: Error message. */
+                       __( 'Plugin could not be deleted due to an error: %s' ),
+                       esc_html( $delete_result->get_error_message() )
+               );
+               wp_admin_notice(
+                       $plugin_not_deleted_message,
+                       array(
+                               'id'                 => 'message',
+                               'additional_classes' => array( 'error' ),
+                               'dismissible'        => true,
+                       )
+               );
+       } else {
+               $updated_args = array(
+                       'id'                 => 'message',
+                       'additional_classes' => array( 'updated' ),
+                       'dismissible'        => true,
+               );
+               if ( 1 === (int) $_GET['deleted'] ) {
+                       $plugins_deleted_message = __( 'The selected plugin has been deleted.' );
+               } else {
+                       $plugins_deleted_message = __( 'The selected plugins have been deleted.' );
+               }
+               wp_admin_notice( $plugins_deleted_message, $updated_args );
+       }
+} elseif ( isset( $_GET['activate'] ) ) {
+       wp_admin_notice( __( 'Plugin activated.' ), $updated_args );
+} elseif ( isset( $_GET['activate-multi'] ) ) {
+       wp_admin_notice( __( 'Selected plugins activated.' ), $updated_args );
+} elseif ( isset( $_GET['deactivate'] ) ) {
+       wp_admin_notice( __( 'Plugin deactivated.' ), $updated_args );
+} elseif ( isset( $_GET['deactivate-multi'] ) ) {
+       wp_admin_notice( __( 'Selected plugins deactivated.' ), $updated_args );
+} elseif ( 'update-selected' === $action ) {
+       wp_admin_notice( __( 'All selected plugins are up to date.' ), $updated_args );
+} elseif ( isset( $_GET['resume'] ) ) {
+       wp_admin_notice( __( 'Plugin resumed.' ), $updated_args );
+} elseif ( isset( $_GET['enabled-auto-update'] ) ) {
+       wp_admin_notice( __( 'Plugin will be auto-updated.' ), $updated_args );
+} elseif ( isset( $_GET['disabled-auto-update'] ) ) {
+       wp_admin_notice( __( 'Plugin will no longer be auto-updated.' ), $updated_args );
+} elseif ( isset( $_GET['enabled-auto-update-multi'] ) ) {
+       wp_admin_notice( __( 'Selected plugins will be auto-updated.' ), $updated_args );
+} elseif ( isset( $_GET['disabled-auto-update-multi'] ) ) {
+       wp_admin_notice( __( 'Selected plugins will no longer be auto-updated.' ), $updated_args );
+}
+?>
</ins><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 class="wp-heading-inline">
</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-14 01:23:37 UTC (rev 56572)
+++ trunk/src/wp-admin/themes.php       2023-09-14 02:13:42 UTC (rev 56573)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -260,43 +260,86 @@
</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"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        ?>
-       <div id="message1" class="updated notice is-dismissible"><p><?php _e( 'The active theme is broken. Reverting to the default theme.' ); ?></p></div>
-       <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_admin_notice(
+               __( 'The active theme is broken. Reverting to the default theme.' ),
+               array(
+                       'id'                 => 'message1',
+                       'additional_classes' => array( 'updated' ),
+                       'dismissible'        => true,
+               )
+       );
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $_GET['activated'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">        if ( isset( $_GET['previewed'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                ?>
-               <div id="message2" class="updated notice is-dismissible"><p><?php _e( 'Settings saved and theme activated.' ); ?> <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php _e( 'Visit site' ); ?></a></p></div>
-               <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         wp_admin_notice(
+                       __( 'Settings saved and theme activated.' ) . '<a href="' . esc_url( home_url( '/' ) ) . '">' . __( 'Visit site' ) . '</a>',
+                       array(
+                               'id'                 => 'message2',
+                               'additional_classes' => array( 'updated' ),
+                               'dismissible'        => true,
+                       )
+               );
</ins><span class="cx" style="display: block; padding: 0 10px">         } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                ?>
-               <div id="message2" class="updated notice is-dismissible"><p><?php _e( 'New theme activated.' ); ?> <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php _e( 'Visit site' ); ?></a></p></div>
-               <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         wp_admin_notice(
+                       __( 'New theme activated.' ) . '<a href="' . esc_url( home_url( '/' ) ) . '">' . __( 'Visit site' ) . '</a>',
+                       array(
+                               'id'                 => 'message2',
+                               '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"> } elseif ( isset( $_GET['deleted'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        ?>
-       <div id="message3" class="updated notice is-dismissible"><p><?php _e( 'Theme deleted.' ); ?></p></div>
-       <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_admin_notice(
+               __( 'Theme deleted.' ),
+               array(
+                       'id'                 => 'message3',
+                       'additional_classes' => array( 'updated' ),
+                       'dismissible'        => true,
+               )
+       );
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $_GET['delete-active-child'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        ?>
-       <div id="message4" class="error"><p><?php _e( 'You cannot delete a theme while it has an active child theme.' ); ?></p></div>
-       <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_admin_notice(
+               __( 'You cannot delete a theme while it has an active child theme.' ),
+               array(
+                       'id'                 => 'message4',
+                       'additional_classes' => array( 'error' ),
+               )
+       );
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $_GET['resumed'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        ?>
-       <div id="message5" class="updated notice is-dismissible"><p><?php _e( 'Theme resumed.' ); ?></p></div>
-       <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_admin_notice(
+               __( 'Theme resumed.' ),
+               array(
+                       'id'                 => 'message5',
+                       'additional_classes' => array( 'updated' ),
+                       'dismissible'        => true,
+               )
+       );
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $_GET['error'] ) && 'resuming' === $_GET['error'] ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        ?>
-       <div id="message6" class="error"><p><?php _e( 'Theme could not be resumed because it triggered a <strong>fatal error</strong>.' ); ?></p></div>
-       <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_admin_notice(
+               __( 'Theme could not be resumed because it triggered a <strong>fatal error</strong>.' ),
+               array(
+                       'id'                 => 'message6',
+                       'additional_classes' => array( 'error' ),
+               )
+       );
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $_GET['enabled-auto-update'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        ?>
-       <div id="message7" class="updated notice is-dismissible"><p><?php _e( 'Theme will be auto-updated.' ); ?></p></div>
-       <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_admin_notice(
+               __( 'Theme will be auto-updated.' ),
+               array(
+                       'id'                 => 'message7',
+                       'additional_classes' => array( 'updated' ),
+                       'dismissible'        => true,
+               )
+       );
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $_GET['disabled-auto-update'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        ?>
-       <div id="message8" class="updated notice is-dismissible"><p><?php _e( 'Theme will no longer be auto-updated.' ); ?></p></div>
-       <?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_admin_notice(
+               __( 'Theme will no longer be auto-updated.' ),
+               array(
+                       'id'                 => 'message8',
+                       '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"> $current_theme = wp_get_theme();
</span></span></pre></div>
<a id="trunksrcwpadminuploadphp"></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/upload.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/upload.php     2023-09-14 01:23:37 UTC (rev 56572)
+++ trunk/src/wp-admin/upload.php       2023-09-14 02:13:42 UTC (rev 56573)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -218,21 +218,41 @@
</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 ( ! empty( $message ) ) : ?>
-                       <div id="message" class="updated notice is-dismissible"><p><?php echo $message; ?></p></div>
-               <?php endif; ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         <?php
+               if ( ! empty( $message ) ) {
+                       wp_admin_notice(
+                               $message,
+                               array(
+                                       'id'                 => 'message',
+                                       'additional_classes' => array( 'updated' ),
+                                       'dismissible'        => true,
+                               )
+                       );
+               }
</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 class="error hide-if-js">
-                       <p>
-                       <?php
-                       printf(
-                               /* translators: %s: List view URL. */
-                               __( 'The grid view for the Media Library requires JavaScript. <a href="%s">Switch to the list view</a>.' ),
-                               'upload.php?mode=list'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         if ( ! empty( $message ) ) {
+                       wp_admin_notice(
+                               $message,
+                               array(
+                                       'id'                 => 'message',
+                                       'additional_classes' => array( 'updated' ),
+                                       'dismissible'        => true,
+                               )
</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>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         }
+
+               $js_required_message = sprintf(
+                       /* translators: %s: List view URL. */
+                       __( 'The grid view for the Media Library requires JavaScript. <a href="%s">Switch to the list view</a>.' ),
+                       'upload.php?mode=list'
+               );
+               wp_admin_notice(
+                       $js_required_message,
+                       array(
+                               additional_classes( 'error', 'hide-if-js' ),
+                       )
+               );
+               ?>
</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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -426,9 +446,18 @@
</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 ( ! empty( $message ) ) : ?>
-<div id="message" class="updated notice is-dismissible"><p><?php echo $message; ?></p></div>
-<?php endif; ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+if ( ! empty( $message ) ) {
+       wp_admin_notice(
+               $message,
+               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"> <form id="posts-filter" method="get">
</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-14 01:23:37 UTC (rev 56572)
+++ trunk/src/wp-admin/user-edit.php    2023-09-14 02:13:42 UTC (rev 56573)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -545,25 +545,28 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                                </p>
</span><span class="cx" style="display: block; padding: 0 10px">                                                        <?php endif; ?>
</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 $new_email = get_user_meta( $current_user->ID, '_new_email', true ); ?>
-                                                       <?php if ( $new_email && $new_email['newemail'] !== $current_user->user_email && $profile_user->ID === $current_user->ID ) : ?>
-                                                       <div class="updated inline">
-                                                               <p>
-                                                                       <?php
-                                                                       printf(
-                                                                               /* translators: %s: New email. */
-                                                                               __( 'There is a pending change of your email to %s.' ),
-                                                                               '<code>' . esc_html( $new_email['newemail'] ) . '</code>'
-                                                                       );
-                                                                       printf(
-                                                                               ' <a href="%1$s">%2$s</a>',
-                                                                               esc_url( wp_nonce_url( self_admin_url( 'profile.php?dismiss=' . $current_user->ID . '_new_email' ), 'dismiss-' . $current_user->ID . '_new_email' ) ),
-                                                                               __( 'Cancel' )
-                                                                       );
-                                                                       ?>
-                                                               </p>
-                                                       </div>
-                                                       <?php endif; ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                                 <?php
+                                                       $new_email = get_user_meta( $current_user->ID, '_new_email', true );
+                                                       if ( $new_email && $new_email['newemail'] !== $current_user->user_email && $profile_user->ID === $current_user->ID ) :
+
+                                                               $pending_change_message  = sprintf(
+                                                                       /* translators: %s: New email. */
+                                                                       __( 'There is a pending change of your email to %s.' ),
+                                                                       '<code>' . esc_html( $new_email['newemail'] ) . '</code>'
+                                                               );
+                                                               $pending_change_message .= sprintf(
+                                                                       ' <a href="%1$s">%2$s</a>',
+                                                                       esc_url( wp_nonce_url( self_admin_url( 'profile.php?dismiss=' . $current_user->ID . '_new_email' ), 'dismiss-' . $current_user->ID . '_new_email' ) ),
+                                                                       __( 'Cancel' )
+                                                               );
+                                                               wp_admin_notice(
+                                                                       $pending_change_message,
+                                                                       array(
+                                                                               'additional_classes' => array( 'updated', 'inline' ),
+                                                                       )
+                                                               );
+                                                       endif;
+                                                       ?>
</ins><span class="cx" style="display: block; padding: 0 10px">                                                 </td>
</span><span class="cx" style="display: block; padding: 0 10px">                                        </tr>
</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-14 01:23:37 UTC (rev 56572)
+++ trunk/src/wp-admin/user-new.php     2023-09-14 02:13:42 UTC (rev 56573)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -396,7 +396,14 @@
</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="cx" style="display: block; padding: 0 10px">        foreach ( $messages as $msg ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         wp_admin_notice(
+                       $msg,
+                       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"> ?>
</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-14 01:23:37 UTC (rev 56572)
+++ trunk/src/wp-admin/users.php        2023-09-14 02:13:42 UTC (rev 56573)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -610,11 +610,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                /* translators: %s: Number of users. */
</span><span class="cx" style="display: block; padding: 0 10px">                                                $message = _n( '%s user deleted.', '%s users deleted.', $delete_count );
</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>' . sprintf( $message, number_format_i18n( $delete_count ) ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 $message    = sprintf( $message, number_format_i18n( $delete_count ) );
+                                       $messages[] = wp_get_admin_notice(
+                                               $message,
+                                               array(
+                                                       'id'                 => 'message',
+                                                       'additional_classes' => array( 'updated' ),
+                                                       'dismissible'        => true,
+                                               )
+                                       );
</ins><span class="cx" style="display: block; padding: 0 10px">                                         break;
</span><span class="cx" style="display: block; padding: 0 10px">                                case 'add':
</span><span class="cx" style="display: block; padding: 0 10px">                                        $message = __( 'New user created.' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px">                                         $user_id = isset( $_GET['id'] ) ? $_GET['id'] : false;
</span><span class="cx" style="display: block; padding: 0 10px">                                        if ( $user_id && current_user_can( 'edit_user', $user_id ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                                $message .= sprintf(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -630,7 +637,14 @@
</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">-                                        $messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . $message . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 $messages[] = wp_get_admin_notice(
+                                               $message,
+                                               array(
+                                                       'id'                 => 'message',
+                                                       'additional_classes' => array( 'updated' ),
+                                                       'dismissible'        => true,
+                                               )
+                                       );
</ins><span class="cx" style="display: block; padding: 0 10px">                                         break;
</span><span class="cx" style="display: block; padding: 0 10px">                                case 'resetpassword':
</span><span class="cx" style="display: block; padding: 0 10px">                                        $reset_count = isset( $_GET['reset_count'] ) ? (int) $_GET['reset_count'] : 0;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -640,25 +654,89 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                /* translators: %s: Number of users. */
</span><span class="cx" style="display: block; padding: 0 10px">                                                $message = _n( 'Password reset links sent to %s user.', 'Password reset links sent to %s users.', $reset_count );
</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>' . sprintf( $message, number_format_i18n( $reset_count ) ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 $message    = sprintf( $message, number_format_i18n( $reset_count ) );
+                                       $messages[] = wp_get_admin_notice(
+                                               $message,
+                                               array(
+                                                       'id'                 => 'message',
+                                                       'additional_classes' => array( 'updated' ),
+                                                       'dismissible'        => true,
+                                               )
+                                       );
</ins><span class="cx" style="display: block; padding: 0 10px">                                         break;
</span><span class="cx" style="display: block; padding: 0 10px">                                case 'promote':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        $messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Changed roles.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 $messages[] = wp_get_admin_notice(
+                                               __( 'Changed roles.' ),
+                                               array(
+                                                       'id'                 => 'message',
+                                                       'additional_classes' => array( 'updated' ),
+                                                       'dismissible'        => true,
+                                               )
+                                       );
</ins><span class="cx" style="display: block; padding: 0 10px">                                         break;
</span><span class="cx" style="display: block; padding: 0 10px">                                case 'err_admin_role':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        $messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __( 'The current user&#8217;s role must have user editing capabilities.' ) . '</p></div>';
-                                       $messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Other user roles have been changed.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 $messages[] = wp_get_admin_notice(
+                                               __( 'The current user&#8217;s role must have user editing capabilities.' ),
+                                               array(
+                                                       'id'                 => 'message',
+                                                       'additional_classes' => array( 'error' ),
+                                                       'dismissible'        => true,
+                                               )
+                                       );
+                                       $messages[] = wp_get_admin_notice(
+                                               __( 'Other user roles have been changed.' ),
+                                               array(
+                                                       'id'                 => 'message',
+                                                       'additional_classes' => array( 'updated' ),
+                                                       'dismissible'        => true,
+                                               )
+                                       );
</ins><span class="cx" style="display: block; padding: 0 10px">                                         break;
</span><span class="cx" style="display: block; padding: 0 10px">                                case 'err_admin_del':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        $messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __( 'You cannot delete the current user.' ) . '</p></div>';
-                                       $messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Other users have been deleted.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 $messages[] = wp_get_admin_notice(
+                                               __( 'You cannot delete the current user.' ),
+                                               array(
+                                                       'id'                 => 'message',
+                                                       'additional_classes' => array( 'error' ),
+                                                       'dismissible'        => true,
+                                               )
+                                       );
+                                       $messages[] = wp_get_admin_notice(
+                                               __( 'Other users have been deleted.' ),
+                                               array(
+                                                       'id'                 => 'message',
+                                                       'additional_classes' => array( 'updated' ),
+                                                       'dismissible'        => true,
+                                               )
+                                       );
</ins><span class="cx" style="display: block; padding: 0 10px">                                         break;
</span><span class="cx" style="display: block; padding: 0 10px">                                case 'remove':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        $messages[] = '<div id="message" class="updated notice is-dismissible fade"><p>' . __( 'User removed from this site.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 $messages[] = wp_get_admin_notice(
+                                               __( 'User removed from this site.' ),
+                                               array(
+                                                       'id'                 => 'message',
+                                                       'additional_classes' => array( 'updated', 'fade' ),
+                                                       'dismissible'        => true,
+                                               )
+                                       );
</ins><span class="cx" style="display: block; padding: 0 10px">                                         break;
</span><span class="cx" style="display: block; padding: 0 10px">                                case 'err_admin_remove':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        $messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __( 'You cannot remove the current user.' ) . '</p></div>';
-                                       $messages[] = '<div id="message" class="updated notice is-dismissible fade"><p>' . __( 'Other users have been removed.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 $messages[] = wp_get_admin_notice(
+                                               __( 'You cannot remove the current user.' ),
+                                               array(
+                                                       'id'                 => 'message',
+                                                       'additional_classes' => array( 'error' ),
+                                                       'dismissible'        => true,
+                                               )
+                                       );
+                                       $messages[] = wp_get_admin_notice(
+                                               __( 'Other users have been removed.' ),
+                                               array(
+                                                       'id'                 => 'message',
+                                                       'additional_classes' => array( 'updated', 'fade' ),
+                                                       'dismissible'        => true,
+                                               )
+                                       );
</ins><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">                endif;
</span></span></pre></div>
<a id="trunksrcwpadminwidgetsformphp"></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/widgets-form.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/widgets-form.php       2023-09-14 01:23:37 UTC (rev 56572)
+++ trunk/src/wp-admin/widgets-form.php 2023-09-14 02:13:42 UTC (rev 56573)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -403,14 +403,28 @@
</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 ( isset( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) { ?>
-<div id="message" class="updated notice is-dismissible"><p><?php echo $messages[ $_GET['message'] ]; ?></p></div>
-<?php } ?>
-<?php if ( isset( $_GET['error'] ) && isset( $errors[ $_GET['error'] ] ) ) { ?>
-<div id="message" class="error"><p><?php echo $errors[ $_GET['error'] ]; ?></p></div>
-<?php } ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+if ( isset( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) {
+       wp_admin_notice(
+               $messages[ $_GET['message'] ],
+               array(
+                       'id'                 => 'message',
+                       'additional_classes' => array( 'updated' ),
+                       'dismissible'        => true,
+               )
+       );
+}
+if ( isset( $_GET['error'] ) && isset( $errors[ $_GET['error'] ] ) ) {
+       wp_admin_notice(
+               $errors[ $_GET['error'] ],
+               array(
+                       'id'                 => 'message',
+                       'additional_classes' => array( 'error' ),
+                       'dismissible'        => true,
+               )
+       );
+}
</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"> /**
</span><span class="cx" style="display: block; padding: 0 10px">  * Fires before the Widgets administration page content loads.
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span></span></pre>
</div>
</div>

</body>
</html>