Retrieves the item’s schema, conforming to JSON Schema.
Source
public function get_item_schema() {
return $this->add_additional_fields_schema( array() );
}
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |
CARVIEW |
Retrieves the item’s schema, conforming to JSON Schema.
public function get_item_schema() {
return $this->add_additional_fields_schema( array() );
}
Uses | Description |
---|---|
WP_REST_Controller::add_additional_fields_schema()wp-includes/rest-api/endpoints/class-wp-rest-controller.php | Adds the schema from additional fields to a schema array. |
Used by | Description |
---|---|
WP_REST_Controller::get_fields_for_response()wp-includes/rest-api/endpoints/class-wp-rest-controller.php | Gets an array of fields to be included on the response. |
WP_REST_Controller::get_object_type()wp-includes/rest-api/endpoints/class-wp-rest-controller.php | Retrieves the object type this controller is responsible for managing. |
WP_REST_Controller::get_endpoint_args_for_item_schema()wp-includes/rest-api/endpoints/class-wp-rest-controller.php | Retrieves an array of endpoint arguments from the item schema for the controller. |
WP_REST_Controller::get_public_item_schema()wp-includes/rest-api/endpoints/class-wp-rest-controller.php | Retrieves the item’s schema for display / public consumption purposes. |
WP_REST_Controller::get_context_param()wp-includes/rest-api/endpoints/class-wp-rest-controller.php | Retrieves the magical context param. |
WP_REST_Controller::filter_response_by_context()wp-includes/rest-api/endpoints/class-wp-rest-controller.php | Filters a response based on the context defined in the schema. |
Version | Description |
---|---|
4.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.