function workbench_access_form_taxonomy_form_vocabulary_alter in Workbench Access 7
Implements hook_form_FORM_ID_alter().
Add a sections form to native vocabulary editing.
File
- ./
workbench_access.module, line 1667 - Workbench Access module file.
Code
function workbench_access_form_taxonomy_form_vocabulary_alter(&$form, &$form_state, $form_id) {
if (!user_access('administer workbench access') || variable_get('workbench_access') != 'taxonomy') {
return;
}
$vocabulary = $form['#vocabulary'];
$active = array_filter(variable_get('workbench_access_taxonomy', array()));
if (!in_array($vocabulary->machine_name, $active)) {
// TODO: allow this to be made a category.
return;
}
$access_id = isset($vocabulary->machine_name) ? $vocabulary->machine_name : NULL;
workbench_access_edit_form_alter($form, $access_id, 'vocabulary');
}