function notifications_content_form_node_form_alter in Notifications 7
Implements hook_form_BASE_FORM_ID_alter().
Skip notifications on node forms
File
- notifications_content/
notifications_content.module, line 136 - Subscriptions to content events
Code
function notifications_content_form_node_form_alter(&$form, $form_state) {
$node = $form['#node'];
// If node is new or unpublished, the event action is 'post'
$action = empty($node->nid) || empty($node->status) ? 'post' : 'update';
// Do not add if content type disabled, creating and create events disabled, updating and update events disabled
if (notifications_content_node_event_enabled($action, $node->type)) {
_notifications_content_add_disable_field($form, !empty($node->notifications_content_disable));
}
}