trashed_comment action-hook . WP 2.9.0
Fires immediately after a comment is sent to Trash.
Usage
add_action( 'trashed_comment', 'action_function_name_5779', 10, 2 ); function action_function_name_5779( $comment_id, $comment ){ // action... }
- $comment_id(int)
- The comment ID.
- $comment(WP_Comment)
- The trashed comment.
Changelog
Since 2.9.0 | Introduced. |
Since 4.9.0 | Added the $comment parameter. |
Where the hook is called
trashed_comment
wp-includes/comment.php 1580
do_action( 'trashed_comment', $comment->comment_ID, $comment );