Uses
Uses | Description |
---|---|
wp-includes/l10n.php: __() | Retrieve the translation of $text. |
Retrieves the autosave’s schema, conforming to JSON Schema.
(array) Item schema data.
File: wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php
public function get_item_schema() { if ( $this->schema ) { 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 ); }
Version | Description |
---|---|
5.0.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_autosaves_controller/get_item_schema