获取网络的基本域。
原型
get_clean_basedomain()
返回值
(string)
基础域。
源文件
路径:wp-admin/includes/network.php
<?php
...
function get_clean_basedomain() {
if ( $existing_domain = network_domain_check() )
return $existing_domain;
$domain = preg_replace( '|https?://|', '', get_option( 'siteurl' ) );
if ( $slash = strpos( $domain, '/' ) )
$domain = substr( $domain, 0, $slash );
return $domain;
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/get_clean_basedomain/