diff --git src/wp-includes/rest-api/search/class-wp-rest-post-search-handler.php src/wp-includes/rest-api/search/class-wp-rest-post-search-handler.php
index 804be3b31b..7205c18e88 100644
|
|
class WP_REST_Post_Search_Handler extends WP_REST_Search_Handler { |
68 | 68 | $query_args['s'] = $request['search']; |
69 | 69 | } |
70 | 70 | |
| 71 | /** |
| 72 | * Filters the query arguments for a request. |
| 73 | * |
| 74 | * Enables adding extra arguments or setting defaults for a post search request. |
| 75 | * |
| 76 | * @since 5.0.3 |
| 77 | * |
| 78 | * @param array $query_args Key value array of query var to query value. |
| 79 | * @param WP_REST_Request $request The request used. |
| 80 | */ |
| 81 | $query_args = apply_filters( 'rest_post_search_query', $query_args, $request ); |
| 82 | |
71 | 83 | $query = new WP_Query(); |
72 | 84 | $found_ids = $query->query( $query_args ); |
73 | 85 | $total = $query->found_posts; |