diff --git a/wp-admin/my-sites.php b/wp-admin/my-sites.php
index dc99843d75..aa8063c1d2 100644
--- a/wp-admin/my-sites.php
+++ b/wp-admin/my-sites.php
@@ -56,7 +56,7 @@ get_current_screen()->set_help_sidebar(
require_once ABSPATH . 'wp-admin/admin-header.php';
if ( $updated ) { ?>
-
@@ -74,9 +74,9 @@ if ( in_array( get_site_option( 'registration' ), array( 'all', 'blog' ), true )
}
if ( empty( $blogs ) ) :
- echo '
';
- _e( 'You must be a member of at least one site to use this page.' );
- echo '
';
+ ?>
+
+
diff --git a/wp-admin/network/settings.php b/wp-admin/network/settings.php
index b9551ec5e2..685d82cf50 100644
--- a/wp-admin/network/settings.php
+++ b/wp-admin/network/settings.php
@@ -138,7 +138,7 @@ if ( $_POST ) {
require_once ABSPATH . 'wp-admin/admin-header.php';
if ( isset( $_GET['updated'] ) ) {
- ?>
+ ?>
@@ -167,7 +167,7 @@ if ( isset( $_GET['updated'] ) ) {
$new_admin_email = get_site_option( 'new_admin_email' );
if ( $new_admin_email && get_site_option( 'admin_email' ) !== $new_admin_email ) :
?>
-
+
';
+ echo '
';
}
}
?>
diff --git a/wp-admin/network/site-new.php b/wp-admin/network/site-new.php
index 441e4be3c4..2d97c04093 100644
--- a/wp-admin/network/site-new.php
+++ b/wp-admin/network/site-new.php
@@ -189,7 +189,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
' . $msg . '
';
+ echo '
';
}
}
?>
diff --git a/wp-admin/network/site-settings.php b/wp-admin/network/site-settings.php
index ae2dde8220..7425c1bb8f 100644
--- a/wp-admin/network/site-settings.php
+++ b/wp-admin/network/site-settings.php
@@ -105,7 +105,7 @@ network_edit_site_nav(
if ( ! empty( $messages ) ) {
foreach ( $messages as $msg ) {
- echo '
';
+ echo '
';
}
}
?>
diff --git a/wp-admin/network/site-themes.php b/wp-admin/network/site-themes.php
index 55d9961045..4c919c5fe9 100644
--- a/wp-admin/network/site-themes.php
+++ b/wp-admin/network/site-themes.php
@@ -195,7 +195,7 @@ if ( isset( $_GET['enabled'] ) ) {
/* translators: %s: Number of themes. */
$message = _n( '%s theme enabled.', '%s themes enabled.', $enabled );
}
- echo '
' . sprintf( $message, number_format_i18n( $enabled ) ) . '
';
+ echo '
' . sprintf( $message, number_format_i18n( $enabled ) ) . '
';
} 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 '
' . sprintf( $message, number_format_i18n( $disabled ) ) . '
';
+ echo '
' . sprintf( $message, number_format_i18n( $disabled ) ) . '
';
} elseif ( isset( $_GET['error'] ) && 'none' === $_GET['error'] ) {
- echo '
' . __( 'No theme selected.' ) . '
';
+ echo '
' . __( 'No theme selected.' ) . '
';
}
?>
diff --git a/wp-admin/network/site-users.php b/wp-admin/network/site-users.php
index 54d8f5bd35..08905f8fa5 100644
--- a/wp-admin/network/site-users.php
+++ b/wp-admin/network/site-users.php
@@ -235,37 +235,37 @@ network_edit_site_nav(
if ( isset( $_GET['update'] ) ) :
switch ( $_GET['update'] ) {
case 'adduser':
- echo '
' . __( 'User added.' ) . '
';
+ echo '
' . __( 'User added.' ) . '
';
break;
case 'err_add_member':
- echo '
' . __( 'User is already a member of this site.' ) . '
';
+ echo '
' . __( 'User is already a member of this site.' ) . '
';
break;
case 'err_add_fail':
- echo '
' . __( 'User could not be added to this site.' ) . '
';
+ echo '
' . __( 'User could not be added to this site.' ) . '
';
break;
case 'err_add_notfound':
- echo '
' . __( 'Enter the username of an existing user.' ) . '
';
+ echo '
' . __( 'Enter the username of an existing user.' ) . '
';
break;
case 'promote':
- echo '
' . __( 'Changed roles.' ) . '
';
+ echo '
' . __( 'Changed roles.' ) . '
';
break;
case 'err_promote':
- echo '
' . __( 'Select a user to change role.' ) . '
';
+ echo '
' . __( 'Select a user to change role.' ) . '
';
break;
case 'remove':
- echo '
' . __( 'User removed from this site.' ) . '
';
+ echo '
' . __( 'User removed from this site.' ) . '
';
break;
case 'err_remove':
- echo '
' . __( 'Select a user to remove.' ) . '
';
+ echo '
' . __( 'Select a user to remove.' ) . '
';
break;
case 'newuser':
- echo '
' . __( 'User created.' ) . '
';
+ echo '
' . __( 'User created.' ) . '
';
break;
case 'err_new':
- echo '
' . __( 'Enter the username and email.' ) . '
';
+ echo '
' . __( 'Enter the username and email.' ) . '
';
break;
case 'err_new_dup':
- echo '
' . __( 'Duplicated username or email address.' ) . '
';
+ echo '
' . __( 'Duplicated username or email address.' ) . '
';
break;
}
endif;
diff --git a/wp-admin/network/sites.php b/wp-admin/network/sites.php
index b4f0258ace..f72711550b 100644
--- a/wp-admin/network/sites.php
+++ b/wp-admin/network/sites.php
@@ -354,7 +354,7 @@ if ( isset( $_GET['updated'] ) ) {
}
if ( ! empty( $msg ) ) {
- $msg = '
';
+ $msg = '
';
}
}
diff --git a/wp-admin/network/themes.php b/wp-admin/network/themes.php
index 72573e9fb9..27e8db8857 100644
--- a/wp-admin/network/themes.php
+++ b/wp-admin/network/themes.php
@@ -375,7 +375,7 @@ if ( isset( $_GET['enabled'] ) ) {
/* translators: %s: Number of themes. */
$message = _n( '%s theme enabled.', '%s themes enabled.', $enabled );
}
- echo '
' . sprintf( $message, number_format_i18n( $enabled ) ) . '
';
+ echo '
' . sprintf( $message, number_format_i18n( $enabled ) ) . '
';
} elseif ( isset( $_GET['disabled'] ) ) {
$disabled = absint( $_GET['disabled'] );
if ( 1 === $disabled ) {
@@ -384,7 +384,7 @@ if ( isset( $_GET['enabled'] ) ) {
/* translators: %s: Number of themes. */
$message = _n( '%s theme disabled.', '%s themes disabled.', $disabled );
}
- echo '
' . sprintf( $message, number_format_i18n( $disabled ) ) . '
';
+ echo '
' . sprintf( $message, number_format_i18n( $disabled ) ) . '
';
} elseif ( isset( $_GET['deleted'] ) ) {
$deleted = absint( $_GET['deleted'] );
if ( 1 === $deleted ) {
@@ -393,7 +393,7 @@ if ( isset( $_GET['enabled'] ) ) {
/* translators: %s: Number of themes. */
$message = _n( '%s theme deleted.', '%s themes deleted.', $deleted );
}
- echo '
' . sprintf( $message, number_format_i18n( $deleted ) ) . '
';
+ echo '
' . sprintf( $message, number_format_i18n( $deleted ) ) . '
';
} elseif ( isset( $_GET['enabled-auto-update'] ) ) {
$enabled = absint( $_GET['enabled-auto-update'] );
if ( 1 === $enabled ) {
@@ -402,7 +402,7 @@ if ( isset( $_GET['enabled'] ) ) {
/* translators: %s: Number of themes. */
$message = _n( '%s theme will be auto-updated.', '%s themes will be auto-updated.', $enabled );
}
- echo '
' . sprintf( $message, number_format_i18n( $enabled ) ) . '
';
+ echo '
' . sprintf( $message, number_format_i18n( $enabled ) ) . '
';
} elseif ( isset( $_GET['disabled-auto-update'] ) ) {
$disabled = absint( $_GET['disabled-auto-update'] );
if ( 1 === $disabled ) {
@@ -411,11 +411,11 @@ if ( isset( $_GET['enabled'] ) ) {
/* translators: %s: Number of themes. */
$message = _n( '%s theme will no longer be auto-updated.', '%s themes will no longer be auto-updated.', $disabled );
}
- echo '
' . sprintf( $message, number_format_i18n( $disabled ) ) . '
';
+ echo '
' . sprintf( $message, number_format_i18n( $disabled ) ) . '
';
} elseif ( isset( $_GET['error'] ) && 'none' === $_GET['error'] ) {
- echo '
' . __( 'No theme selected.' ) . '
';
+ echo '
' . __( 'No theme selected.' ) . '
';
} elseif ( isset( $_GET['error'] ) && 'main' === $_GET['error'] ) {
- echo '
' . __( 'You cannot delete a theme while it is active on the main site.' ) . '
';
+ echo '
' . __( 'You cannot delete a theme while it is active on the main site.' ) . '
';
}
?>
diff --git a/wp-admin/network/user-new.php b/wp-admin/network/user-new.php
index 17be4476dc..58ac472d9c 100644
--- a/wp-admin/network/user-new.php
+++ b/wp-admin/network/user-new.php
@@ -77,8 +77,8 @@ if ( isset( $_REQUEST['action'] ) && 'add-user' === $_REQUEST['action'] ) {
}
}
+$message = '';
if ( isset( $_GET['update'] ) ) {
- $messages = array();
if ( 'added' === $_GET['update'] ) {
$edit_link = '';
if ( isset( $_GET['user_id'] ) ) {
@@ -93,8 +93,6 @@ if ( isset( $_GET['update'] ) ) {
if ( $edit_link ) {
$message .= sprintf( '
%s', $edit_link, __( 'Edit user' ) );
}
-
- $messages[] = $message;
}
}
@@ -107,18 +105,16 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; ?>
';
- }
+if ( '' !== $message ) {
+ echo '
';
}
if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) {
?>
-
+
get_error_messages() as $message ) {
- echo "
$message
";
+ foreach ( $add_user_errors->get_error_messages() as $error ) {
+ echo "
$error
";
}
?>
diff --git a/wp-admin/network/users.php b/wp-admin/network/users.php
index 4fd00c3c6b..70964262f0 100644
--- a/wp-admin/network/users.php
+++ b/wp-admin/network/users.php
@@ -255,7 +255,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
if ( isset( $_REQUEST['updated'] ) && 'true' == $_REQUEST['updated'] && ! empty( $_REQUEST['action'] ) ) {
?>
-