Requests_Transport_cURL::test( $capabilities = array() )

Whether this transport is valid


Description Description


Return Return

(boolean) True if the transport is valid, false otherwise.


Top ↑

Source 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;
	}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.