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

transition_comment_status хук-событие . WP 2.7.0

Fires when the comment status is in transition.

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

add_action( 'transition_comment_status', 'action_function_name_9733', 10, 3 );
function action_function_name_9733( $new_status, $old_status, $comment ){
	// action...
}
$new_status(число/строка)
The new comment status.
$old_status(число/строка)
The old comment status.
$comment(объект)
The comment data.

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

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

Код хука

Фрагмент из: wp-includes/comment.php VER 4.9.6
...
	);
	if ( isset($comment_statuses[$new_status]) ) $new_status = $comment_statuses[$new_status];
	if ( isset($comment_statuses[$old_status]) ) $old_status = $comment_statuses[$old_status];

	// Call the hooks
	if ( $new_status != $old_status ) {
		/**
		 * Fires when the comment status is in transition.
		 *
		 * @since 2.7.0
		 *
		 * @param int|string $new_status The new comment status.
		 * @param int|string $old_status The old comment status.
		 * @param object     $comment    The comment data.
		 */
		do_action( 'transition_comment_status', $new_status, $old_status, $comment );
		/**
		 * 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.
		 *
		 * @since 2.7.0
		 *
		 * @param WP_Comment $comment Comment object.
		 */
		do_action( "comment_{$old_status}_to_{$new_status}", $comment );
	}
	/**
	 * Fires when the status of a specific comment type is in transition.
	 *
...