WP_REST_Template_Revisions_Controller::get_item_schema(): array

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-template-revisions-controller.php. View all references

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

	$schema = $this->parent_controller->get_item_schema();

	$schema['properties']['parent'] = array(
		'description' => __( 'The ID for the parent of the revision.' ),
		'type'        => 'integer',
		'context'     => array( 'view', 'edit', 'embed' ),
	);

	$this->schema = $schema;

	return $this->add_additional_fields_schema( $this->schema );
}


Top ↑

Changelog

Changelog
Version Description
6.4.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.