Requests_Transport_cURL::test()
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 );
- $capabilities **
- -
Default: array()
Code of Requests_Transport_cURL::test() Requests Transport cURL::test WP 6.0
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; }