允许子域安装
原型
allow_subdomain_install()
返回值
(bool)
是否允许子域安装
源文件
路径:wp-admin/includes/network.php
<?php
...
function allow_subdomain_install() {
$domain = preg_replace( '|https?://([^/]+)|', '$1', get_option( 'home' ) );
if ( parse_url( get_option( 'home' ), PHP_URL_PATH ) || 'localhost' == $domain || preg_match( '|^[0-9]+.[0-9]+.[0-9]+.[0-9]+$|', $domain ) )
return false;
return true;
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/allow_subdomain_install/