WP_REST_Post_Types_Controller::prepare_item_for_response

SummerySummery

Prepares a post type object for serialization.

Syntax

WP_REST_Post_Types_Controller::prepare_item_for_response( WP_Post_Type $post_type, WP_REST_Request $request )

ParametersParameters

$post_type

(WP_Post_Type) (Required) Post type object.

$request

(WP_REST_Request) (Required) Full details about the request.

ReturnReturn

(WP_REST_Response) Response object.

SourceSource

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


			

ChangelogChangelog

Changelog
Version Description
4.7.0 Introduced.
Scroll to Top