函数原型
allow_subdomain_install(): bool
函数描述
Allow subdomain installation
是否弃用
未弃用
函数参数
无
函数返回值
bool Whether subdomain installation is allowed
函数位置
File: wp-admin/includes/network.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;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |

