Ticket #33995: 33995.patch
File 33995.patch, 1.5 KB (added by , 10 years ago) |
---|
-
src/wp-includes/class-http.php
159 159 $r['_redirection'] = $r['redirection']; 160 160 161 161 /** 162 * Filter whether to preempt an HTTP request's return .162 * Filter whether to preempt an HTTP request's return value. 163 163 * 164 * Returning a truthy value to the filter will short-circuit 165 * the HTTP request and return early with that value. 164 * Returning a non-false value from the filter will short-circuit the HTTP request and return early with 165 * that value. A filter should return either: 166 * 167 * - An array containing 'headers', 'body', 'response', 'cookies', and 'filename' elements 168 * - A `WP_Error` instance 169 * - boolean false (to avoid short-circuiting the response) 170 * 171 * Returning any other value may result in unexpected behaviour. 166 172 * 167 173 * @since 2.9.0 168 174 * 169 * @param bool $preempt Whether to preempt an HTTP request return. Default false.170 * @param array $r HTTP request arguments.171 * @param string $url The request URL.175 * @param bool|array|WP_Error $preempt Whether to preempt an HTTP request's return value. Default false. 176 * @param array $r HTTP request arguments. 177 * @param string $url The request URL. 172 178 */ 173 179 $pre = apply_filters( 'pre_http_request', false, $r, $url ); 174 180 if ( false !== $pre )