_config_wp_home()WP 2.2.0

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

Эта функция считается внутренней для использования самим ядром. Не рекомендуется использовать эту функцию в своем коде.

Хуков нет.

Возвращает

Строку. Homepage location.

Использование

_config_wp_home( $url );
$url(строка)
URL for the home location.
По умолчанию: ''

Заметки

  • Смотрите: WP_HOME

Список изменений

С версии 2.2.0 Введена.

Код _config_wp_home() WP 6.1.1

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