From 390dc4b3452df1f12e254b73ca6ef00f07ce5f02 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Tue, 25 Oct 2016 05:49:29 +0000 Subject: [PATCH] Multisite: Replace `get_blog_details()` in `add_user_to_blog()` with `get_site()`. Adds tests for `add_user_to_blog()`. Props flixos90. Fixes #38356. Built from https://develop.svn.wordpress.org/trunk@38903 git-svn-id: http://core.svn.wordpress.org/trunk@38846 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-functions.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index 697da4b010..3c1911a537 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -161,8 +161,8 @@ function add_user_to_blog( $blog_id, $user_id, $role ) { if ( !get_user_meta($user_id, 'primary_blog', true) ) { update_user_meta($user_id, 'primary_blog', $blog_id); - $details = get_blog_details($blog_id); - update_user_meta($user_id, 'source_domain', $details->domain); + $site = get_site( $blog_id ); + update_user_meta( $user_id, 'source_domain', $site->domain ); } $user->set_role($role); diff --git a/wp-includes/version.php b/wp-includes/version.php index eb78c437bf..6830c52099 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38902'; +$wp_version = '4.7-alpha-38903'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.