X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/af50974463450c98503e763a7836a50e260461a9..refs/tags/wordpress-4.5:/wp-admin/network/users.php diff --git a/wp-admin/network/users.php b/wp-admin/network/users.php index 86a4d74d..4e56ca33 100644 --- a/wp-admin/network/users.php +++ b/wp-admin/network/users.php @@ -14,78 +14,7 @@ if ( ! is_multisite() ) wp_die( __( 'Multisite support is not enabled.' ) ); if ( ! current_user_can( 'manage_network_users' ) ) - wp_die( __( 'You do not have permission to access this page.' ) ); - -function confirm_delete_users( $users ) { - $current_user = wp_get_current_user(); - if ( !is_array( $users ) ) - return false; - ?> -
- - - '; confirm_delete_users( $_POST['allusers'] ); echo ''; - require_once( ABSPATH . 'wp-admin/admin-footer.php' ); - } else { + require_once( ABSPATH . 'wp-admin/admin-footer.php' ); + } else { wp_redirect( network_admin_url( 'users.php' ) ); } exit(); case 'allusers': if ( !current_user_can( 'manage_network_users' ) ) - wp_die( __( 'You do not have permission to access this page.' ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); if ( ( isset( $_POST['action']) || isset($_POST['action2'] ) ) && isset( $_POST['allusers'] ) ) { check_admin_referer( 'bulk-users-network' ); @@ -128,7 +57,7 @@ if ( isset( $_GET['action'] ) ) { switch ( $doaction ) { case 'delete': if ( ! current_user_can( 'delete_users' ) ) - wp_die( __( 'You do not have permission to access this page.' ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); $title = __( 'Users' ); $parent_file = 'users.php'; require_once( ABSPATH . 'wp-admin/admin-header.php' ); @@ -177,7 +106,7 @@ if ( isset( $_GET['action'] ) ) { case 'dodelete': check_admin_referer( 'ms-users-delete' ); if ( ! ( current_user_can( 'manage_network_users' ) && current_user_can( 'delete_users' ) ) ) - wp_die( __( 'You do not have permission to access this page.' ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); if ( ! empty( $_POST['blog'] ) && is_array( $_POST['blog'] ) ) { foreach ( $_POST['blog'] as $id => $users ) { @@ -194,7 +123,7 @@ if ( isset( $_GET['action'] ) ) { } $i = 0; if ( is_array( $_POST['user'] ) && ! empty( $_POST['user'] ) ) - foreach( $_POST['user'] as $id ) { + foreach ( $_POST['user'] as $id ) { if ( ! current_user_can( 'delete_user', $id ) ) continue; wpmu_delete_user( $id ); @@ -223,7 +152,7 @@ if ( $pagenum > $total_pages && $total_pages > 0 ) { $title = __( 'Users' ); $parent_file = 'users.php'; -add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) ); +add_screen_option( 'per_page' ); get_current_screen()->add_help_tab( array( 'id' => 'overview', @@ -239,15 +168,21 @@ get_current_screen()->add_help_tab( array( get_current_screen()->set_help_sidebar( '' . __('For more information:') . '
' . - '' . __('Documentation on Network Users') . '
' . + '' . __('Documentation on Network Users') . '
' . '' . __('Support Forums') . '
' ); +get_current_screen()->set_screen_reader_content( array( + 'heading_views' => __( 'Filter users list' ), + 'heading_pagination' => __( 'Users list navigation' ), + 'heading_list' => __( 'Users list' ), +) ); + require_once( ABSPATH . 'wp-admin/admin-header.php' ); if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty( $_REQUEST['action'] ) ) { ?> -