函数原型
get_clean_basedomain(): string
函数描述
Get base domain of network.
是否弃用
未弃用
函数参数
无
函数返回值
string Base domain.
函数位置
File: wp-admin/includes/network.php.
函数源码
function get_clean_basedomain() {
$existing_domain = network_domain_check();
if ( $existing_domain ) {
return $existing_domain;
}
$domain = preg_replace( '|https?://|', '', get_option( 'siteurl' ) );
$slash = strpos( $domain, '/' );
if ( $slash ) {
$domain = substr( $domain, 0, $slash );
}
return $domain;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |

