| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
REST API: WP_REST_Template_Revisions_Controller class
| File Size: | 312 lines (9 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
WP_REST_Template_Revisions_Controller:: (7 methods):
__construct()
register_routes()
get_parent()
prepare_item_for_response()
delete_item_permissions_check()
prepare_links()
get_item_schema()
Class: WP_REST_Template_Revisions_Controller - X-Ref
Core class used to access template revisions via the REST API.| __construct( $parent_post_type ) X-Ref |
| Constructor. param: string $parent_post_type Post type of the parent. |
| register_routes() X-Ref |
| Registers the routes for revisions based on post types supporting revisions. |
| get_parent( $parent_template_id ) X-Ref |
| Gets the parent post, if the template ID is valid. return: WP_Post|WP_Error Post object if ID is valid, WP_Error otherwise. param: string $parent_template_id Supplied ID. |
| prepare_item_for_response( $item, $request ) X-Ref |
| Prepares the item for the REST response. return: WP_REST_Response Response object. param: WP_Post $item Post revision object. param: WP_REST_Request $request Request object. |
| delete_item_permissions_check( $request ) X-Ref |
| Checks if a given request has access to delete a revision. return: true|WP_Error True if the request has access to delete the item, WP_Error object otherwise. param: WP_REST_Request $request Full details about the request. |
| prepare_links( $template ) X-Ref |
| Prepares links for the request. return: array Links for the given post. param: WP_Block_Template $template Template. |
| get_item_schema() X-Ref |
| Retrieves the item's schema, conforming to JSON Schema. return: array Item schema data. |
| Generated : Wed Apr 15 08:20:10 2026 | Cross-referenced by PHPXref |