allow_subdomain_install()
Allow subdomain installation
No Hooks.
Return
true|false
. Whether subdomain installation is allowed
Usage
allow_subdomain_install();
Changelog
Since 3.0.0 | Introduced. |
allow_subdomain_install() allow subdomain install code WP 6.6.2
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; }