http_api_transports

http_api_transports

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.3.2

apply_filters('http_api_transports') is found 1 times:

  • /wp-includes/class-wp-http.php line 538
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    *                             '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, true ) ) {
            $transport = ucfirst( $transport );
        }

See this hook used in plugins: