Skip to content

Commit

Permalink
Add $type to ep_do_intercept_request filter (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahum authored Nov 8, 2021
1 parent 1e2a45b commit 0f8e520
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion includes/classes/Elasticsearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -1175,13 +1175,16 @@ public function remote_request( $path, $args = [], $query_args = [], $type = nul
* Filter intercepted request
*
* @hook ep_do_intercept_request
* @since 3.2.2
* @since 4.0.0 added $type
* @param {array} $request New remote request response
* @param {array} $query Remote request arguments
* @param {args} $args Request arguments
* @param {int} $failures Number of failures
* @param {string} $type Type of request
* @return {array} New request
*/
$request = apply_filters( 'ep_do_intercept_request', new WP_Error( 400, 'No Request defined' ), $query, $args, $failures );
$request = apply_filters( 'ep_do_intercept_request', new WP_Error( 400, 'No Request defined' ), $query, $args, $failures, $type );
} else {
$request = wp_remote_request( $query['url'], $args ); // try the existing host to avoid unnecessary calls.
}
Expand Down

0 comments on commit 0f8e520

Please sign in to comment.