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

git-svn-id: https://develop.svn.wordpress.org/trunk@12858 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-01-26 22:46:09 +00:00
parent b6feb64ea4
commit 909191a37d
4 changed files with 12 additions and 11 deletions

View File

@ -725,7 +725,7 @@ function avoid_blog_page_permalink_collision( $data, $postarr ) {
return $data;
if ( !isset( $data[ 'post_name' ] ) || $data[ 'post_name' ] == '' )
return $data;
if ( !is_main_blog() )
if ( !is_main_site() )
return $data;
$post_name = $data[ 'post_name' ];

View File

@ -117,4 +117,12 @@ function clear_global_post_cache( $post_id ) {
_deprecated_function( __FUNCTION__, '3.0', 'clean_post_cache' );
}
/**
* @deprecated 3.0
*/
function is_main_blog() {
_deprecated_function( __FUNCTION__, '3.0', 'is_main_site' );
return is_main_site();
}
?>

View File

@ -81,13 +81,6 @@ function get_admin_users_for_domain( $sitedomain = '', $path = '' ) {
return false;
}
function is_main_blog() {
global $current_blog, $current_site;
if ( $current_blog->domain == $current_site->domain && $current_blog->path == $current_site->path )
return true;
return false;
}
function get_id_from_blogname( $name ) {
global $wpdb, $current_site;
$blog_id = wp_cache_get( "get_id_from_blogname_" . $name, 'blog-details' );
@ -1819,7 +1812,7 @@ function signup_nonce_check( $result ) {
function maybe_redirect_404() {
global $current_site;
if ( is_main_blog() && is_404() && defined( 'NOBLOGREDIRECT' ) && constant( 'NOBLOGREDIRECT' ) != '' ) {
if ( is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) && constant( 'NOBLOGREDIRECT' ) != '' ) {
$destination = constant( 'NOBLOGREDIRECT' );
if ( $destination == '%siteurl%' )
$destination = $current_site->domain . $current_site->path;

View File

@ -65,13 +65,13 @@ function wpmu_current_site() {
$current_site->path = $path = PATH_CURRENT_SITE;
if ( defined( 'BLOGID_CURRENT_SITE' ) )
$current_site->blog_id = BLOGID_CURRENT_SITE;
if ( DOMAIN_CURRENT_SITE == $domain )
if ( DOMAIN_CURRENT_SITE == $domain )
$current_site->cookie_domain = $cookie_domain;
elseif ( substr( $current_site->domain, 0, 4 ) == 'www.' )
$current_site->cookie_domain = substr( $current_site->domain, 4 );
else
$current_site->cookie_domain = $current_site->domain;
return $current_site;
}