get_clean_basedomain()
Get base domain of network.
Return
(string) Base domain.
Source
File: wp-admin/includes/network.php
function get_clean_basedomain() {
if ( $existing_domain = network_domain_check() )
return $existing_domain;
$domain = preg_replace( '|https?://|', '', get_option( 'siteurl' ) );
if ( $slash = strpos( $domain, '/' ) )
$domain = substr( $domain, 0, $slash );
return $domain;
}
Changelog
Version | Description |
---|---|
WP-3.0.0 | Introduced. |