WP_REST_Controller::get_item_schema() WordPress Method
The get_item_schema() method is used to retrieve the schema for a single item from a WordPress object. This is typically used to add extra fields to the schema for an object type.
WP_REST_Controller::get_item_schema() #
Retrieves the item’s schema, conforming to JSON Schema.
Return
(array) Item schema data.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-controller.php
public function get_item_schema() { return $this->add_additional_fields_schema( array() ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |