wpseek.com
WordPress开发者和主题制作者的搜索引擎



allow_subdomain_install › WordPress Function

Since3.0.0
已弃用n/a
› allow_subdomain_install ( 没有参数 )
返回:
  • (bool) Whether subdomain installation is allowed
定义在:
文档:

Allow subdomain installation



源码

function allow_subdomain_install() {
	$home   = get_option( 'home' );
	$domain = parse_url( $home, PHP_URL_HOST );
	if ( parse_url( $home, PHP_URL_PATH ) || 'localhost' === $domain || preg_match( '|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|', $domain ) ) {
		return false;
	}

	return true;
}