wp_cron_conditionally_prevent_sslverify

函数


wp_cron_conditionally_prevent_sslverify ( $request )
Access
Private
参数
  • (array)
    $request
    The cron request arguments.
    Required:
返回值
  • (array) The filtered cron request arguments.
定义位置
  • wp-includes/https-detection.php
    , line 184
引入
5.7.0
弃用

Disables SSL verification if the ‘cron_request’ arguments include an HTTPS URL.

This prevents an issue if HTTPS breaks, where there would be a failed attempt to verify HTTPS.

function wp_cron_conditionally_prevent_sslverify( $request ) {
	if ( 'https' === wp_parse_url( $request['url'], PHP_URL_SCHEME ) ) {
		$request['args']['sslverify'] = false;
	}
	return $request;
}