_config_wp_siteurl( string $url ): string

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

Retrieves the WordPress site URL.

Description

If the constant named ‘WP_SITEURL’ is defined, then the value in that constant will always be returned. This can be used for debugging a site on your localhost while not having to change the database to your URL.

See also

Parameters

$urlstringrequired
URL to set the WordPress site location.

Return

string The WordPress site URL.

Source

function _config_wp_siteurl( $url = '' ) {
	if ( defined( 'WP_SITEURL' ) ) {
		return untrailingslashit( WP_SITEURL );
	}
	return $url;
}

Changelog

VersionDescription
2.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.