Deprecate is_main_blog() for is_main_site(). see #11644
git-svn-id: http://svn.automattic.com/wordpress/trunk@12858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
70940e965c
commit
cd57004569
|
@ -725,7 +725,7 @@ function avoid_blog_page_permalink_collision( $data, $postarr ) {
|
||||||
return $data;
|
return $data;
|
||||||
if ( !isset( $data[ 'post_name' ] ) || $data[ 'post_name' ] == '' )
|
if ( !isset( $data[ 'post_name' ] ) || $data[ 'post_name' ] == '' )
|
||||||
return $data;
|
return $data;
|
||||||
if ( !is_main_blog() )
|
if ( !is_main_site() )
|
||||||
return $data;
|
return $data;
|
||||||
|
|
||||||
$post_name = $data[ 'post_name' ];
|
$post_name = $data[ 'post_name' ];
|
||||||
|
|
|
@ -117,4 +117,12 @@ function clear_global_post_cache( $post_id ) {
|
||||||
_deprecated_function( __FUNCTION__, '3.0', 'clean_post_cache' );
|
_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();
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -81,13 +81,6 @@ function get_admin_users_for_domain( $sitedomain = '', $path = '' ) {
|
||||||
return false;
|
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 ) {
|
function get_id_from_blogname( $name ) {
|
||||||
global $wpdb, $current_site;
|
global $wpdb, $current_site;
|
||||||
$blog_id = wp_cache_get( "get_id_from_blogname_" . $name, 'blog-details' );
|
$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() {
|
function maybe_redirect_404() {
|
||||||
global $current_site;
|
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' );
|
$destination = constant( 'NOBLOGREDIRECT' );
|
||||||
if ( $destination == '%siteurl%' )
|
if ( $destination == '%siteurl%' )
|
||||||
$destination = $current_site->domain . $current_site->path;
|
$destination = $current_site->domain . $current_site->path;
|
||||||
|
|
|
@ -65,13 +65,13 @@ function wpmu_current_site() {
|
||||||
$current_site->path = $path = PATH_CURRENT_SITE;
|
$current_site->path = $path = PATH_CURRENT_SITE;
|
||||||
if ( defined( 'BLOGID_CURRENT_SITE' ) )
|
if ( defined( 'BLOGID_CURRENT_SITE' ) )
|
||||||
$current_site->blog_id = 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;
|
$current_site->cookie_domain = $cookie_domain;
|
||||||
elseif ( substr( $current_site->domain, 0, 4 ) == 'www.' )
|
elseif ( substr( $current_site->domain, 0, 4 ) == 'www.' )
|
||||||
$current_site->cookie_domain = substr( $current_site->domain, 4 );
|
$current_site->cookie_domain = substr( $current_site->domain, 4 );
|
||||||
else
|
else
|
||||||
$current_site->cookie_domain = $current_site->domain;
|
$current_site->cookie_domain = $current_site->domain;
|
||||||
|
|
||||||
return $current_site;
|
return $current_site;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue