You are here

function _answers_notify_node_insert in Answers 7

Same name and namespace in other branches
  1. 7.2 includes/answers.notify.inc \_answers_notify_node_insert()
  2. 7.3 includes/answers.notify.inc \_answers_notify_node_insert()
1 call to _answers_notify_node_insert()
answers_node_insert in ./answers.module

File

includes/answers.notify.inc, line 76
Notification functions for the 'Answers' module

Code

function _answers_notify_node_insert($node) {
  if ($node->type == 'answer') {
    $question_id = $node->field_answer_question['und'][0]['nid'];

    // extract the nid of the question
    if ($question_id) {
      answers_notify_new_answer($question_id);
    }
  }
}