Core Class
View Source on Trac ↗
Core Class
WP_REST_Search_Handler
class WP_REST_Search_Handler
// Constructor: function Object() { [native code] } Core base class representing a search handler for an object type in the REST API.
Methods 5 methods
| Method / Return | Description |
|---|---|
| get_type() string | Gets the object type managed by this search handler. |
| get_subtypes() string[] | Gets the object subtypes managed by this search handler. |
| search_items() array | Searches the object type content for a given search request.
Parameters: $request: WP_REST_Request |
| prepare_item() array | Prepares the search result for a given ID.
Parameters: $id: mixed, $fields: array |
| prepare_item_links() array | Prepares links for the search result of a given ID.
Parameters: $id: mixed |
Properties
| Property / Type | Description |
|---|---|
| $type mixed public | No description available. |
| $subtypes mixed public | No description available. |
Class Information
Since Version
5.0.0
Source File
wp-includes/rest-api/search/class-wp-rest-search-handler.php
Advertisement