Uses
| Uses | Description |
|---|---|
| wp-admin/includes/network.php: network_domain_check() | Check for an existing network. |
| wp-includes/option.php: get_option() | Retrieves an option value based on an option name. |
Get base domain of network.
(string) Base domain.
File: wp-admin/includes/network.php
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;
} | Version | Description |
|---|---|
| 3.0.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_clean_basedomain