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



_config_wp_home ›

Since2.2.0
已弃用n/a
_config_wp_home ( $url = '' )
访问:
  • private
参数:
  • (string) $url URL for the home location.
    Required: No
    默认: (empty)
查看:
  • WP_HOME
返回:
  • (string) Homepage location.
定义在:
文档:

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



源码

function _config_wp_home( $url = '' ) {
	if ( defined( 'WP_HOME' ) ) {
		return untrailingslashit( WP_HOME );
	}
	return $url;
}