HTTP API: Deprecate the http_api_transports filter.

The filter is only used within the `WP_Http::_get_first_available_transport()` method, which has been marked as deprecated in favor of `\WpOrg\Requests\Requests::get_transport_class()`.

Follow-up to [56655]

Props desrosj, hellofromTonya.
Fixes #58705.
Built from https://develop.svn.wordpress.org/trunk@56723


git-svn-id: http://core.svn.wordpress.org/trunk@56235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2023-09-26 16:55:20 +00:00
parent c44e5163b6
commit 2c11f49301
2 changed files with 3 additions and 2 deletions

View File

@ -531,13 +531,14 @@ class WP_Http {
* Filters which HTTP transports are available and in what order. * Filters which HTTP transports are available and in what order.
* *
* @since 3.7.0 * @since 3.7.0
* @deprecated 6.4.0 Use WpOrg\Requests\Requests::get_transport_class()
* *
* @param string[] $transports Array of HTTP transports to check. Default array contains * @param string[] $transports Array of HTTP transports to check. Default array contains
* 'curl' and 'streams', in that order. * 'curl' and 'streams', in that order.
* @param array $args HTTP request arguments. * @param array $args HTTP request arguments.
* @param string $url The URL to request. * @param string $url The URL to request.
*/ */
$request_order = apply_filters( 'http_api_transports', $transports, $args, $url ); $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. // Loop over each transport on each HTTP request looking for one which will serve this request's needs.
foreach ( $request_order as $transport ) { foreach ( $request_order as $transport ) {

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.4-alpha-56722'; $wp_version = '6.4-alpha-56723';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.