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



wp_is_https_supported › WordPress Function

Since5.7.0
已弃用n/a
› wp_is_https_supported ( 没有参数 )
返回:
  • (bool) True if HTTPS is supported, false otherwise.
定义在:
文档:

Checks whether HTTPS is supported for the server and domain.

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.


源码

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 );
}