Make WordPress Core

Changeset 12858


Ignore:
Timestamp:
01/26/2010 10:46:09 PM (17 years ago)
Author:
ryan
Message:

Deprecate is_main_blog() for is_main_site(). see #11644

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/ms.php

    r12842 r12858  
    726726        if ( !isset( $data[ 'post_name' ] ) || $data[ 'post_name' ] == '' )
    727727                return $data;
    728         if ( !is_main_blog() )
     728        if ( !is_main_site() )
    729729                return $data;
    730730
  • trunk/wp-includes/ms-deprecated.php

    r12848 r12858  
    118118}
    119119
     120/**
     121 * @deprecated 3.0
     122 */
     123function is_main_blog() {
     124        _deprecated_function( __FUNCTION__, '3.0', 'is_main_site' );
     125        return is_main_site();
     126}
     127
    120128?>
  • trunk/wp-includes/ms-functions.php

    r12855 r12858  
    7979                return $wpdb->get_results( $wpdb->prepare("SELECT u.ID, u.user_login, u.user_pass FROM $wpdb->users AS u, $wpdb->sitemeta AS sm WHERE sm.meta_key = 'admin_user_id' AND u.ID = sm.meta_value AND sm.site_id = %d", $site_id), ARRAY_A );
    8080
    81         return false;
    82 }
    83 
    84 function is_main_blog() {
    85         global $current_blog, $current_site;
    86         if ( $current_blog->domain == $current_site->domain && $current_blog->path == $current_site->path )
    87                 return true;
    8881        return false;
    8982}
    … …  
    18201813function maybe_redirect_404() {
    18211814        global $current_site;
    1822         if ( is_main_blog() && is_404() && defined( 'NOBLOGREDIRECT' ) && constant( 'NOBLOGREDIRECT' ) != '' ) {
     1815        if ( is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) && constant( 'NOBLOGREDIRECT' ) != '' ) {
    18231816                $destination = constant( 'NOBLOGREDIRECT' );
    18241817                if ( $destination == '%siteurl%' )
  • trunk/wp-includes/ms-settings.php

    r12787 r12858  
    6666                if ( defined( 'BLOGID_CURRENT_SITE' ) )
    6767                        $current_site->blog_id = BLOGID_CURRENT_SITE;
    68                 if ( DOMAIN_CURRENT_SITE == $domain ) 
     68                if ( DOMAIN_CURRENT_SITE == $domain )
    6969                        $current_site->cookie_domain = $cookie_domain;
    7070                elseif ( substr( $current_site->domain, 0, 4 ) == 'www.' )
    … …  
    7272                else
    7373                        $current_site->cookie_domain = $current_site->domain;
    74                        
     74
    7575                return $current_site;
    7676        }
Note: See TracChangeset for help on using the changeset viewer.