wp_insert_comment action-hook . WP 2.8.0
Fires immediately after a comment is inserted into the database.
Usage
add_action( 'wp_insert_comment', 'action_function_name_8083', 10, 2 ); function action_function_name_8083( $id, $comment ){ // action... }
- $id(int)
- The comment ID.
- $comment(WP_Comment)
- Comment object.
Changelog
Since 2.8.0 | Introduced. |
Where the hook is called
wp_insert_comment
wp-includes/comment.php 2045
do_action( 'wp_insert_comment', $id, $comment );