WP_REST_Global_Styles_Revisions_Controller::get_item_schema(): array

In this article

Retrieves the revision’s schema, conforming to JSON Schema.

Return

array Item schema data.

Source

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

	$schema               = parent::get_item_schema();
	$parent_schema        = $this->parent_controller->get_item_schema();
	$schema['properties'] = array_merge( $schema['properties'], $parent_schema['properties'] );

	unset(
		$schema['properties']['guid'],
		$schema['properties']['slug'],
		$schema['properties']['meta'],
		$schema['properties']['content'],
		$schema['properties']['title']
	);

		$this->schema = $schema;

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

Changelog

VersionDescription
6.6.0Merged parent and parent controller schema data.
6.3.0Introduced.

User Contributed Notes

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