Core Class
View Source on Trac ↗
Core Class
WP_REST_Autosaves_Controller
class WP_REST_Autosaves_Controller
// Constructor: function Object() { [native code] } Core class used to access autosaves via the REST API.
Methods 12 methods
| Method / Return | Description |
|---|---|
| __construct() void | Constructor.
Parameters: $parent_post_type: mixed |
| register_routes() void | Registers the routes for autosaves. |
| get_parent() (WP_Post | Get the parent post.
Parameters: $parent_id: mixed |
| get_items_permissions_check() (true | Checks if a given request has access to get autosaves.
Parameters: $request: mixed |
| create_item_permissions_check() (true | Checks if a given request has access to create an autosave revision.
Parameters: $request: mixed |
| create_item() (WP_REST_Response | Creates, updates or deletes an autosave revision.
Parameters: $request: mixed |
| get_item() (WP_Post | Get the autosave, if the ID is valid.
Parameters: $request: mixed |
| get_items() (WP_REST_Response | Gets a collection of autosaves using wp_get_post_autosave.
Parameters: $request: mixed |
| get_item_schema() array | Retrieves the autosave's schema, conforming to JSON Schema. |
| create_post_autosave() mixed | Creates autosave for the specified post.
Parameters: $post_data: mixed, $meta: array |
| prepare_item_for_response() WP_REST_Response | Prepares the revision for the REST response.
Parameters: $item: mixed, $request: mixed |
| get_collection_params() array | Retrieves the query params for the autosaves collection. |
Properties
| Property / Type | Description |
|---|---|
| $parent_post_type mixed public | No description available. |
| $parent_controller mixed public | No description available. |
| $revisions_controller mixed public | No description available. |
| $parent_base mixed public | No description available. |
Class Information
Since Version
5.0.0
Source File
wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php
Advertisement