pre_comment_on_post action-hookWP 2.8.0

Fires before a comment is posted.

Usage

add_action( 'pre_comment_on_post', 'wp_kama_pre_comment_on_post_action' );

/**
 * Function for `pre_comment_on_post` action-hook.
 * 
 * @param int $comment_post_id Post ID.
 *
 * @return void
 */
function wp_kama_pre_comment_on_post_action( $comment_post_id ){

	// action...
}
$comment_post_id(int)
Post ID.

Changelog

Since 2.8.0 Introduced.

Where the hook is called

wp_handle_comment_submission()
pre_comment_on_post
wp-includes/comment.php 3598
do_action( 'pre_comment_on_post', $comment_post_id );

Where the hook is used in WordPress

Usage not found.