On this page
WP_REST_Search_Handler::prepare_item( int|string $id, array $fields ): array
Prepares the search result for a given ID.
Parameters
$idint|string Required-
Item ID.
$fieldsarray Required-
Fields to include for the item.
Return
array Associative array containing all fields for the item.
Source
File: wp-includes/rest-api/search/class-wp-rest-search-handler.php. View all references
abstract public function prepare_item( $id, array $fields );
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_search_handler/prepare_item