allow_subdomain_install

Allow subdomain install.

Description

allow_subdomain_install(); 

Usage

  1. if ( !function_exists( 'allow_subdomain_install' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/network.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = allow_subdomain_install(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/network.php  
  1. function allow_subdomain_install() { 
  2. $domain = preg_replace( '|https?://([^/]+)|', '$1', get_option( 'home' ) ); 
  3. if ( parse_url( get_option( 'home' ), PHP_URL_PATH ) || 'localhost' == $domain || preg_match( '|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|', $domain ) ) 
  4. return false; 
  5.  
  6. return true;