Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness. Use WP_SITEURL instead.

_config_wp_siteurl() WordPress Function

The config_wp_siteurl() function is used to configure the WordPress site URL. This function takes a single argument, which is the new WordPress site URL.

_config_wp_siteurl( string $url = '' ) #

Retrieve 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.

Top ↑

See also


Top ↑

Parameters

$url

(string)(Optional)URL to set the WordPress site location.

Default value: ''


Top ↑

Return

(string) The WordPress site URL.


Top ↑

Source

File: wp-includes/functions.php

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


Top ↑

Changelog

Changelog
VersionDescription
2.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More