From 0ed8dcda724f20983e9c0ef928aa7af955b9cb95 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 26 Sep 2023 16:53:20 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@56723 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-http.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-http.php b/src/wp-includes/class-wp-http.php index 287848456c..a30f9f7931 100644 --- a/src/wp-includes/class-wp-http.php +++ b/src/wp-includes/class-wp-http.php @@ -531,13 +531,14 @@ class WP_Http { * Filters which HTTP transports are available and in what order. * * @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 * 'curl' and 'streams', in that order. * @param array $args HTTP request arguments. * @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. foreach ( $request_order as $transport ) {