You are here

function admin_content_notification_node_insert in Admin Content Notification 7

Same name and namespace in other branches
  1. 8.3 admin_content_notification.module \admin_content_notification_node_insert()
  2. 8 admin_content_notification.module \admin_content_notification_node_insert()
  3. 8.2 admin_content_notification.module \admin_content_notification_node_insert()
  4. 7.2 admin_content_notification.module \admin_content_notification_node_insert()

Implements hook_node_insert().

File

./admin_content_notification.module, line 39
Module admin_content_notification file.

Code

function admin_content_notification_node_insert($node) {
  if (in_array($node->type, variable_get('admin_content_notification_node_types', array()), TRUE)) {
    drupal_mail('admin_content_notification', 'notification', admin_content_notification_get_admin_email(), language_default(), array(
      'message' => admin_content_notification_get_email_body($node),
      'subject' => admin_content_notification_get_email_subject($node),
    ));
  }
}