WP_REST_Search_Handler::prepare_item( int $id, array $fields )

Prepares the search result for a given ID.


Description Description


Parameters Parameters

$id

(int) (Required) Item ID.

$fields

(array) (Required) Fields to include for the item.


Top ↑

Return Return

(array) Associative array containing all fields for the item.


Top ↑

Source Source

File: wp-includes/rest-api/search/class-wp-rest-search-handler.php

	abstract public function prepare_item( $id, array $fields );

Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.