Make WordPress Core

Changeset 14703


Ignore:
Timestamp:
05/16/2010 10:21:06 PM (14 years ago)
Author:
wpmuguru
Message:

use network_home_url in get_blogaddress_by_name, see #12735

File:
1 edited

Legend:

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

    r14351 r14703  
    3030        if ( $blogname == 'main' )
    3131            $blogname = 'www';
    32         return esc_url( 'http://' . $blogname . '.' . $current_site->domain . $current_site->path );
     32        $url = rtrim( network_home_url(), '/' );
     33        if ( !empty( $blogname ) )
     34            $url = preg_replace( '|^([^\.]+://)|', '$1' . $blogname . '.', $url );
    3335    } else {
    34         return esc_url( 'http://' . $current_site->domain . $current_site->path . $blogname . '/' );
    35     }
     36        $url = network_home_url( $blogname );
     37    }
     38    return esc_url( $url . '/' );
    3639}
    3740
Note: See TracChangeset for help on using the changeset viewer.