[wp-trac] [WordPress Trac] #39965: REST API: Introduce a controller for searching across post types
WordPress Trac
noreply at wordpress.org
Wed Oct 17 02:27:12 UTC 2018
#39965: REST API: Introduce a controller for searching across post types
---------------------------------------------+-----------------------
Reporter: iseulde | Owner: flixos90
Type: enhancement | Status: assigned
Priority: high | Milestone: 5.0
Component: REST API | Version: 4.7
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests commit | Focuses: rest-api
---------------------------------------------+-----------------------
Changes (by danielbachhuber):
* keywords: needs-patch needs-unit-tests => has-patch has-unit-tests
commit
Comment:
`39965.1.diff` ports over an [https://github.com/WordPress/wordpress-
develop/pull/19 adaptation] of the search controller in Gutenberg:
* Introduces a `WP_REST_Search_Controller` class which registers a
`/wp/v2/search` endpoint.
* Search types are handled by extending `WP_REST_Search_Handler`. The
default search type is `WP_REST_Post_Search_Handler` but can be filtered
by plugins or a theme.
* Includes relevant unit tests.
* Updates all `@since` references to `5.0.0` and removes the `'gutenberg'`
textdomain.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39965#comment:38>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list