Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#45454 closed enhancement (fixed)

REST API: Allow to filter the query in the search controller

Reported by: chouby's profile Chouby Owned by: desrosj's profile desrosj
Milestone: 5.1 Priority: normal
Severity: normal Version: 5.0
Component: REST API Keywords: has-patch
Focuses: Cc:


[43739] introduced a new search controller. However, unlike ther controllers, it doesn't propose a convenient way to filter the query.

I propose to add a new filter rest_search_query similar to the filter rest_{$type}_query offered by other controllers.

Attachments (2)

45454.diff (928 bytes) - added by Chouby 5 years ago.
45454.2.diff (1000 bytes) - added by swissspidy 5 years ago.

Download all attachments as: .zip

Change History (11)

#1 @swissspidy
5 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.0.1
  • Type changed from defect (bug) to enhancement

5 years ago

#2 @Chouby
5 years ago

  • Keywords has-patch added; needs-patch removed

#3 @pento
5 years ago

  • Milestone changed from 5.0.1 to 5.0.2

#4 @pento
5 years ago

  • Milestone changed from 5.0.2 to 5.0.3

#5 @audrasjb
5 years ago

  • Keywords needs-refresh added


5.0.3 is going to be released in a couple of weeks. We are currently sorting the remaining tickets in the milestone. The ticket is sorted in milestone 5.0.3, but requires an @since refresh and a commit/backport to the associated branch. That would be nice to have a refreshed patch asap.

5 years ago

#6 @swissspidy
5 years ago

  • Keywords commit added; needs-refresh removed

#7 @desrosj
5 years ago

  • Milestone changed from 5.0.3 to 5.1

New filters fall outside of the 5.0.3 scope. Moving to 5.1.

#8 @desrosj
5 years ago

  • Owner set to desrosj
  • Resolution set to fixed
  • Status changed from new to closed

In 44482:

REST API: Introduce rest_post_search_query filter.

This filter allows the query arguments to be manipulated for a post search query in the REST API.

Props Chouby, swissspidy.
Fixes #45454.

#9 @desrosj
5 years ago

  • Keywords commit removed
Note: See TracTickets for help on using tickets.