http_api_transports filter-hookWP 3.7.0

Filters which HTTP transports are available and in what order.


add_filter( 'http_api_transports', 'wp_kama_http_api_transports_filter', 10, 3 );

 * Function for `http_api_transports` filter-hook.
 * @param string[] $transports Array of HTTP transports to check.
 * @param array    $args       HTTP request arguments.
 * @param string   $url        The URL to request.
 * @return string[]
function wp_kama_http_api_transports_filter( $transports, $args, $url ){

	// filter...
	return $transports;
Array of HTTP transports to check.
Default: array contains 'curl' and 'streams', in that order
HTTP request arguments.
The URL to request.


Since 3.7.0 Introduced.

Where the hook is called

wp-includes/class-wp-http.php 536
$request_order = apply_filters( 'http_api_transports', $transports, $args, $url );

Where the hook is used in WordPress

Usage not found.