WordPress开发者和主题制作者的搜索引擎



_config_wp_siteurl ›

Since2.2.0
已弃用n/a
_config_wp_siteurl ( $url = '' )
访问:
  • private
参数:
  • (string) $url URL to set the WordPress site location.
    Required: No
    默认: (empty)
查看:
  • WP_SITEURL
返回:
  • (string) The WordPress Site URL.
定义在:
文档:

Retrieve the WordPress site URL.

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.



源码

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