wpseek.com
A WordPress-centric search engine for devs and theme authors
get_blogaddress_by_name › WordPress Function
Since
Deprecatedn/a
› get_blogaddress_by_name ( $blogname )
Parameters: |
|
Returns: |
|
Defined at: |
|
Codex: | |
Change Log: |
|
Gets a full site URL, given a site name.
Related Functions: get_blogaddress_by_id, get_blogaddress_by_domain, get_linkobjectsbyname, get_linksbyname, get_blogs_of_user
Source
function get_blogaddress_by_name( $blogname ) { if ( is_subdomain_install() ) { if ( 'main' === $blogname ) { $blogname = 'www'; } $url = rtrim( network_home_url(), '/' ); if ( ! empty( $blogname ) ) { $url = preg_replace( '|^([^\.]+://)|', '${1}' . $blogname . '.', $url ); } } else { $url = network_home_url( $blogname ); } return esc_url( $url . '/' ); }