wp_insert_comment WordPress Action Hook
The wp_insert_comment hook is called when a new comment is inserted into the database. It allows you to do something with the new comment, or perhaps even change it before it is stored.
do_action( 'wp_insert_comment', int $id , WP_Comment $comment ) #
Fires immediately after a comment is inserted into the database.
Parameters
- $id
(int)The comment ID.
- $comment
(WP_Comment)Comment object.
Source
File: wp-includes/comment.php
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |