wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
get_blogaddress_by_id › WordPress Function
Seit
Veraltetn/v
› get_blogaddress_by_id ( $blog_id )
| Parameter: |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: | |
| Changelog: |
|
Gets a full site URL, given a site ID.
Ähnliche Funktionen: get_blogaddress_by_domain, get_blogaddress_by_name, get_metadata_by_mid, get_post_meta_by_id, get_blog_list
Quellcode
function get_blogaddress_by_id( $blog_id ) {
$bloginfo = get_site( (int) $blog_id );
if ( empty( $bloginfo ) ) {
return '';
}
$scheme = parse_url( $bloginfo->home, PHP_URL_SCHEME );
$scheme = empty( $scheme ) ? 'http' : $scheme;
return esc_url( $scheme . '://' . $bloginfo->domain . $bloginfo->path );
}