You are here

function poll_delete in Drupal 7

Same name and namespace in other branches
  1. 4 modules/poll.module \poll_delete()
  2. 5 modules/poll/poll.module \poll_delete()
  3. 6 modules/poll/poll.module \poll_delete()

Implements hook_delete().

File

modules/poll/poll.module, line 615
Enables your site to capture votes on different topics in the form of multiple choice questions.

Code

function poll_delete($node) {
  db_delete('poll')
    ->condition('nid', $node->nid)
    ->execute();
  db_delete('poll_choice')
    ->condition('nid', $node->nid)
    ->execute();
  db_delete('poll_vote')
    ->condition('nid', $node->nid)
    ->execute();
}