wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



get_clean_basedomain › WordPress Function

Desde3.0.0
Obsoleton/a
get_clean_basedomain ( Sem parâmetros )
Retorna:
  • (string) Base domain.
Definido em:
Codex:

Get base domain of network.



Fonte

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