spacedmonkey
c8f31dc0c0
REST API: Improve post cache priming in `WP_REST_Post_Search_Handler` class.
...
In the `WP_REST_Post_Search_Handler` class, ensure that post, post meta and term caches are correctly primed when performing a search.
Props furi3r, spacedmonkey, TimothyBlynJacobs, audrasjb, peterwilsoncc.
Fixes #55674 .
Built from https://develop.svn.wordpress.org/trunk@53485
git-svn-id: http://core.svn.wordpress.org/trunk@53074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-10 15:47:08 +00:00
John Blackbourn
35e1b34f8e
REST API: Corrections and improvements to docblocks for REST API filters.
...
See #51800
Built from https://develop.svn.wordpress.org/trunk@49955
git-svn-id: http://core.svn.wordpress.org/trunk@49654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-10 22:23:09 +00:00
John Blackbourn
1ead0719b7
Docs: Fix some docblock issues introduced in 5.6.
...
See #51800
Built from https://develop.svn.wordpress.org/trunk@49787
git-svn-id: http://core.svn.wordpress.org/trunk@49510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-10 23:27:06 +00:00
TimothyBlynJacobs
49a399db05
REST API: Introduce search post format handler.
...
This allows for clients to search the used post formats via the /wp/v2/search endpoint by using a type=post-format query parameter.
Fixes #51459 .
Props andraganescu, zieladam, noisysocks, TimothyBlynJacobs.
Built from https://develop.svn.wordpress.org/trunk@49132
git-svn-id: http://core.svn.wordpress.org/trunk@48894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-12 19:54:05 +00:00
TimothyBlynJacobs
f5c67c386f
REST API: Introduce search term handler.
...
This allows for clients to search the available terms via the `/wp/v2/search` endpoint by using a `type=term` query parameter.
Fixes #51458 .
Props andraganescu, zieladam, noisysocks, TimothyBlynJacobs.
Built from https://develop.svn.wordpress.org/trunk@49103
git-svn-id: http://core.svn.wordpress.org/trunk@48865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-08 01:32:05 +00:00
Sergey Biryukov
0f13b2c268
Docs: Add `@since` notes for the `$id` parameter of REST API search controller accepting a string.
...
Follow-up to [49088].
See #51131 .
Built from https://develop.svn.wordpress.org/trunk@49089
git-svn-id: http://core.svn.wordpress.org/trunk@48851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-03 01:22:11 +00:00
TimothyBlynJacobs
e9b5b1a5bc
REST API: Allow for string ids in the search controller.
...
Previously, the search controller infrastructure required that the id property was an integer. This prevents data models that use a string id from utilizing the search infrastructure.
This commit lifts the restraint that search handlers return integer ids. This will allow for the Post Formats search handler coming in 5.6 to use slugs instead of creating fake ids.
Props stoyangeorgiev.
Fixes #51131 .
Built from https://develop.svn.wordpress.org/trunk@49088
git-svn-id: http://core.svn.wordpress.org/trunk@48850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-02 17:47:09 +00:00
TimothyBlynJacobs
0615a9ab37
REST API: Use new `rest_get_route_for_post()` in the post search handler.
...
In [48273] the rest_get_route_for_post function was introduced. This simplifies determining the REST API route for any given post object and adds a filter for custom controllers.
Props ravatparmar.
Fixes #50529 .
Built from https://develop.svn.wordpress.org/trunk@48381
git-svn-id: http://core.svn.wordpress.org/trunk@48150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 15:31:02 +00:00
Sergey Biryukov
cbd6fd7a30
Docs: Add missing `@see` tag to `WP_REST_Post_Search_Handler` DocBlock.
...
Props vishitshah.
Fixes #47230 .
Built from https://develop.svn.wordpress.org/trunk@45305
git-svn-id: http://core.svn.wordpress.org/trunk@45114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-14 15:00:07 +00:00
desrosj
cd7b916d55
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 .
Built from https://develop.svn.wordpress.org/trunk@44482
git-svn-id: http://core.svn.wordpress.org/trunk@44313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 21:45:48 +00:00
Gary Pendergast
6cbb6f9bd2
REST API: Introduce controller for searching across post types.
...
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.
Merges [43739,43741] from the 5.0 branch to trunk.
Props danielbachhuber, flixos90, pento, rmccue, joehoyle.
Fixes #39965 .
Built from https://develop.svn.wordpress.org/trunk@44107
git-svn-id: http://core.svn.wordpress.org/trunk@43937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 09:38:25 +00:00