WP_REST_Revisions_Controller
class WP_REST_Revisions_Controller
// Constructor: function Object() { [native code] } Core class used to access revisions via the REST API.
Methods 16 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 | Get the parent post, if the ID is valid.
Parameters: $parent_post_id: mixed |
| get_items_permissions_check() (true | Checks if a given request has access to get revisions.
Parameters: $request: mixed |
| get_revision() (WP_Post | Get the revision, if the ID is valid.
Parameters: $id: mixed |
| get_items() (WP_REST_Response | Gets a collection of revisions.
Parameters: $request: mixed |
| get_item_permissions_check() (true | Checks if a given request has access to get a specific revision.
Parameters: $request: mixed |
| get_item() (WP_REST_Response | Retrieves one revision from the collection.
Parameters: $request: mixed |
| delete_item_permissions_check() (true | Checks if a given request has access to delete a revision.
Parameters: $request: mixed |
| delete_item() (WP_REST_Response | Deletes a single revision.
Parameters: $request: mixed |
| prepare_items_query() array | Determines the allowed query_vars for a get_items() response and prepares
Parameters: $prepared_args: mixed, $request: mixed |
| prepare_item_for_response() WP_REST_Response | Prepares the revision for the REST response.
Parameters: $item: mixed, $request: mixed |
| prepare_date_response() (string | Checks the post_date_gmt or modified_gmt and prepare any post or
Parameters: $date_gmt: mixed, $date: mixed |
| get_item_schema() array | Retrieves the revision's schema, conforming to JSON Schema. |
| get_collection_params() array | Retrieves the query params for collections. |
| prepare_excerpt_response() string | Checks the post excerpt and prepare it for single post output.
Parameters: $excerpt: mixed, $post: mixed |
Properties
| Property / Type | Description |
|---|---|
| $parent_post_type mixed public | No description available. |
| $meta mixed public | No description available. |
| $parent_controller mixed public | No description available. |
| $parent_base mixed public | No description available. |