wpseek.com
WordPress开发者和主题制作者的搜索引擎
get_blogaddress_by_domain is deprecated since version 3.7.0!
get_blogaddress_by_domain › WordPress Function
Since
已弃用3.7.0
› get_blogaddress_by_domain ( $domain, $path )
参数: (2) |
|
返回: |
|
定义在: |
|
文档: | |
Change Log: |
|
Get a full site URL, given a domain and a path.
Related Functions: get_blogaddress_by_id, get_blogaddress_by_name, get_admin_users_for_domain, get_clean_basedomain, get_blog_permalink
源码
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 ); }