wphooks.info - http_api_transports

http_api_transports

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-includes/class-http.php:
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
		/**
		 * Filters which HTTP transports are available and in what order.
		 *
		 * @since 3.7.0
		 *
		 * @param array  $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 );

		// Loop over each transport on each HTTP request looking for one which will serve this request's needs.
		foreach ( $request_order as $transport ) {
			if ( in_array( $transport, $transports ) ) {
				$transport = ucfirst( $transport );
			}
			$class = 'WP_Http_' . $transport;

			// Check to see if this transport is a possibility, calls the transport statically.