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;
|
||||
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' ];
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
?>
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue