wp_is_site_url_using_https()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
wp_is_site_url_using_https(): bool
Описание
Проверяет URL, по которому доступны файлы приложения WordPress (например, wp-blog-header.php или папка wp-admin/).
См. alsosite_url()
Оригинал (английский)
This checks the URL where WordPress application files (e.g. wp-blog-header.php or the wp-admin/ folder) are accessible.
Возвращаемое значение
bool
Исходный код
wp-includes/https-detection.php:51
function wp_is_site_url_using_https() {
/*
* Use direct option access for 'siteurl' and manually run the 'site_url'
* filter because `site_url()` will adjust the scheme based on what the
* current request is using.
*/
/** This filter is documented in wp-includes/link-template.php */
$site_url = apply_filters( 'site_url', get_option( 'siteurl' ), '', null, null );
return 'https' === wp_parse_url( $site_url, PHP_URL_SCHEME );
}
История изменений
| Версия | Описание |
|---|---|
| 5.7.0 | Introduced. |

