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.


Top ↑

Source

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

	public function get_item_schema() {
		return $this->add_additional_fields_schema( array() );
	}


Top ↑

Changelog

Changelog
VersionDescription
4.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.