function forum_form_taxonomy_form_vocabulary_alter

Implements hook_form_FORM_ID_alter() for taxonomy_form_vocabulary().

File

modules/forum/forum.module, line 596

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;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.