unspammed_comment
Fires immediately after a comment is unmarked as Spam.
Usage
add_action( 'unspammed_comment', 'wp_kama_unspammed_comment_action', 10, 2 );
/**
* Function for `unspammed_comment` action-hook.
*
* @param string $comment_id The comment ID as a numeric string.
* @param WP_Comment $comment The comment unmarked as spam.
*
* @return void
*/
function wp_kama_unspammed_comment_action( $comment_id, $comment ){
// action...
}
- $comment_id(string)
- The comment ID as a numeric string.
- $comment(WP_Comment)
- The comment unmarked as spam.
Changelog
| Since 2.9.0 | Introduced. |
| Since 4.9.0 | Added the $comment parameter. |
Where the hook is called
unspammed_comment
wp-includes/comment.php 1761
do_action( 'unspammed_comment', $comment->comment_ID, $comment );