allow_subdomain_install

Advertisement

Summery Summery

Allow subdomain installation

Syntax Syntax

allow_subdomain_install()

Return Return

(bool) Whether subdomain installation is allowed

Source Source

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

Advertisement

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Advertisement

Leave a Reply