rest_delete_comment action-hook . WP 4.7.0
Fires after a comment is deleted via the REST API.
Usage
add_action( 'rest_delete_comment', 'action_function_name_2606', 10, 3 ); function action_function_name_2606( $comment, $response, $request ){ // action... }
- $comment(WP_Comment)
- The deleted comment data.
- $response(WP_REST_Response)
- The response returned from the API.
- $request(WP_REST_Request)
- The request sent to the API.
Changelog
Since 4.7.0 | Introduced. |
Where the hook is called
rest_delete_comment
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php 1022
do_action( 'rest_delete_comment', $comment, $response, $request );