WordPress函数 - _config_wp_siteurl()

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

See also

  • WP_SITEURL

Parameters

$url

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

Default value: ''


Return

(string) The WordPress Site URL.


Source

File: wp-includes/functions.php

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



Changelog

Changelog
Version Description
2.2.0 Introduced.

发表评论

© 2021 狸玖技术站 - 基于 WordPress