You are here

function promote_disable_form_node_admin_content_alter in Promote Disable 7

Implements hook_form_FORM_ID_alter().

Remove promote and demote update options on admin/content if configured.

File

./promote_disable.module, line 172
Primarily Drupal hooks and helper functions. This is the main module file for Promote Disable.

Code

function promote_disable_form_node_admin_content_alter(&$form, &$form_state, $form_id) {
  if (variable_get('promote_disabled_node_admin_content', FALSE)) {
    $options = array(
      'demote',
      'promote',
    );
    foreach ($options as $key) {
      unset($form['admin']['options']['operation']['#options'][$key]);
    }
  }
}