Multisite: Replace `get_blog_details()` with `get_site()` in `is_user_member_of_blog()`.

Props flixos90.
Fixes #38358.

Built from https://develop.svn.wordpress.org/trunk@38905


git-svn-id: http://core.svn.wordpress.org/trunk@38848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Jeremy Felt 2016-10-25 06:02:35 +00:00
parent 6e1c166dfb
commit 6a0ca394e8
2 changed files with 3 additions and 3 deletions

View File

@ -703,7 +703,7 @@ function is_user_member_of_blog( $user_id = 0, $blog_id = 0 ) {
$user_id = get_current_user_id(); $user_id = get_current_user_id();
} }
// Technically not needed, but does save calls to get_blog_details and get_user_meta // Technically not needed, but does save calls to get_site and get_user_meta
// in the event that the function is called when a user isn't logged in // in the event that the function is called when a user isn't logged in
if ( empty( $user_id ) ) { if ( empty( $user_id ) ) {
return false; return false;
@ -722,7 +722,7 @@ function is_user_member_of_blog( $user_id = 0, $blog_id = 0 ) {
$blog_id = get_current_blog_id(); $blog_id = get_current_blog_id();
} }
$blog = get_blog_details( $blog_id ); $blog = get_site( $blog_id );
if ( ! $blog || ! isset( $blog->domain ) || $blog->archived || $blog->spam || $blog->deleted ) { if ( ! $blog || ! isset( $blog->domain ) || $blog->archived || $blog->spam || $blog->deleted ) {
return false; return false;

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.7-alpha-38904'; $wp_version = '4.7-alpha-38905';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.