WP_REST_Autosaves_Controller::get_item_schema

Advertisement

Summery Summery

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

Syntax Syntax

WP_REST_Autosaves_Controller::get_item_schema()

Return Return

(array) Item schema data.

Source Source

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

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

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

		$schema['properties']['preview_link'] = array(
			'description' => __( 'Preview link for the post.' ),
			'type'        => 'string',
			'format'      => 'uri',
			'context'     => array( 'edit' ),
			'readonly'    => true,
		);

		$this->schema = $schema;

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

	/**

Advertisement

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Advertisement

Leave a Reply