You are here

function subscriptions_content_form_node_admin_content_alter in Subscriptions 6

Same name and namespace in other branches
  1. 7 subscriptions_content.module \subscriptions_content_form_node_admin_content_alter()
  2. 2.0.x subscriptions_content/subscriptions_content.module \subscriptions_content_form_node_admin_content_alter()

Implementation of hook_form_alter().

Add submit handler to catch bulk content operations and suppress notifications by default.

File

./subscriptions_content.module, line 462
Subscriptions to content events

Code

function subscriptions_content_form_node_admin_content_alter(&$form, &$form_state) {
  if (!$form_state['submitted']) {
    $form['admin']['options']['subscriptions_notify'] = array(
      '#type' => 'checkbox',
      '#title' => t('Send subscriptions notifications on %Publish', array(
        '%Publish' => t('Publish'),
      )),
      '#description' => '<br />' . t('When publishing unpublished nodes, you may want to turn this ON.'),
      '#prefix' => '<br />',
    );
    array_unshift($form['admin']['options']['submit']['#submit'], 'subscriptions_content_node_admin_nodes_submit');
  }
}