Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_cron_conditionally_prevent_sslverify ›

Seit5.7.0
Veraltetn/v
wp_cron_conditionally_prevent_sslverify ( $request )
Zugriff:
  • private
Parameter:
  • (array) $request The Cron request arguments.
    Erforderlich: Ja
Gibt zurück:
  • (array) $request The filtered Cron request arguments.
Definiert in:
Codex:

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.


Quellcode

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