allow_subdomain_install

函数


allow_subdomain_install ( No parameters )
返回值
  • (bool) Whether subdomain installation is allowed
定义位置
  • wp-admin/includes/network.php
    , line 35
引入
3.0.0
弃用

Allow subdomain installation

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;
}