From a2a7f08b1b49c590c8348be114f079a23074973f Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Tue, 3 Sep 2013 08:38:56 +0000 Subject: [PATCH] WP_HTTP: Add a filter for the available HTTP Transports to allow plugins to alter the order which HTTP Transports are tried, or to add their own. git-svn-id: https://develop.svn.wordpress.org/trunk@25222 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-http.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-http.php b/src/wp-includes/class-http.php index 0bb0e43d87..a03c2c8bcf 100644 --- a/src/wp-includes/class-http.php +++ b/src/wp-includes/class-http.php @@ -214,7 +214,7 @@ class WP_Http { * @return string|bool Class name for the first transport that claims to support the request. False if no transport claims to support the request. */ public function _get_first_available_transport( $args, $url = null ) { - $request_order = array( 'curl', 'streams', 'fsockopen' ); + $request_order = apply_filters( 'http_api_transports', array( 'curl', 'streams', 'fsockopen' ), $args, $url ); // Loop over each transport on each HTTP request looking for one which will serve this request's needs foreach ( $request_order as $transport ) {