WP_REST_Controller::prepare_item_for_response

SummerySummery

Prepares the item for the REST response.

Syntax

WP_REST_Controller::prepare_item_for_response( mixed $item, WP_REST_Request $request )

ParametersParameters

$item

(mixed) (Required) WordPress representation of the item.

$request

(WP_REST_Request) (Required) Request object.

ReturnReturn

(WP_REST_Response|WP_Error) Response object on success, or WP_Error object on failure.

SourceSource

File: wp-includes/rest-api/endpoints/class-wp-rest-controller.php


			

ChangelogChangelog

Changelog
Version Description
4.7.0 Introduced.
Scroll to Top