WP_REST_Controller::add_additional_fields_to_object

SummerySummery

Adds the values from additional fields to a data object.

Syntax

WP_REST_Controller::add_additional_fields_to_object( array $prepared, WP_REST_Request $request )

ParametersParameters

$prepared

(array) (Required) Prepared response array.

$request

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

ReturnReturn

(array) Modified data object with additional fields.

SourceSource

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


			

ChangelogChangelog

Changelog
Version Description
4.7.0 Introduced.
Scroll to Top