Requests_Transport_cURL::test() WordPress Method
The Requests_Transport_cURL::test() Wordpress method is used to test whether the cURL transport is available on the current system.
Requests_Transport_cURL::test( $capabilities = array() ) #
Whether this transport is valid
Return
(boolean) True if the transport is valid, false otherwise.
Source
File: wp-includes/Requests/Transport/cURL.php
public static function test($capabilities = array()) { if (!function_exists('curl_init') || !function_exists('curl_exec')) { return false; } // If needed, check that our installed curl version supports SSL if (isset($capabilities['ssl']) && $capabilities['ssl']) { $curl_version = curl_version(); if (!(CURL_VERSION_SSL & $curl_version['features'])) { return false; } } return true; }
Expand full source codeCollapse full source codeView on TracView on GitHub