Fires when the status of a specific comment type is in transition.
The dynamic portions of the hook name, $new_status, and $comment->comment_type, refer to the new comment status, and the type of comment, respectively.
Typical comment types include ‘comment’, ‘pingback’, or ‘trackback’.
Possible hook names include:
comment_approved_commentcomment_approved_pingbackcomment_approved_trackbackcomment_unapproved_commentcomment_unapproved_pingbackcomment_unapproved_trackbackcomment_spam_commentcomment_spam_pingbackcomment_spam_trackback$comment_idstring
$commentWP_Comment
do_action( "comment_{$new_status}_{$comment->comment_type}", $comment->comment_ID, $comment );
| Version | Description |
|---|---|
| 2.7.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/comment_new_status_comment-comment_type