hook_comment($op, $comment)
contributions/docs/developer/hooks/core.php, line 96
Act on comment modification.
This hook allows modules to take action whenever changes are made to comments.
$op What type of action is being performed. Possible values:
None.
| Name | Description |
|---|---|
| Hooks | Allow modules to interact with the Drupal core. |
function hook_comment($op, $comment) {
if ($op == 'insert' || $op == 'update') {
$nid = $comment['nid'];
}
cache_clear_all_like(drupal_url(array('id' => $nid)));
}