Core Class
View Source on Trac ↗
Core Class
WP_REST_Post_Search_Handler
class WP_REST_Post_Search_Handler
// Constructor: function Object() { [native code] } Core class representing a search handler for posts in the REST API.
Methods 6 methods
| Method / Return | Description |
|---|---|
| __construct() void | Constructor. |
| search_items() array | Searches posts for a given search request.
Parameters: $request: WP_REST_Request |
| prepare_item() array | Prepares the search result for a given post ID.
Parameters: $id: mixed, $fields: array |
| prepare_item_links() array | Prepares links for the search result of a given ID.
Parameters: $id: mixed |
| protected_title_format() string | Overwrites the default protected and private title format. |
| detect_rest_item_route() string | Attempts to detect the route to access a single item.
Parameters: $post: mixed |
Class Information
Since Version
5.0.0
Source File
wp-includes/rest-api/search/class-wp-rest-post-search-handler.php
Advertisement