wp_is_https_supported()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
wp_is_https_supported(): bool
Описание
Эта функция выполняет HTTP-запрос через wp_get_https_detection_errors() для проверки поддержки HTTPS. Поскольку этот процесс может быть ресурсоёмким, его следует использовать осторожно, особенно в чувствительных к производительности окружениях, чтобы избежать возможных задержек.
Оригинал (английский)
This function makes an HTTP request through wp_get_https_detection_errors() to check for HTTPS support. As this process can be resource-intensive, it should be used cautiously, especially in performance-sensitive environments, to avoid potential latency issues.
Возвращаемое значение
bool
Исходный код
wp-includes/https-detection.php:75
function wp_is_https_supported() {
$https_detection_errors = wp_get_https_detection_errors();
// If there are errors, HTTPS is not supported.
return empty( $https_detection_errors );
}
История изменений
| Версия | Описание |
|---|---|
| 5.7.0 | Introduced. |

