Requests_Transport_cURL::test() public WP 1.0
Whether this transport is valid
{} It's a method of the class: Requests_Transport_cURL{}
No Hooks.
Return
true/false. True if the transport is valid, false otherwise.
Usage
$result = Requests_Transport_cURL::test( $capabilities );
Code of Requests_Transport_cURL::test() Requests Transport cURL::test WP 5.6
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;
}