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.



源码

function wp_is_https_supported() {
	$https_detection_errors = get_option( 'https_detection_errors' );

	// If option has never been set by the Cron hook before, run it on-the-fly as fallback.
	if ( false === $https_detection_errors ) {
		wp_update_https_detection_errors();

		$https_detection_errors = get_option( 'https_detection_errors' );
	}

	// If there are no detection errors, HTTPS is supported.
	return empty( $https_detection_errors );
}