wppaste
WordPress

apply_filters_deprecated( 'http_api_transports', string[] $transports, array $args, string $url )

Since
3.7.0
Filters which HTTP transports are available and in what order.

Compatibility

Deprecated in WordPress 6.4.0. Use WpOrg\Requests\Requests::get_transport_class()

WordPress
since 3.7.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$transportsstring[]
Array of HTTP transports to check. Default array contains 'curl' and 'streams', in that order.
$argsarray
HTTP request arguments.
$urlstring
The URL to request.

Where this hook fires · 1

  • wp-includes/class-wp-http.php:561WP_Http::_get_first_available_transport()

Source code

		 *		 * @param string[] $transports Array of HTTP transports to check. Default array contains		 *                             'curl' and 'streams', in that order.		 * @param array    $args       HTTP request arguments.		 * @param string   $url        The URL to request.		 */		$request_order = apply_filters_deprecated( 'http_api_transports', array( $transports, $args, $url ), '6.4.0' ); 		// Loop over each transport on each HTTP request looking for one which will serve this request's needs.		foreach ( $request_order as $transport ) {			if ( in_array( $transport, $transports, true ) ) {				$transport = ucfirst( $transport );			}

Changelog

Introduced in 3.7.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

6.4.0
Deprecated. Use WpOrg\Requests\Requests::get_transport_class()from the docblock
3.7.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 7.0.4 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.