Skip navigation
Help

hook_comment_insert

7 comment.api.php hook_comment_insert($comment)

The comment is being inserted.

Parameters

$comment: The comment object.

Related topics

3 functions implement hook_comment_insert()

1 invocation of hook_comment_insert()

File

drupal/modules/comment/comment.api.php, line 32
Hooks provided by the Comment module.

Code

function hook_comment_insert($comment) {
  // Reindex the node when comments are added.
  search_touch_node($comment->nid);
}