Prepares the search result for a given ID.
(int) (Required) Item ID.
(array) (Required) Fields to include for the item.
(array) Associative array containing all fields for the item.
File: wp-includes/rest-api/search/class-wp-rest-search-handler.php
abstract public function prepare_item( $id, array $fields );
Version | Description |
---|---|
5.0.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_search_handler/prepare_item