WPDev.one
Core Class

WP_REST_Template_Revisions_Controller

class WP_REST_Template_Revisions_Controller // Constructor: function Object() { [native code] }

Core class used to access template revisions via the REST API.

Methods 7 methods

Method / Return Description
__construct()
void

Constructor.

Parameters: $parent_post_type: mixed
register_routes()
void

Registers the routes for revisions based on post types supporting revisions.

get_parent()
(WP_Post

Gets the parent post, if the template ID is valid.

Parameters: $parent_template_id: mixed
prepare_item_for_response()
WP_REST_Response

Prepares the item for the REST response.

Parameters: $item: mixed, $request: mixed
delete_item_permissions_check()
(true

Checks if a given request has access to delete a revision.

Parameters: $request: mixed
prepare_links()
array

Prepares links for the request.

Parameters: $template: mixed
get_item_schema()
array

Retrieves the item's schema, conforming to JSON Schema.

Properties

Property / Type Description
$parent_post_type
mixed
public
No description available.
$parent_controller
mixed
public
No description available.
$parent_base
mixed
public
No description available.

Class Information

Since Version
6.4.0
Source File
wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php
Advertisement