Requests::add_transport() WordPress Method
The Requests::add_transport() method is used to add a new transport to the list of available transports. This is useful for adding support for new transport types, or overriding an existing transport.
Requests::add_transport( string $transport ) #
Register a transport
Contents
Parameters
- $transport
(string)(Required)Transport class to add, must support the Requests_Transport interface
Source
File: wp-includes/class-requests.php
public static function add_transport($transport) { if (empty(self::$transports)) { self::$transports = array( 'Requests_Transport_cURL', 'Requests_Transport_fsockopen', ); } self::$transports = array_merge(self::$transports, array($transport)); }
Expand full source codeCollapse full source codeView on TracView on GitHub