rest_delete_revision action-hook . WP 4.7.0
Fires after a revision is deleted via the REST API.
Usage
add_action( 'rest_delete_revision', 'action_function_name_6558', 10, 2 ); function action_function_name_6558( $result, $request ){ // action... }
- $result(WP_Post/false/null)
- The revision object (if it was deleted or moved to the Trash successfully) or false or null (failure). If the revision was moved to the Trash, $result represents its new state; if it was deleted, $result represents its state before deletion.
- $request(WP_REST_Request)
- The request sent to the API.
Changelog
Since 4.7.0 | Introduced. |
Where the hook is called
rest_delete_revision
wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php 479
do_action( 'rest_delete_revision', $result, $request );