/** 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 );
$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' );
}
}
+ 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' );
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
- '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Users_Screen" target="_blank">Documentation on Network Users</a>') . '</p>' .
- '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
+ '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin_Users_Screen">Documentation on Network Users</a>') . '</p>' .
+ '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
);
get_current_screen()->set_screen_reader_content( array(