WP_REST_Post_Search_Handler
- Since
- 5.0.0
- Source
wp-includes/rest-api/search/class-wp-rest-post-search-handler.php:17
Core class representing a search handler for posts in the REST API.
Compatibility
- WordPress
- since 5.0.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Hooks and filters fired · 1
Every hook that fires from inside WP_REST_Post_Search_Handler, in the order it appears in the class, grouped by the method that fires it.
Methods · 6
- __construct()Constructor.
- search_items()Searches posts for a given search request.
- prepare_item()Prepares the search result for a given post ID.
- prepare_item_links()Prepares links for the search result of a given ID.
- protected_title_format()Overwrites the default protected and private title format.
- detect_rest_item_route()Attempts to detect the route to access a single item.
Changelog
Introduced in 5.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, from
src/wp-includes/rest-api/search/class-wp-rest-post-search-handler.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.