On this page
do_action( 'wp_set_comment_status', string $comment_id, string $comment_status )
Fires immediately after transitioning a comment’s status from one to another in the database and removing the comment from the object cache, but prior to all status transition hooks.
Parameters
$comment_idstring-
Comment ID as a numeric string.
$comment_statusstring-
Current comment status. Possible values include
'hold','0','approve','1','spam', and'trash'.
Source
File: wp-includes/comment.php. View all references
do_action( 'wp_set_comment_status', $comment->comment_ID, $comment_status );
Related
Used By
| Used By | Description |
|---|---|
| wp_set_comment_status() wp-includes/comment.php | Sets the status of a comment. |
| wp_delete_comment() wp-includes/comment.php | Trashes or deletes a comment. |
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_set_comment_status