Make WordPress Core


Ignore:
Timestamp:
07/31/2009 09:37:45 AM (15 years ago)
Author:
markjaquith
Message:

add some filters so that HTTP requests can be filtered. props johnbillion. fixes #10413

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/http.php

    r11684 r11758  
    237237        $r = apply_filters( 'http_request_args', $r, $url );
    238238
     239        // Allow plugins to short-circuit the request
     240        $pre = apply_filters( 'pre_http_request', false, $r, $url );
     241        if ( false !== $pre )
     242            return $pre;
     243
    239244        $arrURL = parse_url($url);
    240245
     
    307312
    308313            if ( ! is_wp_error($response) )
    309                 return $response;
     314                return apply_filters( 'http_response', $response, $r, $url );
    310315        }
    311316
Note: See TracChangeset for help on using the changeset viewer.