function simplenews_node_update in Simplenews 7.2
Same name and namespace in other branches
- 7 simplenews.module \simplenews_node_update()
Implements hook_node_update().
File
- ./
simplenews.module, line 391 - Simplenews node handling, sent email, newsletter block and general hooks
Code
function simplenews_node_update($node) {
if (!simplenews_check_node_types($node->type)) {
return;
}
// Check if the newsletter is set to send on publish and needs to be send.
if (simplenews_issue_status($node) == SIMPLENEWS_STATUS_SEND_PUBLISH && $node->status == NODE_PUBLISHED) {
module_load_include('inc', 'simplenews', 'includes/simplenews.mail');
simplenews_add_node_to_spool($node);
}
}