wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



get_clean_basedomain › WordPress Function

Depuis3.0.0
Dépréciéen/a
get_clean_basedomain ( Pas de paramètres )
Retourne:
  • (string) Base domain.
Défini(e) dans:
Codex:

Get base domain of network.



Source

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