http_api_transports
Deprecated from version 6.4.0. It is no longer supported and can be removed in future releases. Use
WpOrg\Requests\Requests::get_transport_class()
instead.Filters which HTTP transports are available and in what order.
Usage
add_filter( 'http_api_transports', 'wp_kama_http_api_transports_filter', 10, 2 ); /** * Function for `http_api_transports` filter-hook. * * @param string[] $transports Array of HTTP transports to check. * @param array $args HTTP request arguments. * * @return string[] */ function wp_kama_http_api_transports_filter( $transports, $args ){ // filter... return $transports; }
- $transports(string[])
- Array of HTTP transports to check.
Default: array contains 'curl' and 'streams', in that order - $args(array)
- HTTP request arguments.
Changelog
Since 3.7.0 | Introduced. |
Deprecated since 6.4.0 | Use WpOrg\Requests\Requests::get_transport_class() |
Where the hook is called
http_api_transports
wp-includes/class-wp-http.php 541
$request_order = apply_filters_deprecated( 'http_api_transports', array( $transports, $args, $url ), '6.4.0' );