WordPress at a glance
action is not described

comment_post action-hook . WP 1.2.0

Fires immediately after a comment is inserted into the database.

Usage

add_action( 'comment_post', 'action_function_name_6836', 10, 3 );
function action_function_name_6836( $comment_ID, $comment_approved, $commentdata ){
	// action...
}
$comment_ID(int)
The comment ID.
$comment_approved(int/string)
1 if the comment is approved, 0 if not, 'spam' if spam.
$commentdata(array)
Comment data.

Notes

  • Since 4.5.0 The $commentdata parameter was added.

Where the hook is called

wp_new_comment()
wp-includes/comment.php 2017
do_action( 'comment_post', $comment_ID, $commentdata['comment_approved'], $commentdata );

Where the hook is used (in WP core)

wp-includes/default-filters.php 425
add_action( 'comment_post', 'wp_new_comment_notify_moderator' );
wp-includes/default-filters.php 426
add_action( 'comment_post', 'wp_new_comment_notify_postauthor' );