diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index c328781edc..ca0a5e79dd 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -177,72 +177,6 @@ function wpmu_delete_user( $id ) { return true; } -function confirm_delete_users( $users ) { - $current_user = wp_get_current_user(); - if ( !is_array( $users ) ) - return false; - - screen_icon(); - ?> -

-

-
- - ID'>$current_user->user_login"; - - foreach ( ( $allusers = (array) $_POST['allusers'] ) as $key => $val ) { - if ( $val != '' && $val != '0' ) { - $delete_user = new WP_User( $val ); - - if ( in_array( $delete_user->user_login, $site_admins ) ) - wp_die( sprintf( __( 'Warning! User cannot be deleted. The user %s is a network admnistrator.' ), $delete_user->user_login ) ); - - echo "\n"; - $blogs = get_blogs_of_user( $val, true ); - - if ( !empty( $blogs ) ) { - ?> -

%s?" ), $delete_user->user_login ); ?>

- $details ) { - $blog_users = get_users_of_blog( $details->userblog_id ); - if ( is_array( $blog_users ) && !empty( $blog_users ) ) { - $user_site = "{$details->blogname}"; - $user_dropdown = "\n"; - ?> - - "; - } - } - } - ?> -

- - +

+

+
+ + ID'>$current_user->user_login"; + + foreach ( ( $allusers = (array) $_POST['allusers'] ) as $key => $val ) { + if ( $val != '' && $val != '0' ) { + $delete_user = new WP_User( $val ); + + if ( in_array( $delete_user->user_login, $site_admins ) ) + wp_die( sprintf( __( 'Warning! User cannot be deleted. The user %s is a network admnistrator.' ), $delete_user->user_login ) ); + + echo "\n"; + $blogs = get_blogs_of_user( $val, true ); + + if ( !empty( $blogs ) ) { + ?> +

%s?" ), $delete_user->user_login ); ?>

+ $details ) { + $blog_users = get_users_of_blog( $details->userblog_id ); + if ( is_array( $blog_users ) && !empty( $blog_users ) ) { + $user_site = "{$details->blogname}"; + $user_dropdown = "\n"; + ?> +
    +
  • +
  • +
  • +
+ "; + } + } + } + ?> +

+ + options page.', esc_url( admin_url( 'ms-options.php' ) ) ) ) ); + wp_die( sprintf( __( 'You probably need to go back to the options page.', esc_url( admin_url( 'settings.php' ) ) ) ) ); if ( isset($_POST['WPLANG']) && ( '' === $_POST['WPLANG'] || in_array( $_POST['WPLANG'], get_available_languages() ) ) ) update_site_option( 'WPLANG', $_POST['WPLANG'] ); @@ -133,7 +199,7 @@ switch ( $_GET['action'] ) { // Update more options here do_action( 'update_wpmu_options' ); - wp_redirect( add_query_arg( 'updated', 'true', admin_url( 'ms-options.php' ) ) ); + wp_redirect( add_query_arg( 'updated', 'true', admin_url( 'settings.php' ) ) ); exit(); break; case 'addblog': @@ -208,7 +274,7 @@ switch ( $_GET['action'] ) { wp_die( __( 'You do not have permission to access this page.' ) ); if ( empty( $_POST ) ) - wp_die( sprintf( __( 'You probably need to go back to the sites page', esc_url( admin_url( 'ms-sites.php' ) ) ) ) ); + wp_die( sprintf( __( 'You probably need to go back to the sites page', esc_url( network_admin_url( 'sites.php' ) ) ) ) ); switch_to_blog( $id ); @@ -367,7 +433,7 @@ switch ( $_GET['action'] ) { wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => $blogfunction ), wp_get_referer() ) ); exit(); } else { - wp_redirect( admin_url( 'ms-sites.php' ) ); + wp_redirect( network_admin_url( 'sites.php' ) ); } break; @@ -476,7 +542,7 @@ switch ( $_GET['action'] ) {

WordPress

-
+ @@ -499,15 +565,15 @@ switch ( $_GET['action'] ) { if ( $id != '0' && $id != '1' ) { $_POST['allusers'] = array( $id ); // confirm_delete_users() can only handle with arrays $title = __( 'Users' ); - $parent_file = 'ms-admin.php'; - require_once( 'admin-header.php' ); + $parent_file = 'users.php'; + require_once( '../admin-header.php' ); echo '
'; confirm_delete_users( $_POST['allusers'] ); echo '
'; - require_once( 'admin-footer.php' ); + require_once( '../admin-footer.php' ); exit(); } else { - wp_redirect( admin_url( 'ms-users.php' ) ); + wp_redirect( network_admin_url( 'users.php' ) ); } break; @@ -526,12 +592,12 @@ switch ( $_GET['action'] ) { switch ( $doaction ) { case 'delete': $title = __( 'Users' ); - $parent_file = 'ms-admin.php'; - require_once( 'admin-header.php' ); + $parent_file = 'users.php'; + require_once( '../admin-header.php' ); echo '
'; confirm_delete_users( $_POST['allusers'] ); echo '
'; - require_once( 'admin-footer.php' ); + require_once( '../admin-footer.php' ); exit(); break; @@ -564,7 +630,7 @@ switch ( $_GET['action'] ) { wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => $userfunction ), wp_get_referer() ) ); exit(); } else { - wp_redirect( admin_url( 'ms-users.php' ) ); + wp_redirect( network_admin_url( 'users.php' ) ); } break; @@ -595,7 +661,7 @@ switch ( $_GET['action'] ) { else $deletefunction = 'all_delete'; - wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => $deletefunction ), admin_url( 'ms-users.php' ) ) ); + wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => $deletefunction ), network_admin_url( 'users.php' ) ) ); break; case 'adduser': @@ -631,7 +697,7 @@ switch ( $_GET['action'] ) { break; default: - wp_redirect( admin_url( 'ms-admin.php' ) ); + wp_redirect( network_admin_url( 'index.php' ) ); break; } ?>