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.


git-svn-id: https://develop.svn.wordpress.org/trunk@49132 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Timothy Jacobs
2020-10-12 19:52:57 +00:00
parent 405a561301
commit c39f290124
5 changed files with 197 additions and 1 deletions
+1
View File
@@ -276,6 +276,7 @@ function create_initial_rest_routes() {
$search_handlers = array(
new WP_REST_Post_Search_Handler(),
new WP_REST_Term_Search_Handler(),
new WP_REST_Post_Format_Search_Handler(),
);
/**