wp_cron_conditionally_prevent_sslverify()WP 5.7.0

Disables SSL verification if the cron_request include an HTTPS URL.

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

Хуков нет.

Возвращает

Массив. The filtered cron request arguments.

Использование

wp_cron_conditionally_prevent_sslverify( $request );
$request(массив) (обязательный)
The cron request arguments.

Список изменений

С версии 5.7.0 Введена.

Код wp_cron_conditionally_prevent_sslverify() WP 6.1.1

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