You are here

function answers_node_delete in Answers 7

Same name and namespace in other branches
  1. 7.4 answers.module \answers_node_delete()
  2. 7.2 answers.module \answers_node_delete()
  3. 7.3 answers.module \answers_node_delete()

File

./answers.module, line 92

Code

function answers_node_delete($node) {
  if ($node->type == 'question') {
    $answer_nids = _answers_question_answers($node);
    foreach ($answer_nids as $answer_nid) {
      node_delete($answer_nid);
    }
  }
}