wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
get_blogaddress_by_name › WordPress Function
Seit
Veraltetn/v
› get_blogaddress_by_name ( $blogname )
| Parameter: |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: | |
| Changelog: |
|
Gets a full site URL, given a site name.
Ähnliche Funktionen: get_blogaddress_by_id, get_blogaddress_by_domain, get_linkobjectsbyname, get_linksbyname, get_blogs_of_user
Quellcode
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 . '/' );
}