W3cubDocs

/WordPress

is_subdomain_install()

Whether a subdomain configuration is enabled.

Description

Return

(bool) True if subdomain configuration is enabled, false otherwise.

Source

File: wp-includes/ms-load.php

function is_subdomain_install() {
	if ( defined( 'SUBDOMAIN_INSTALL' ) ) {
		return SUBDOMAIN_INSTALL;
	}

	return ( defined( 'VHOST' ) && VHOST == 'yes' );
}

Changelog

Version Description
3.0.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/is_subdomain_install