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.
Built from https://develop.svn.wordpress.org/trunk@25222 git-svn-id: http://core.svn.wordpress.org/trunk@25193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
98104779a3
commit
bb74078a2b
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in New Issue