Fires when the comment status is in transition from one specific status to another.
Description
The dynamic portions of the hook name, $old_status, and $new_status, refer to the old and new comment statuses, respectively. Possible hook names include: <ul> <li>comment_unapproved_to_approved</li> <li>comment_spam_to_approved</li> <li>comment_approved_to_unapproved</li> <li>comment_spam_to_unapproved</li> <li>comment_unapproved_to_spam</li> <li>comment_approved_to_spam</li> </ul>
1916*-`comment_approved_to_spam`1917*1918* @since 2.7.01919*1920* @param WP_Comment$comment Comment object.1921*/1922do_action("comment_{$old_status}_to_{$new_status}",$comment);1923}1924/**1925* Fires when the status of a specific comment type is in transition.1926*1927* The dynamic portions of the hook name,`$new_status`,and`$comment->comment_type`,1928* refer to the newcomment status,and the type of comment, respectively.
History
Introduced in 2.7.0. Unchanged from 6.7.7 through 7.1.0.