get_clean_basedomain(): string

Get base domain of network.

Return

string Base domain.

Source

File: wp-admin/includes/network.php.

View all references

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;

}

Leave a Reply

Your email address will not be published. Required fields are marked *