WordPress at Your Fingertips
action is not described

comment_(new_status)_(comment_type) action-hook . 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'.

Usage

add_action( 'comment_(new_status)_(comment_type)', 'action_function_name_8971', 10, 2 );
function action_function_name_8971( $comment_ID, $comment ){
	// action...
}
$comment_ID(int)
The comment ID.
$comment(WP_Comment)
Comment object.

Changelog

Since 2.7.0 Introduced.

Where the hook is called

wp_transition_comment_status()
comment_(new_status)_(comment_type)
wp-includes/comment.php 1849
do_action( "comment_{$new_status}_{$comment->comment_type}", $comment->comment_ID, $comment );

Where in WP core the hook is used WordPress

wp-admin/includes/class-wp-comments-list-table.php 45
add_filter( 'comment_author', array( $this, 'floated_admin_avatar' ), 10, 2 );
wp-includes/class-walker-comment.php 185
add_filter( 'comment_text', array( $this, 'filter_comment_text' ), 40, 2 );
wp-includes/class-walker-comment.php 203
remove_filter( 'comment_text', array( $this, 'filter_comment_text' ), 40 );
wp-includes/default-filters.php 495
add_action( 'comment_post', 'wp_new_comment_notify_moderator' );
wp-includes/default-filters.php 42
add_filter( 'comment_text', 'wp_kses_post' );
wp-includes/default-filters.php 407
add_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce' );
wp-includes/default-filters.php 279
add_filter( 'comment_flood_filter', 'wp_throttle_comment_flood', 10, 3 );
wp-includes/default-filters.php 237
add_filter( 'comment_text_rss', 'wp_staticize_emoji' );
wp-includes/default-filters.php 236
add_filter( 'comment_text_rss', 'esc_html' );
wp-includes/default-filters.php 234
add_filter( 'comment_author_rss', 'ent2ncr', 8 );
wp-includes/default-filters.php 235
add_filter( 'comment_text_rss', 'ent2ncr', 8 );
wp-includes/default-filters.php 201
add_filter( 'comment_excerpt', 'convert_chars' );
wp-includes/default-filters.php 198
add_filter( 'comment_text', 'convert_smilies', 20 );
wp-includes/default-filters.php 197
add_filter( 'comment_text', 'force_balance_tags', 25 );
wp-includes/default-filters.php 196
add_filter( 'comment_text', 'make_clickable', 9 );
wp-includes/default-filters.php 195
add_filter( 'comment_text', 'convert_chars' );
wp-includes/default-filters.php 144
add_filter( 'comment_text', 'capital_P_dangit', 31 );
wp-includes/default-filters.php 496
add_action( 'comment_post', 'wp_new_comment_notify_postauthor' );