Make WordPress Core


Ignore:
Timestamp:
10/04/2012 12:40:09 PM (12 years ago)
Author:
ryan
Message:

Reduce use of global. Use get_blog_details() instead. fixes #22090

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r22106 r22108  
    31193119 */
    31203120function is_main_site( $blog_id = '' ) {
    3121     global $current_site, $current_blog;
    3122 
    3123     if ( !is_multisite() )
     3121    global $current_site;
     3122
     3123    if ( ! is_multisite() )
    31243124        return true;
    31253125
    3126     if ( !$blog_id )
    3127         $blog_id = $current_blog->blog_id;
     3126    if ( ! $blog_id )
     3127        $blog_id = get_current_blog_id();
    31283128
    31293129    return $blog_id == $current_site->blog_id;
Note: See TracChangeset for help on using the changeset viewer.