From 64886517b9092e76b1336bff63bcd7a250ca3b99 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Wed, 19 Oct 2016 06:08:28 +0000 Subject: [PATCH] Multisite: Replace `get_blog_details()` with `get_site()` in network admin screens. Props iamfriendly. See #37102. Fixes #38349. Built from https://develop.svn.wordpress.org/trunk@38824 git-svn-id: http://core.svn.wordpress.org/trunk@38767 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/network/site-info.php | 6 +++--- wp-admin/network/site-settings.php | 2 +- wp-admin/network/site-themes.php | 2 +- wp-admin/network/site-users.php | 2 +- wp-admin/network/sites.php | 2 +- wp-includes/version.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/wp-admin/network/site-info.php b/wp-admin/network/site-info.php index 0379dc250d..d5d5ce4507 100644 --- a/wp-admin/network/site-info.php +++ b/wp-admin/network/site-info.php @@ -37,7 +37,7 @@ if ( ! $id ) { wp_die( __('Invalid site ID.') ); } -$details = get_blog_details( $id ); +$details = get_site( $id ); if ( ! $details ) { wp_die( __( 'The requested site does not exist.' ) ); } @@ -84,7 +84,7 @@ if ( isset( $_REQUEST['action'] ) && 'update-site' == $_REQUEST['action'] ) { $blog_data['path'] = $update_parsed_url['path']; } - $existing_details = get_blog_details( $id, false ); + $existing_details = get_site( $id ); $blog_data_checkboxes = array( 'public', 'archived', 'spam', 'mature', 'deleted' ); foreach ( $blog_data_checkboxes as $c ) { if ( ! in_array( $existing_details->$c, array( 0, 1 ) ) ) { @@ -97,7 +97,7 @@ if ( isset( $_REQUEST['action'] ) && 'update-site' == $_REQUEST['action'] ) { update_blog_details( $id, $blog_data ); // Maybe update home and siteurl options. - $new_details = get_blog_details( $id, false ); + $new_details = get_site( $id ); $old_home_url = trailingslashit( esc_url( get_option( 'home' ) ) ); $old_home_parsed = parse_url( $old_home_url ); diff --git a/wp-admin/network/site-settings.php b/wp-admin/network/site-settings.php index 478ba8b79c..9d13d307f2 100644 --- a/wp-admin/network/site-settings.php +++ b/wp-admin/network/site-settings.php @@ -35,7 +35,7 @@ $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0; if ( ! $id ) wp_die( __('Invalid site ID.') ); -$details = get_blog_details( $id ); +$details = get_site( $id ); if ( ! $details ) { wp_die( __( 'The requested site does not exist.' ) ); } diff --git a/wp-admin/network/site-themes.php b/wp-admin/network/site-themes.php index f4c8f1df48..a63eb90792 100644 --- a/wp-admin/network/site-themes.php +++ b/wp-admin/network/site-themes.php @@ -58,7 +58,7 @@ if ( ! $id ) $wp_list_table->prepare_items(); -$details = get_blog_details( $id ); +$details = get_site( $id ); if ( ! $details ) { wp_die( __( 'The requested site does not exist.' ) ); } diff --git a/wp-admin/network/site-users.php b/wp-admin/network/site-users.php index 70e097e25d..83432dce35 100644 --- a/wp-admin/network/site-users.php +++ b/wp-admin/network/site-users.php @@ -51,7 +51,7 @@ $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0; if ( ! $id ) wp_die( __('Invalid site ID.') ); -$details = get_blog_details( $id ); +$details = get_site( $id ); if ( ! $details ) { wp_die( __( 'The requested site does not exist.' ) ); } diff --git a/wp-admin/network/sites.php b/wp-admin/network/sites.php index c9cac56c27..4eca3b3d9d 100644 --- a/wp-admin/network/sites.php +++ b/wp-admin/network/sites.php @@ -91,7 +91,7 @@ if ( isset( $_GET['action'] ) ) { wp_die( __( 'Sorry, you are not allowed to change the current site.' ) ); } - $site_details = get_blog_details( $id ); + $site_details = get_site( $id ); $site_address = untrailingslashit( $site_details->domain . $site_details->path ); require_once( ABSPATH . 'wp-admin/admin-header.php' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 9dc62fe7a1..94e2a28a91 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38823'; +$wp_version = '4.7-alpha-38824'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.