network_domain_check

Check for an existing network.

Description

network_domain_check(); 

Usage

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

Defined (1)

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

/wp-admin/includes/network.php  
  1. function network_domain_check() { 
  2. global $wpdb; 
  3.  
  4. $sql = $wpdb->prepare( "SHOW TABLES LIKE %s", $wpdb->esc_like( $wpdb->site ) ); 
  5. if ( $wpdb->get_var( $sql ) ) { 
  6. return $wpdb->get_var( "SELECT domain FROM $wpdb->site ORDER BY id ASC LIMIT 1" ); 
  7. return false;