X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/61343b82c4f0da4c68e4c6373daafff4a81efdd1..38ac4bc40322ecdc4052db4263466573e01fa51f:/wp-admin/network/site-users.php diff --git a/wp-admin/network/site-users.php b/wp-admin/network/site-users.php index 0c7a1c72..57a189b7 100644 --- a/wp-admin/network/site-users.php +++ b/wp-admin/network/site-users.php @@ -8,7 +8,7 @@ */ /** Load WordPress Administration Bootstrap */ -require_once( './admin.php' ); +require_once( dirname( __FILE__ ) . '/admin.php' ); if ( ! is_multisite() ) wp_die( __( 'Multisite support is not enabled.' ) ); @@ -32,13 +32,17 @@ get_current_screen()->add_help_tab( array( get_current_screen()->set_help_sidebar( '

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

' . - '

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

' . - '

' . __('Support Forums') . '

' + '

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

' . + '

' . __('Support Forums') . '

' ); $_SERVER['REQUEST_URI'] = remove_query_arg( 'update', $_SERVER['REQUEST_URI'] ); $referer = remove_query_arg( 'update', wp_get_referer() ); +if ( ! empty( $_REQUEST['paged'] ) ) { + $referer = add_query_arg( 'paged', (int) $_REQUEST['paged'], $referer ); +} + $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0; if ( ! $id ) @@ -46,16 +50,12 @@ if ( ! $id ) $details = get_blog_details( $id ); 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 ); switch_to_blog( $id ); -$editblog_roles = $wp_roles->roles; - -$default_role = get_option( 'default_role' ); - $action = $wp_list_table->current_action(); if ( $action ) { @@ -133,7 +133,7 @@ if ( $action ) { // If the user doesn't already belong to the blog, bail. if ( !is_user_member_of_blog( $user_id ) ) - wp_die(__('Cheatin’ uh?')); + wp_die( __( 'Cheatin’ uh?' ), 403 ); $user = get_userdata( $user_id ); $user->set_role( $_REQUEST['new_role'] ); @@ -155,29 +155,33 @@ 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_site_url_linked = sprintf( __( 'Edit Site: %s' ), '' . $site_url_no_http . '' ); +$title = sprintf( __( 'Edit Site: %s' ), $site_url_no_http ); $parent_file = 'sites.php'; $submenu_file = 'sites.php'; +/** + * Filter whether to show the Add Existing User form on the Multisite Users screen. + * + * @since 3.1.0 + * + * @param bool $bool Whether to show the Add Existing User form. Default true. + */ if ( ! wp_is_large_network( 'users' ) && apply_filters( 'show_network_site_users_add_existing_form', true ) ) wp_enqueue_script( 'user-suggest' ); -require('../admin-header.php'); ?> +require( ABSPATH . 'wp-admin/admin-header.php' ); ?> -
-

- + - - +
@@ -272,29 +277,31 @@ endif; ?>
- +

- - + + - - + + - - + @@ -307,4 +314,4 @@ endif; ?>