Uses
Uses | Description |
---|---|
wp-includes/option.php: get_option() | Retrieves an option value based on an option name. |
Allow subdomain installation
(bool) Whether subdomain installation is allowed
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; }
Version | Description |
---|---|
3.0.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/allow_subdomain_install