X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/607b7e02d77e7326161e8ec15639052d2040f745..HEAD:/wp-admin/network/users.php diff --git a/wp-admin/network/users.php b/wp-admin/network/users.php index cc3edc2c..90ece927 100644 --- a/wp-admin/network/users.php +++ b/wp-admin/network/users.php @@ -10,9 +10,6 @@ /** Load WordPress Administration Bootstrap */ require_once( dirname( __FILE__ ) . '/admin.php' ); -if ( ! is_multisite() ) - wp_die( __( 'Multisite support is not enabled.' ) ); - if ( ! current_user_can( 'manage_network_users' ) ) wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); @@ -75,7 +72,7 @@ if ( isset( $_GET['action'] ) ) { $userfunction = 'all_spam'; $blogs = get_blogs_of_user( $user_id, true ); foreach ( (array) $blogs as $details ) { - if ( $details->userblog_id != $current_site->blog_id ) // main blog not a spam ! + if ( $details->userblog_id != get_network()->site_id ) // main blog not a spam ! update_blog_status( $details->userblog_id, 'spam', '1' ); } update_user_status( $user_id, 'spam', '1' ); @@ -93,6 +90,17 @@ if ( isset( $_GET['action'] ) ) { } } + if ( ! in_array( $doaction, array( 'delete', 'spam', 'notspam' ), true ) ) { + $sendback = wp_get_referer(); + + $user_ids = (array) $_POST['allusers']; + /** This action is documented in wp-admin/network/site-themes.php */ + $sendback = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $user_ids ); + + wp_safe_redirect( $sendback ); + exit(); + } + wp_safe_redirect( add_query_arg( array( 'updated' => 'true', 'action' => $userfunction ), wp_get_referer() ) ); } else { $location = network_admin_url( 'users.php' ); @@ -168,8 +176,8 @@ get_current_screen()->add_help_tab( array( get_current_screen()->set_help_sidebar( '

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

' . - '

' . __('Documentation on Network Users') . '

' . - '

' . __('Support Forums') . '

' + '

' . __('Documentation on Network Users') . '

' . + '

' . __('Support Forums') . '

' ); get_current_screen()->set_screen_reader_content( array(