function termstatus_form_taxonomy_form_term_alter in Taxonomy Term Status 7
Implements hook_form_FORM_ID_alter().
File
- ./
termstatus.module, line 104 - Hook implementations and API for the taxonomy term status module.
Code
function termstatus_form_taxonomy_form_term_alter(&$form, &$form_state, $form_id) {
// Do not show termstatus settings on delete confirmation form.
if (!empty($form_state['confirm_delete'])) {
return;
}
$term = $form_state['term'];
$form['termstatus'] = array(
'#type' => 'fieldset',
'#title' => t('Publishing options'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#weight' => 95,
);
$form['termstatus']['status'] = array(
'#type' => 'checkbox',
'#title' => t('Published'),
'#default_value' => termstatus_term_getstatus($term),
'#description' => t('Only privileged users are allowed to view a taxonomy term if this option is disabled'),
);
}