summaryrefslogtreecommitdiffstatshomepage
path: root/src/wp-includes/ms-functions.php
diff options
context:
space:
mode:
authorJeremy Felt <jeremyfelt@git.wordpress.org>2016-10-25 18:05:20 +0000
committerJeremy Felt <jeremyfelt@git.wordpress.org>2016-10-25 18:05:20 +0000
commit148d7790d7b178f04df190595fbfacdeb3db6842 (patch)
tree21c3682b4ea3be060b5774ebd7a85c3fdbda408d /src/wp-includes/ms-functions.php
parent764a31aaa94097561ed1b121d7759630e5743cd8 (diff)
downloadwordpress-148d7790d7b178f04df190595fbfacdeb3db6842.tar.gz
wordpress-148d7790d7b178f04df190595fbfacdeb3db6842.zip
Multisite: Replace `get_blog_details()` in `get_active_blog_for_user()` with `get_site()`.
Props flixos90. Fixes #38355. git-svn-id: https://develop.svn.wordpress.org/trunk@38914 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to 'src/wp-includes/ms-functions.php')
-rw-r--r--src/wp-includes/ms-functions.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wp-includes/ms-functions.php b/src/wp-includes/ms-functions.php
index 3c1911a537..5e32a86a04 100644
--- a/src/wp-includes/ms-functions.php
+++ b/src/wp-includes/ms-functions.php
@@ -53,9 +53,9 @@ function get_active_blog_for_user( $user_id ) {
if ( false !== $primary_blog ) {
if ( ! isset( $blogs[ $primary_blog ] ) ) {
update_user_meta( $user_id, 'primary_blog', $first_blog->userblog_id );
- $primary = get_blog_details( $first_blog->userblog_id );
+ $primary = get_site( $first_blog->userblog_id );
} else {
- $primary = get_blog_details( $primary_blog );
+ $primary = get_site( $primary_blog );
}
} else {
//TODO Review this call to add_user_to_blog too - to get here the user must have a role on this blog?
@@ -71,7 +71,7 @@ function get_active_blog_for_user( $user_id ) {
foreach ( (array) $blogs as $blog_id => $blog ) {
if ( $blog->site_id != $wpdb->siteid )
continue;
- $details = get_blog_details( $blog_id );
+ $details = get_site( $blog_id );
if ( is_object( $details ) && $details->archived == 0 && $details->spam == 0 && $details->deleted == 0 ) {
$ret = $blog;
if ( get_user_meta( $user_id , 'primary_blog', true ) != $blog_id )