X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/af50974463450c98503e763a7836a50e260461a9..dc1231b7312fbdca99e9e887cc2bb35a28f85cdc:/wp-admin/network/site-users.php diff --git a/wp-admin/network/site-users.php b/wp-admin/network/site-users.php index b5a6ab72..6920cb1d 100644 --- a/wp-admin/network/site-users.php +++ b/wp-admin/network/site-users.php @@ -32,7 +32,7 @@ get_current_screen()->add_help_tab( array( get_current_screen()->set_help_sidebar( '

' . __('For more information:') . '

' . - '

' . __('Documentation on Site Management') . '

' . + '

' . __('Documentation on Site Management') . '

' . '

' . __('Support Forums') . '

' ); @@ -49,8 +49,12 @@ if ( ! $id ) wp_die( __('Invalid site ID.') ); $details = get_blog_details( $id ); +if ( ! $details ) { + wp_die( __( 'The requested site does not exist.' ) ); +} + if ( ! can_edit_network( $details->site_id ) ) - wp_die( __( 'You do not have permission to access this page.' ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); $is_main_site = is_main_site( $id ); @@ -70,10 +74,10 @@ if ( $action ) { $password = wp_generate_password( 12, false); $user_id = wpmu_create_user( esc_html( strtolower( $user['username'] ) ), $password, esc_html( $user['email'] ) ); - if ( false == $user_id ) { + if ( false === $user_id ) { $update = 'err_new_dup'; } else { - wp_new_user_notification( $user_id, $password ); + wp_new_user_notification( $user_id, null, 'both' ); add_user_to_blog( $id, $user_id, $_POST['new_role'] ); $update = 'newuser'; } @@ -155,11 +159,9 @@ if ( isset( $_GET['action'] ) && 'update-site' == $_GET['action'] ) { exit(); } -add_screen_option( 'per_page', array( 'label' => _x( 'Users', 'users per page (screen options)' ) ) ); +add_screen_option( 'per_page' ); -$site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $id ) ); -$title_site_url_linked = sprintf( __('Edit Site: %2$s'), get_blogaddress_by_id( $id ), $site_url_no_http ); -$title = sprintf( __('Edit Site: %s'), $site_url_no_http ); +$title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) ); $parent_file = 'sites.php'; $submenu_file = 'sites.php'; @@ -177,14 +179,13 @@ if ( ! wp_is_large_network( 'users' ) && apply_filters( 'show_network_site_users require( ABSPATH . 'wp-admin/admin-header.php' ); ?>
-

+

+

|