function comment_node_delete
comment_node_delete($node)
Implements hook_node_delete().
File
- modules/comment/comment.module, line 1325
- Enables users to comment on published content.
Code
function comment_node_delete($node) { $cids = db_query('SELECT cid FROM {comment} WHERE nid = :nid', array(':nid' => $node->nid))->fetchCol(); comment_delete_multiple($cids); db_delete('node_comment_statistics') ->condition('nid', $node->nid) ->execute(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!comment!comment.module/function/comment_node_delete/7.x