WP_REST_Search_Handler::prepare_item

Advertisement

Summery Summery

Prepares the search result for a given ID.

Syntax Syntax

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

Parameters Parameters

$id

(int) (Required) Item ID.

$fields

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

Return Return

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

Source Source

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

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

Advertisement

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.