get_blogaddress_by_domain()
Deprecated from version 3.7.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.
Get a full site URL, given a domain and a path.
No Hooks.
Return
String
.
Usage
get_blogaddress_by_domain( $domain, $path );
- $domain(string) (required)
- -
- $path(string) (required)
- -
Changelog
Since 3.0.0 | Introduced. |
Deprecated since | 3.7.0 |
get_blogaddress_by_domain() get blogaddress by domain code WP 6.5.2
function get_blogaddress_by_domain( $domain, $path ) { _deprecated_function( __FUNCTION__, '3.7.0' ); 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 ( 'www.' !== $blogname ) $url .= $blogname . '/'; } else { // Main blog. $url = 'http://' . $domain . $path; } } return sanitize_url( $url ); }