function _answers_notify_node_insert in Answers 7.2
Same name and namespace in other branches
- 7 includes/answers.notify.inc \_answers_notify_node_insert()
- 7.3 includes/answers.notify.inc \_answers_notify_node_insert()
1 call to _answers_notify_node_insert()
File
- includes/
answers.notify.inc, line 78 - Notification functions for the 'Answers' module
Code
function _answers_notify_node_insert($node) {
if ($node->type == 'answer') {
$question = answers_field_get_node_reference($node, 'field_answer_question');
// extract the nid of the question
if ($question->nid) {
answers_notify_new_answer($question->nid);
}
}
}