Use get_current_site() instead of the $current_site global when possible.

props jeremyfelt.
fixes #25158.

git-svn-id: https://develop.svn.wordpress.org/trunk@26120 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2013-11-13 03:22:48 +00:00
parent f13e9a6796
commit 39d55fddb8
16 changed files with 54 additions and 58 deletions

View File

@@ -459,7 +459,6 @@ class wp_xmlrpc_server extends IXR_Server {
* - 'xmlrpc' - url of xmlrpc endpoint
*/
function wp_getUsersBlogs( $args ) {
global $current_site;
// If this isn't on WPMU then just use blogger_getUsersBlogs
if ( !is_multisite() ) {
array_unshift( $args, 1 );
@@ -481,7 +480,7 @@ class wp_xmlrpc_server extends IXR_Server {
foreach ( $blogs as $blog ) {
// Don't include blogs that aren't hosted at this site
if ( $blog->site_id != $current_site->id )
if ( $blog->site_id != get_current_site()->id )
continue;
$blog_id = $blog->userblog_id;