forum_form_taxonomy_form_vocabulary_alter
function forum_form_taxonomy_form_vocabulary_alter
forum_form_taxonomy_form_vocabulary_alter(&$form, &$form_state, $form_id)
Implements hook_form_FORM_ID_alter() for taxonomy_form_vocabulary().
File
- 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; } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!forum!forum.module/function/forum_form_taxonomy_form_vocabulary_alter/7.x