allow_subdomain_install()
Allow subdomain installation
Хуков нет.
Возвращает
true|false
. Whether subdomain installation is allowed
Использование
allow_subdomain_install();
Список изменений
С версии 3.0.0 | Введена. |
Код allow_subdomain_install() allow subdomain install WP 6.1.1
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; }