comment_spam_to_approved
Fires when the comment status is in transition from one specific status to another.
The dynamic portions of the hook name, $old_status, and $new_status, refer to the old and new comment statuses, respectively.
This is one of the variants of the dynamic hook comment_(old_status)_to_(new_status)
Usage
add_action( 'comment_spam_to_approved', 'wp_kama_comment_spam_to_approved_action' ); /** * Function for `comment_spam_to_approved` action-hook. * * @param WP_Comment $comment Comment object. * * @return void */ function wp_kama_comment_spam_to_approved_action( $comment ){ // action... }
- $comment(WP_Comment)
- Comment object.
Changelog
Since 2.7.0 | Introduced. |
Where the hook is called
comment_spam_to_approved
wp-includes/comment.php 1819
do_action( "comment_{$old_status}_to_{$new_status}", $comment );