function taxonomy_access_form_alter in Taxonomy Access Control 6
Same name and namespace in other branches
- 5.2 taxonomy_access.module \taxonomy_access_form_alter()
- 5 taxonomy_access.module \taxonomy_access_form_alter()
Implements hook_form_alter().
@todo Move control of "create" op here @todo Look at feasability to eliminate _restore_terms and _preserve_terms by simply setting the '#access' attribute for those terms.
File
- ./
taxonomy_access.module, line 226 - Allows administrators to specify how each category (in the taxonomy) can be used by various roles.
Code
function taxonomy_access_form_alter(&$form, $form_state, $form_id) {
if ($form['#id'] == 'node-form' && is_numeric($form['nid']['#value'])) {
$form['tac_protected_terms'] = array(
'#type' => 'value',
'#value' => taxonomy_access_preserve_terms($form['#node']),
);
}
}