function _answers_notify_node_insert in Answers 7.3
Same name and namespace in other branches
- 7 includes/answers.notify.inc \_answers_notify_node_insert()
- 7.2 includes/answers.notify.inc \_answers_notify_node_insert()
Pseudo implementation of hook_node_insert().
See also
1 call to _answers_notify_node_insert()
- answers_node_insert in ./
answers.module - Implements hook_node_insert().
File
- includes/
answers.notify.inc, line 15
Code
function _answers_notify_node_insert($node) {
if ($node->type == 'answer' && variable_get('answers_new_answer_notice_allow_p', TRUE)) {
$question = answers_field_get_node_reference($node, 'field_answer_question');
if ($question && $question->nid) {
answers_notify_new_answer($question);
}
}
}