trashed_post_comments WordPress Action Hook
The "trashed_post_comments" hook is triggered when a comment is moved to the trash. It is useful for performing cleanup tasks such as deleting comment meta data or notifying the comment author that their comment has been deleted.
do_action( 'trashed_post_comments', int $post_id , array $statuses ) #
Fires after comments are sent to the Trash.
Parameters
- $post_id
(int)Post ID.
- $statuses
(array)Array of comment statuses.
Source
File: wp-includes/post.php
Changelog
Version | Description |
---|---|
2.9.0 | Introduced. |