WordPress at Your Fingertips
function is not described

get_clean_basedomain() WP 3.0.0

Get base domain of network.

No Hooks.

Return

String. Base domain.

Usage

get_clean_basedomain();

Changelog

Since 3.0.0 Introduced.

Code of get_clean_basedomain() WP 5.8.2

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;
}