diff --git a/src/wp-admin/network/index.php b/src/wp-admin/network/index.php index 16c77498f8..70f6bbf5fb 100644 --- a/src/wp-admin/network/index.php +++ b/src/wp-admin/network/index.php @@ -17,7 +17,7 @@ if ( !is_multisite() ) wp_die( __( 'Multisite support is not enabled.' ) ); if ( ! current_user_can( 'manage_network' ) ) - wp_die( __( 'You do not have permission to access this page.' ), '', array( 'response' => 403 ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); $title = __( 'Dashboard' ); $parent_file = 'index.php'; diff --git a/src/wp-admin/network/settings.php b/src/wp-admin/network/settings.php index 3a4aca3307..f3ef480056 100644 --- a/src/wp-admin/network/settings.php +++ b/src/wp-admin/network/settings.php @@ -17,7 +17,7 @@ if ( ! is_multisite() ) wp_die( __( 'Multisite support is not enabled.' ) ); if ( ! current_user_can( 'manage_network_options' ) ) - wp_die( __( 'You do not have permission to access this page.' ), '', array( 'response' => 403 ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); $title = __( 'Network Settings' ); $parent_file = 'settings.php'; diff --git a/src/wp-admin/network/site-info.php b/src/wp-admin/network/site-info.php index 8e83f86691..87ca256378 100644 --- a/src/wp-admin/network/site-info.php +++ b/src/wp-admin/network/site-info.php @@ -40,7 +40,7 @@ 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.' ), '', array( 'response' => 403 ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); $parsed = parse_url( $details->siteurl ); $is_main_site = is_main_site( $id ); diff --git a/src/wp-admin/network/site-settings.php b/src/wp-admin/network/site-settings.php index 1e9b641848..ecf8a12a22 100644 --- a/src/wp-admin/network/site-settings.php +++ b/src/wp-admin/network/site-settings.php @@ -40,7 +40,7 @@ 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.' ), '', array( 'response' => 403 ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); $is_main_site = is_main_site( $id ); diff --git a/src/wp-admin/network/site-themes.php b/src/wp-admin/network/site-themes.php index d88ffb7370..384f58c64e 100644 --- a/src/wp-admin/network/site-themes.php +++ b/src/wp-admin/network/site-themes.php @@ -57,7 +57,7 @@ $wp_list_table->prepare_items(); $details = get_blog_details( $id ); if ( !can_edit_network( $details->site_id ) ) - wp_die( __( 'You do not have permission to access this page.' ), '', array( 'response' => 403 ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); $is_main_site = is_main_site( $id ); diff --git a/src/wp-admin/network/site-users.php b/src/wp-admin/network/site-users.php index d9dce85b1c..57a189b7ae 100644 --- a/src/wp-admin/network/site-users.php +++ b/src/wp-admin/network/site-users.php @@ -50,7 +50,7 @@ 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.' ), '', array( 'response' => 403 ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); $is_main_site = is_main_site( $id ); diff --git a/src/wp-admin/network/sites.php b/src/wp-admin/network/sites.php index ea115e1840..922ce76532 100644 --- a/src/wp-admin/network/sites.php +++ b/src/wp-admin/network/sites.php @@ -14,7 +14,7 @@ if ( ! is_multisite() ) wp_die( __( 'Multisite support is not enabled.' ) ); if ( ! current_user_can( 'manage_sites' ) ) - wp_die( __( 'You do not have permission to access this page.' ), '', array( 'response' => 403 ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); $wp_list_table = _get_list_table( 'WP_MS_Sites_List_Table' ); $pagenum = $wp_list_table->get_pagenum(); diff --git a/src/wp-admin/network/upgrade.php b/src/wp-admin/network/upgrade.php index d860e66aba..f1574aeabb 100644 --- a/src/wp-admin/network/upgrade.php +++ b/src/wp-admin/network/upgrade.php @@ -36,7 +36,7 @@ get_current_screen()->set_help_sidebar( require_once( ABSPATH . 'wp-admin/admin-header.php' ); if ( ! current_user_can( 'manage_network' ) ) - wp_die( __( 'You do not have permission to access this page.' ), '', array( 'response' => 403 ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); echo '
'; echo '

' . __( 'Upgrade Network' ) . '

'; diff --git a/src/wp-admin/network/user-new.php b/src/wp-admin/network/user-new.php index 54664dffc0..b47e74cc12 100644 --- a/src/wp-admin/network/user-new.php +++ b/src/wp-admin/network/user-new.php @@ -32,8 +32,9 @@ get_current_screen()->set_help_sidebar( if ( isset($_REQUEST['action']) && 'add-user' == $_REQUEST['action'] ) { check_admin_referer( 'add-user', '_wpnonce_add-user' ); + if ( ! current_user_can( 'manage_network_users' ) ) - wp_die( __( 'You do not have permission to access this page.' ), '', array( 'response' => 403 ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); if ( ! is_array( $_POST['user'] ) ) wp_die( __( 'Cannot create an empty user.' ) ); diff --git a/src/wp-admin/network/users.php b/src/wp-admin/network/users.php index 75ed276524..c900b825ce 100644 --- a/src/wp-admin/network/users.php +++ b/src/wp-admin/network/users.php @@ -14,7 +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.' ), '', array( 'response' => 403 ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); function confirm_delete_users( $users ) { $current_user = wp_get_current_user(); @@ -127,7 +127,7 @@ if ( isset( $_GET['action'] ) ) { switch ( $_GET['action'] ) { case 'deleteuser': if ( ! current_user_can( 'manage_network_users' ) ) - wp_die( __( 'You do not have permission to access this page.' ), '', array( 'response' => 403 ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); check_admin_referer( 'deleteuser' ); @@ -148,7 +148,7 @@ if ( isset( $_GET['action'] ) ) { case 'allusers': if ( !current_user_can( 'manage_network_users' ) ) - wp_die( __( 'You do not have permission to access this page.' ), '', array( 'response' => 403 ) ); + 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' ); @@ -161,7 +161,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.' ), '', array( 'response' => 403 ) ); + 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' ); @@ -210,7 +210,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.' ), '', array( 'response' => 403 ) ); + 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 ) {