network_domain_check example

return false;
}

/** * Get base domain of network. * * @since 3.0.0 * @return string Base domain. */
function get_clean_basedomain() {
    $existing_domain = network_domain_check();
    if ( $existing_domain ) {
        return $existing_domain;
    }
    $domain = preg_replace( '|https?://|', '', get_option( 'siteurl' ) );
    $slash  = strpos( $domain, '/' );
    if ( $slash ) {
        $domain = substr( $domain, 0, $slash );
    }
    return $domain;
}

wp_die( __( 'The Network creation panel is not for WordPress MU networks.' ) );
    }
}

require_once __DIR__ . '/includes/network.php';

// We need to create references to ms global tables to enable Network. foreach ( $wpdb->tables( 'ms_global' ) as $table => $prefixed_table ) {
    $wpdb->$table = $prefixed_table;
}

if ( ! network_domain_check() && ( ! defined( 'WP_ALLOW_MULTISITE' ) || ! WP_ALLOW_MULTISITE ) ) {
    wp_die(
        printf(
            /* translators: 1: WP_ALLOW_MULTISITE, 2: wp-config.php */
            __( 'You must define the %1$s constant as true in your %2$s file to allow creation of a Network.' ),
            '<code>WP_ALLOW_MULTISITE</code>',
            '<code>wp-config.php</code>'
        )
    );
}

if ( is_network_admin() ) {
    
Home | Imprint | This part of the site doesn't use cookies.