Changeset 34509
- Timestamp:
- 09/24/2015 06:51:13 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-http.php
r34174 r34509 160 160 161 161 /** 162 * Filter whether to preempt an HTTP request's return. 163 * 164 * Returning a truthy value to the filter will short-circuit 165 * the HTTP request and return early with that value. 162 * Filter whether to preempt an HTTP request's return value. 163 * 164 * Returning a non-false value from the filter will short-circuit the HTTP request and return 165 * early with 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 $rHTTP request arguments.171 * @param string $urlThe request URL.175 * @param false|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 ); 180 174 181 if ( false !== $pre ) 175 182 return $pre;
Note: See TracChangeset
for help on using the changeset viewer.