diff --git a/src/wp-admin/network.php b/src/wp-admin/network.php
index 53cfe450eb..10453145bf 100644
--- a/src/wp-admin/network.php
+++ b/src/wp-admin/network.php
@@ -223,11 +223,19 @@ function network_step1( $errors = false ) {
diff --git a/src/wp-admin/network/site-new.php b/src/wp-admin/network/site-new.php
index e194e8d3f9..4aebcf0272 100644
--- a/src/wp-admin/network/site-new.php
+++ b/src/wp-admin/network/site-new.php
@@ -85,13 +85,21 @@ if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
$wpdb->hide_errors();
$id = wpmu_create_blog( $newdomain, $path, $title, $user_id , array( 'public' => 1 ), $current_site->id );
$wpdb->show_errors();
- if ( !is_wp_error( $id ) ) {
- if ( !is_super_admin( $user_id ) && !get_user_option( 'primary_blog', $user_id ) )
+ if ( ! is_wp_error( $id ) ) {
+ if ( ! is_super_admin( $user_id ) && !get_user_option( 'primary_blog', $user_id ) ) {
update_user_option( $user_id, 'primary_blog', $id, true );
- $content_mail = sprintf( __( 'New site created by %1$s
+ }
+
+ $content_mail = sprintf(
+ /* translators: 1: user login, 2: site url, 3: site name/title */
+ __( 'New site created by %1$s
Address: %2$s
-Name: %3$s' ), $current_user->user_login , get_site_url( $id ), wp_unslash( $title ) );
+Name: %3$s' ),
+ $current_user->user_login,
+ get_site_url( $id ),
+ wp_unslash( $title )
+ );
wp_mail( get_site_option('admin_email'), sprintf( __( '[%s] New Site Created' ), $current_site->site_name ), $content_mail, 'From: "Site Admin" <' . get_site_option( 'admin_email' ) . '>' );
wpmu_welcome_notification( $id, $user_id, $password, $title, array( 'public' => 1 ) );
wp_redirect( add_query_arg( array( 'update' => 'added', 'id' => $id ), 'site-new.php' ) );
@@ -104,7 +112,12 @@ Name: %3$s' ), $current_user->user_login , get_site_url( $id ), wp_unslash( $tit
if ( isset($_GET['update']) ) {
$messages = array();
if ( 'added' == $_GET['update'] )
- $messages[] = sprintf( __( 'Site added. Visit Dashboard or Edit Site ' ), esc_url( get_admin_url( absint( $_GET['id'] ) ) ), network_admin_url( 'site-info.php?id=' . absint( $_GET['id'] ) ) );
+ $messages[] = sprintf(
+ /* translators: 1: dashboard url, 2: network admin edit url */
+ __( 'Site added. Visit Dashboard or Edit Site ' ),
+ esc_url( get_admin_url( absint( $_GET['id'] ) ) ),
+ network_admin_url( 'site-info.php?id=' . absint( $_GET['id'] ) )
+ );
}
$title = __('Add New Site');
diff --git a/src/wp-admin/network/upgrade.php b/src/wp-admin/network/upgrade.php
index 5bb997dd39..719faad340 100644
--- a/src/wp-admin/network/upgrade.php
+++ b/src/wp-admin/network/upgrade.php
@@ -63,10 +63,19 @@ switch ( $action ) {
$siteurl = site_url();
$upgrade_url = admin_url( 'upgrade.php?step=upgrade_db' );
restore_current_blog();
+
echo "$siteurl ";
+
$response = wp_remote_get( $upgrade_url, array( 'timeout' => 120, 'httpversion' => '1.1' ) );
- if ( is_wp_error( $response ) )
- wp_die( sprintf( __( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: %2$s ' ), $siteurl, $response->get_error_message() ) );
+ if ( is_wp_error( $response ) ) {
+ wp_die( sprintf(
+ /* translators: 1: site url, 2: server error message */
+ __( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: %2$s' ),
+ $siteurl,
+ '' . $response->get_error_message() . ' '
+ ) );
+ }
+
/**
* Fires after the Multisite DB upgrade for each site is complete.
*
diff --git a/src/wp-admin/network/users.php b/src/wp-admin/network/users.php
index 23871f6e79..bc9eddf450 100644
--- a/src/wp-admin/network/users.php
+++ b/src/wp-admin/network/users.php
@@ -57,7 +57,11 @@ function confirm_delete_users( $users ) {
if ( ! empty( $blogs ) ) {
?>
- ' . $delete_user->user_login . '' ); ?>
+ ' . $delete_user->user_login . ''
+ ); ?>
$details ) {
$blog_users = get_users( array( 'blog_id' => $details->userblog_id, 'fields' => array( 'ID', 'user_login' ) ) );