Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
wp_cron_conditionally_prevent_sslverify() WordPress Function
The wp_cron_conditionally_prevent_sslverify() function allows you to prevent WordPress from verifying SSL certificates when making HTTPS requests to external sites. This can be useful if you are making requests to a site that has an invalid or self-signed SSL certificate.
wp_cron_conditionally_prevent_sslverify( array $request ) #
Disables SSL verification if the ‘cron_request’ arguments include an HTTPS URL.
Description
This prevents an issue if HTTPS breaks, where there would be a failed attempt to verify HTTPS.
Parameters
- $request
(array)(Required)The Cron request arguments.
Return
(array) The filtered Cron request arguments.
Source
File: wp-includes/https-detection.php
function wp_cron_conditionally_prevent_sslverify( $request ) { if ( 'https' === wp_parse_url( $request['url'], PHP_URL_SCHEME ) ) { $request['args']['sslverify'] = false; } return $request; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.7.0 | Introduced. |