Retrieves the WordPress home page URL.
If the constant named ‘WP_HOME’ exists, then it will be used and returned by the function. This can be used to counter the redirection on your local development environment.
$urlstringoptional
Default:''
function _config_wp_home( $url = '' ) {
if ( defined( 'WP_HOME' ) ) {
return untrailingslashit( WP_HOME );
}
return $url;
}
| Version | Description |
|---|---|
| 2.2.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/_config_wp_home