get_blogaddress_by_domain
函数
get_blogaddress_by_domain ( $domain, $path )
- 参数
-
-
(string)
$domain- Required: 是
-
(string)
$path- Required: 是
-
(string)
- 返回值
-
- (string)
- 定义位置
-
-
wp-includes/ms-deprecated.php
, line 365
-
wp-includes/ms-deprecated.php
- 引入
- –
- 弃用
- 3.7.0
Get a full blog URL, given a domain and a path.
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 ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。