<!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>[55418] trunk/src/wp-admin: Networks and Sites: Use consistent markup for admin notices.</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/55418">55418</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/55418","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-02-23 22:11:51 +0000 (Thu, 23 Feb 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'>Networks and Sites: Use consistent markup for admin notices.
Fix admin notices in network screens so they use consistent markup and style.
Props afercia, marksabbath, stevenkword, jeremyfelt, aryamaaru, robinwpdeveloper, obayedmamur, joedolson.
Fixes <a href="https://core.trac.wordpress.org/ticket/39213">#39213</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminmysitesphp">trunk/src/wp-admin/my-sites.php</a></li>
<li><a href="#trunksrcwpadminnetworksettingsphp">trunk/src/wp-admin/network/settings.php</a></li>
<li><a href="#trunksrcwpadminnetworksiteinfophp">trunk/src/wp-admin/network/site-info.php</a></li>
<li><a href="#trunksrcwpadminnetworksitenewphp">trunk/src/wp-admin/network/site-new.php</a></li>
<li><a href="#trunksrcwpadminnetworksitesettingsphp">trunk/src/wp-admin/network/site-settings.php</a></li>
<li><a href="#trunksrcwpadminnetworksitethemesphp">trunk/src/wp-admin/network/site-themes.php</a></li>
<li><a href="#trunksrcwpadminnetworksiteusersphp">trunk/src/wp-admin/network/site-users.php</a></li>
<li><a href="#trunksrcwpadminnetworksitesphp">trunk/src/wp-admin/network/sites.php</a></li>
<li><a href="#trunksrcwpadminnetworkthemesphp">trunk/src/wp-admin/network/themes.php</a></li>
<li><a href="#trunksrcwpadminnetworkusernewphp">trunk/src/wp-admin/network/user-new.php</a></li>
<li><a href="#trunksrcwpadminnetworkusersphp">trunk/src/wp-admin/network/users.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminmysitesphp"></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/my-sites.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/my-sites.php 2023-02-23 21:32:15 UTC (rev 55417)
+++ trunk/src/wp-admin/my-sites.php 2023-02-23 22:11:51 UTC (rev 55418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -56,7 +56,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require_once ABSPATH . 'wp-admin/admin-header.php';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $updated ) { ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <div id="message" class="updated notice is-dismissible"><p><strong><?php _e( 'Settings saved.' ); ?></strong></p></div>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <div id="message" class="notice notice-success is-dismissible"><p><strong><?php _e( 'Settings saved.' ); ?></strong></p></div>
</ins><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"> <div class="wrap">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -74,9 +74,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"> if ( empty( $blogs ) ) :
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- echo '<p>';
- _e( 'You must be a member of at least one site to use this page.' );
- echo '</p>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ?>
+ <div class="notice notice-error is-dismissible"><p><strong><?php _e( 'You must be a member of at least one site to use this page.' ); ?></strong></p></div>
+ <?php
</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">
</span></span></pre></div>
<a id="trunksrcwpadminnetworksettingsphp"></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/network/settings.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/network/settings.php 2023-02-23 21:32:15 UTC (rev 55417)
+++ trunk/src/wp-admin/network/settings.php 2023-02-23 22:11:51 UTC (rev 55418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -138,7 +138,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require_once ABSPATH . 'wp-admin/admin-header.php';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $_GET['updated'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ?><div id="message" class="updated notice is-dismissible"><p><?php _e( 'Settings saved.' ); ?></p></div>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ?><div id="message" class="notice notice-success is-dismissible"><p><?php _e( 'Settings saved.' ); ?></p></div>
</ins><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"> ?>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -167,7 +167,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $new_admin_email = get_site_option( 'new_admin_email' );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $new_admin_email && get_site_option( 'admin_email' ) !== $new_admin_email ) :
</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="updated inline">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <div class="notice notice-warning is-dismissible inline">
</ins><span class="cx" style="display: block; padding: 0 10px"> <p>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> printf(
</span></span></pre></div>
<a id="trunksrcwpadminnetworksiteinfophp"></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/network/site-info.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/network/site-info.php 2023-02-23 21:32:15 UTC (rev 55417)
+++ trunk/src/wp-admin/network/site-info.php 2023-02-23 22:11:51 UTC (rev 55418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -147,7 +147,7 @@
</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">+ echo '<div id="message" class="notice notice-success is-dismissible"><p>' . $msg . '</p></div>';
</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="trunksrcwpadminnetworksitenewphp"></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/network/site-new.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/network/site-new.php 2023-02-23 21:32:15 UTC (rev 55417)
+++ trunk/src/wp-admin/network/site-new.php 2023-02-23 22:11:51 UTC (rev 55418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -189,7 +189,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</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">+ echo '<div id="message" class="notice notice-success is-dismissible"><p>' . $msg . '</p></div>';
</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="trunksrcwpadminnetworksitesettingsphp"></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/network/site-settings.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/network/site-settings.php 2023-02-23 21:32:15 UTC (rev 55417)
+++ trunk/src/wp-admin/network/site-settings.php 2023-02-23 22:11:51 UTC (rev 55418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -105,7 +105,7 @@
</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">+ echo '<div id="message" class="notice notice-success is-dismissible"><p>' . $msg . '</p></div>';
</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="trunksrcwpadminnetworksitethemesphp"></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/network/site-themes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/network/site-themes.php 2023-02-23 21:32:15 UTC (rev 55417)
+++ trunk/src/wp-admin/network/site-themes.php 2023-02-23 22:11:51 UTC (rev 55418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -195,7 +195,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: %s: Number of themes. */
</span><span class="cx" style="display: block; padding: 0 10px"> $message = _n( '%s theme enabled.', '%s themes enabled.', $enabled );
</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 '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-success is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $_GET['disabled'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $disabled = absint( $_GET['disabled'] );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 1 === $disabled ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -204,9 +204,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: %s: Number of themes. */
</span><span class="cx" style="display: block; padding: 0 10px"> $message = _n( '%s theme disabled.', '%s themes disabled.', $disabled );
</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 '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-success is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $_GET['error'] ) && 'none' === $_GET['error'] ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
</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="trunksrcwpadminnetworksiteusersphp"></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/network/site-users.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/network/site-users.php 2023-02-23 21:32:15 UTC (rev 55417)
+++ trunk/src/wp-admin/network/site-users.php 2023-02-23 22:11:51 UTC (rev 55418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -235,37 +235,37 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $_GET['update'] ) ) :
</span><span class="cx" style="display: block; padding: 0 10px"> switch ( $_GET['update'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> case 'adduser':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User added.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-success is-dismissible"><p>' . __( 'User added.' ) . '</p></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> case 'err_add_member':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'User is already a member of this site.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'User is already a member of this site.' ) . '</p></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> case 'err_add_fail':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'User could not be added to this site.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'User could not be added to this site.' ) . '</p></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> case 'err_add_notfound':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username of an existing user.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'Enter the username of an existing user.' ) . '</p></div>';
</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">- echo '<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">+ echo '<div id="message" class="notice notice-success is-dismissible"><p>' . __( 'Changed roles.' ) . '</p></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> case 'err_promote':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to change role.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'Select a user to change role.' ) . '</p></div>';
</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">- echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User removed from this site.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-success is-dismissible"><p>' . __( 'User removed from this site.' ) . '</p></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> case 'err_remove':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to remove.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'Select a user to remove.' ) . '</p></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> case 'newuser':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User created.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-success is-dismissible"><p>' . __( 'User created.' ) . '</p></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> case 'err_new':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username and email.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'Enter the username and email.' ) . '</p></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> case 'err_new_dup':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Duplicated username or email address.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'Duplicated username or email address.' ) . '</p></div>';
</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="trunksrcwpadminnetworksitesphp"></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/network/sites.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/network/sites.php 2023-02-23 21:32:15 UTC (rev 55417)
+++ trunk/src/wp-admin/network/sites.php 2023-02-23 22:11:51 UTC (rev 55418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -354,7 +354,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"> if ( ! empty( $msg ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $msg = '<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">+ $msg = '<div id="message" class="notice notice-success is-dismissible"><p>' . $msg . '</p></div>';
</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="trunksrcwpadminnetworkthemesphp"></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/network/themes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/network/themes.php 2023-02-23 21:32:15 UTC (rev 55417)
+++ trunk/src/wp-admin/network/themes.php 2023-02-23 22:11:51 UTC (rev 55418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -375,7 +375,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: %s: Number of themes. */
</span><span class="cx" style="display: block; padding: 0 10px"> $message = _n( '%s theme enabled.', '%s themes enabled.', $enabled );
</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 '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-updated is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $_GET['disabled'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $disabled = absint( $_GET['disabled'] );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 1 === $disabled ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -384,7 +384,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: %s: Number of themes. */
</span><span class="cx" style="display: block; padding: 0 10px"> $message = _n( '%s theme disabled.', '%s themes disabled.', $disabled );
</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 '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-updated is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $_GET['deleted'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $deleted = absint( $_GET['deleted'] );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 1 === $deleted ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -393,7 +393,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: %s: Number of themes. */
</span><span class="cx" style="display: block; padding: 0 10px"> $message = _n( '%s theme deleted.', '%s themes deleted.', $deleted );
</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 '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $deleted ) ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-success is-dismissible"><p>' . sprintf( $message, number_format_i18n( $deleted ) ) . '</p></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $_GET['enabled-auto-update'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $enabled = absint( $_GET['enabled-auto-update'] );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 1 === $enabled ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -402,7 +402,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: %s: Number of themes. */
</span><span class="cx" style="display: block; padding: 0 10px"> $message = _n( '%s theme will be auto-updated.', '%s themes will be auto-updated.', $enabled );
</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 '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-success is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $_GET['disabled-auto-update'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $disabled = absint( $_GET['disabled-auto-update'] );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 1 === $disabled ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -411,11 +411,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: %s: Number of themes. */
</span><span class="cx" style="display: block; padding: 0 10px"> $message = _n( '%s theme will no longer be auto-updated.', '%s themes will no longer be auto-updated.', $disabled );
</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 '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-success is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $_GET['error'] ) && 'none' === $_GET['error'] ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $_GET['error'] ) && 'main' === $_GET['error'] ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- echo '<div class="error notice is-dismissible"><p>' . __( 'You cannot delete a theme while it is active on the main site.' ) . '</p></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'You cannot delete a theme while it is active on the main site.' ) . '</p></div>';
</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="trunksrcwpadminnetworkusernewphp"></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/network/user-new.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/network/user-new.php 2023-02-23 21:32:15 UTC (rev 55417)
+++ trunk/src/wp-admin/network/user-new.php 2023-02-23 22:11:51 UTC (rev 55418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -77,8 +77,8 @@
</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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+$message = '';
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $_GET['update'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $messages = array();
</del><span class="cx" style="display: block; padding: 0 10px"> if ( 'added' === $_GET['update'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $edit_link = '';
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $_GET['user_id'] ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -93,8 +93,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $edit_link ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $message .= sprintf( ' <a href="%s">%s</a>', $edit_link, __( 'Edit user' ) );
</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[] = $message;
</del><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">@@ -107,18 +105,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 id="add-new-user"><?php _e( 'Add New User' ); ?></h1>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-if ( ! empty( $messages ) ) {
- foreach ( $messages as $msg ) {
- 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">+if ( '' !== $message ) {
+ echo '<div id="message" class="notice notice-success is-dismissible"><p>' . $message . '</p></div>';
</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 ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) {
</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">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <div id="message" class="notice notice-error is-dismissible">
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- foreach ( $add_user_errors->get_error_messages() as $message ) {
- echo "<p>$message</p>";
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ foreach ( $add_user_errors->get_error_messages() as $error ) {
+ echo "<p>$error</p>";
</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"> </div>
</span></span></pre></div>
<a id="trunksrcwpadminnetworkusersphp"></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/network/users.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/network/users.php 2023-02-23 21:32:15 UTC (rev 55417)
+++ trunk/src/wp-admin/network/users.php 2023-02-23 22:11:51 UTC (rev 55418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -255,7 +255,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $_REQUEST['updated'] ) && 'true' == $_REQUEST['updated'] && ! empty( $_REQUEST['action'] ) ) {
</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="updated notice is-dismissible"><p>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <div id="message" class="notice notice-success is-dismissible"><p>
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> switch ( $_REQUEST['action'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> case 'delete':
</span></span></pre>
</div>
</div>
</body>
</html>