wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



allow_subdomain_install › WordPress Function

Seit3.0.0
Veraltetn/v
allow_subdomain_install ( Keine Parameter )
Gibt zurück:
  • (bool) Whether subdomain installation is allowed
Definiert in:
Codex:

Allow subdomain installation



Quellcode

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