wpseek.com
A WordPress-centric search engine for devs and theme authors



allow_subdomain_install › WordPress Function

Since3.0.0
Deprecatedn/a
allow_subdomain_install ( No parameters )
Returns:
  • (bool) Whether subdomain installation is allowed
Defined at:
Codex:

Allow subdomain installation



Source

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