WordPress как на ладони
WordCamp Saint Petersburg 2018 wordpress jino
событие не описано

comment_(new_status)_(comment_type) хук-событие . WP 2.7.0

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 an empty string (standard comment), 'pingback', or 'trackback'.

Использование

add_action( 'comment_(new_status)_(comment_type)', 'action_function_name_3640', 10, 2 );
function action_function_name_3640( $comment_ID, $comment ){
	// action...
}
$comment_ID(число)
The comment ID.
$comment(WP_Comment)
Comment object.

Где используется хук

wp_transition_comment_status() остальные хуки:

Код хука

Фрагмент из: wp-includes/comment.php VER 4.9.6
...
	}
	/**
	 * 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 an empty string (standard comment), 'pingback',
	 * or 'trackback'.
	 *
	 * @since 2.7.0
	 *
	 * @param int        $comment_ID The comment ID.
	 * @param WP_Comment $comment    Comment object.
	 */
	do_action( "comment_{$new_status}_{$comment->comment_type}", $comment->comment_ID, $comment );
}

/**
 * Clear the lastcommentmodified cached value when a comment status is changed.
 *
 * Deletes the lastcommentmodified cache key when a comment enters or leaves
 * 'approved' status.
 *
 * @since 4.7.0
 * @access private
 *
 * @param string $new_status The new comment status.
 * @param string $old_status The old comment status.
 */
function _clear_modified_cache_on_transition_comment_status( $new_status, $old_status ) {
...