function total_control_taxonomy_content_type_edit_form in Total Control Admin Dashboard 6
Same name and namespace in other branches
- 6.2 plugins/content_types/taxonomy.inc \total_control_taxonomy_content_type_edit_form()
- 7.2 plugins/content_types/taxonomy.inc \total_control_taxonomy_content_type_edit_form()
File
- plugins/
content_types/ taxonomy.inc, line 77
Code
function total_control_taxonomy_content_type_edit_form(&$form, &$form_state) {
$conf = $form_state['conf'];
$vocabs = taxonomy_get_vocabularies();
if (!empty($vocabs)) {
$vocab_options = array();
$vocab_defaults = array();
foreach ($vocabs as $vid => $vocab) {
$vocab_options[$vid] = $vocab->name;
$vocab_defaults[] = $vid;
}
$form['vids'] = array(
'#type' => 'checkboxes',
'#title' => t('Include Vocabularies'),
'#multiple' => true,
'#options' => $vocab_options,
'#default_value' => $form_state['op'] == 'add' ? $vocab_defaults : $conf['vids'],
);
}
return $form;
}