pre_comment_on_post
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
pre_comment_on_post
wp-includes/comment.php 3736
do_action( 'pre_comment_on_post', $comment_post_id );