Ticket #45454: 45454.diff
File 45454.diff, 928 bytes (added by , 6 years ago) |
---|
-
src/wp-includes/rest-api/search/class-wp-rest-post-search-handler.php
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.0 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;