On this page
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;
}
Related
Uses
| Uses | Description |
|---|---|
| network_domain_check() wp-admin/includes/network.php | Check for an existing network. |
| get_option() wp-includes/option.php | Retrieves an option value based on an option name. |
Used By
| Used By | Description |
|---|---|
| network_step1() wp-admin/includes/network.php | Prints step 1 for Network installation process. |
| network_step2() wp-admin/includes/network.php | Prints step 2 for Network installation process. |
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_clean_basedomain