wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



get_clean_basedomain › WordPress Function

Od3.0.0
Przestarzałyn/a
get_clean_basedomain ( Brak parametrów )
Powrót:
  • (string) Base domain.
Zdefiniowane na:
Codex:

Get base domain of network.



Źródło

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