get_clean_basedomain()

Get base domain of network.


Description Description


Return Return

(string) Base domain.


Top ↑

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.