use network_home_url in get_blogaddress_by_name, see #12735
git-svn-id: http://svn.automattic.com/wordpress/trunk@14703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
021179162a
commit
9fb13d2cba
|
@ -29,10 +29,13 @@ function get_blogaddress_by_name( $blogname ) {
|
|||
if ( is_subdomain_install() ) {
|
||||
if ( $blogname == 'main' )
|
||||
$blogname = 'www';
|
||||
return esc_url( 'http://' . $blogname . '.' . $current_site->domain . $current_site->path );
|
||||
$url = rtrim( network_home_url(), '/' );
|
||||
if ( !empty( $blogname ) )
|
||||
$url = preg_replace( '|^([^\.]+://)|', '$1' . $blogname . '.', $url );
|
||||
} else {
|
||||
return esc_url( 'http://' . $current_site->domain . $current_site->path . $blogname . '/' );
|
||||
$url = network_home_url( $blogname );
|
||||
}
|
||||
return esc_url( $url . '/' );
|
||||
}
|
||||
|
||||
function get_blogaddress_by_domain( $domain, $path ){
|
||||
|
|
Loading…
Reference in New Issue