_config_wp_siteurl()WP 2.2.0

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

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

Хуков нет.

Возвращает

Строку. The WordPress site URL.

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

_config_wp_siteurl( $url );
$url(строка)
URL to set the WordPress site location.
По умолчанию: ''

Заметки

  • Смотрите: WP_SITEURL

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

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

Код _config_wp_siteurl() WP 6.5.2

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