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 #39213.
Built from https://develop.svn.wordpress.org/trunk@55418


git-svn-id: http://core.svn.wordpress.org/trunk@54951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
joedolson
2023-02-23 22:13:23 +00:00
parent 259af07d2b
commit f51b63c1fe
12 changed files with 39 additions and 43 deletions

View File

@@ -195,7 +195,7 @@ if ( isset( $_GET['enabled'] ) ) {
/* translators: %s: Number of themes. */
$message = _n( '%s theme enabled.', '%s themes enabled.', $enabled );
}
echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
echo '<div id="message" class="notice notice-success is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
} elseif ( isset( $_GET['disabled'] ) ) {
$disabled = absint( $_GET['disabled'] );
if ( 1 === $disabled ) {
@@ -204,9 +204,9 @@ if ( isset( $_GET['enabled'] ) ) {
/* translators: %s: Number of themes. */
$message = _n( '%s theme disabled.', '%s themes disabled.', $disabled );
}
echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
echo '<div id="message" class="notice notice-success is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
} elseif ( isset( $_GET['error'] ) && 'none' === $_GET['error'] ) {
echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
}
?>