use_curl_transport filter-hookWP 2.7.0

Filters whether cURL can be used as a transport for retrieving a URL.

Usage

add_filter( 'use_curl_transport', 'wp_kama_use_curl_transport_filter', 10, 2 );

/**
 * Function for `use_curl_transport` filter-hook.
 * 
 * @param bool  $use_class Whether the class can be used.
 * @param array $args      An array of request arguments.
 *
 * @return bool
 */
function wp_kama_use_curl_transport_filter( $use_class, $args ){

	// filter...
	return $use_class;
}
$use_class(true|false)
Whether the class can be used.
Default: true
$args(array)
An array of request arguments.

Changelog

Since 2.7.0 Introduced.

Where the hook is called

WP_Http_Curl::test()
use_curl_transport
wp-includes/class-wp-http-curl.php 415
return apply_filters( 'use_curl_transport', true, $args );

Where the hook is used in WordPress

Usage not found.