get_blogaddress_by_domain [ WordPress Function ]
get_blogaddress_by_domain ( $domain, $path )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: get_blogaddress_by_id, get_blogaddress_by_name, get_admin_users_for_domain, get_clean_basedomain, get_blog_permalink
Get a full blog URL, given a domain and a path.
Source
<?php
function get_blogaddress_by_domain( $domain, $path ) {
if ( is_subdomain_install() ) {
$url = "http://" . $domain.$path;
} else {
if ( $domain != $_SERVER['HTTP_HOST'] ) {
$blogname = substr( $domain, 0, strpos( $domain, '.' ) );
$url = 'http://' . substr( $domain, strpos( $domain, '.' ) + 1 ) . $path;
// we're not installing the main blog
if ( $blogname != 'www.' )
$url .= $blogname . '/';
} else { // main blog
$url = 'http://' . $domain . $path;
}
}
return esc_url( $url );
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- WPMU Functions/get blogaddress by domain « WordPress Codex
Description. Looks up the blog URL based on the domain as a search term. Parameters. $domain: (string) (required) The domain of the blog to look for. Default: ...
codex.wordpress.org - Function Reference/get blogaddress by domain « WordPress Codex
Function Reference/get blogaddress by domain ... Source File. get_blogaddress_by_domain() is located in wp-includes/ms-blogs.php. Retrieved from ...
codex.wordpress.org - WordPress › Support » Get folder name for each multisite
Posted 11 months ago #. I think this is the one. http://codex.wordpress.org/ WPMU_Functions/get_blogaddress_by_domain · Ipstenu · Half-Elf Support Rogue & ...
wordpress.org - get_blogaddress_by_domain | A HitchHackers guide through ...
Feb 12, 2011 ... function get_blogaddress_by_domain( $domain, $path ) { if ( is_subdomain_install() ) { $url = "http://" . $domain.$path; } else { if ( $domain !
hitchhackerguide.com