function forum_form_taxonomy_form_vocabulary_alter

7.x forum.module forum_form_taxonomy_form_vocabulary_alter(&$form, &$form_state, $form_id)

Implements hook_form_FORM_ID_alter() for taxonomy_form_vocabulary().

File

drupal-7.x/modules/forum/forum.module, line 596
Provides discussion forums.

Code

function forum_form_taxonomy_form_vocabulary_alter(&$form, &$form_state, $form_id) {
  $vid = variable_get('forum_nav_vocabulary', 0);
  if (isset($form['vid']['#value']) && $form['vid']['#value'] == $vid) {
    $form['help_forum_vocab'] = array(
      '#markup' => t('This is the designated forum vocabulary. Some of the normal vocabulary options have been removed.'),
      '#weight' => -1,
    );
    // Forum's vocabulary always has single hierarchy. Forums and containers
    // have only one parent or no parent for root items. By default this value
    // is 0.
    $form['hierarchy']['#value'] = 1;
    // Do not allow to delete forum's vocabulary.
    $form['actions']['delete']['#access'] = FALSE;
  }
}