diff --git a/wp-admin/network/sites.php b/wp-admin/network/sites.php index f72711550b..e14e9105ad 100644 --- a/wp-admin/network/sites.php +++ b/wp-admin/network/sites.php @@ -102,7 +102,7 @@ if ( isset( $_GET['action'] ) ) { header( 'Content-Type: text/html; charset=utf-8' ); } - if ( get_network()->site_id == $id ) { + if ( is_main_site( $id ) ) { wp_die( __( 'Sorry, you are not allowed to change the current site.' ) ); } @@ -142,7 +142,7 @@ if ( isset( $_GET['action'] ) ) { } $updated_action = 'not_deleted'; - if ( '0' != $id && get_network()->site_id != $id && current_user_can( 'delete_site', $id ) ) { + if ( '0' != $id && ! is_main_site( $id ) && current_user_can( 'delete_site', $id ) ) { wpmu_delete_blog( $id, true ); $updated_action = 'delete'; } @@ -154,7 +154,7 @@ if ( isset( $_GET['action'] ) ) { foreach ( (array) $_POST['site_ids'] as $site_id ) { $site_id = (int) $site_id; - if ( get_network()->site_id == $site_id ) { + if ( is_main_site( $site_id ) ) { continue; } @@ -182,7 +182,7 @@ if ( isset( $_GET['action'] ) ) { $doaction = $_POST['action']; foreach ( (array) $_POST['allblogs'] as $key => $val ) { - if ( '0' != $val && get_network()->site_id != $val ) { + if ( '0' != $val && ! is_main_site( $val ) ) { switch ( $doaction ) { case 'delete': require_once ABSPATH . 'wp-admin/admin-header.php'; diff --git a/wp-admin/network/users.php b/wp-admin/network/users.php index 70964262f0..8d64d5c79b 100644 --- a/wp-admin/network/users.php +++ b/wp-admin/network/users.php @@ -94,7 +94,7 @@ if ( isset( $_GET['action'] ) ) { $blogs = get_blogs_of_user( $user_id, true ); foreach ( (array) $blogs as $details ) { - if ( get_network()->site_id != $details->userblog_id ) { // Main blog is not a spam! + if ( ! is_main_site( $details->userblog_id ) ) { // Main site is not a spam! update_blog_status( $details->userblog_id, 'spam', '1' ); } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 51135f0861..5804db9278 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55671'; +$wp_version = '6.3-alpha-55672'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.