function total_control_taxonomy_content_type_edit_form in Total Control Admin Dashboard 7.2
Same name and namespace in other branches
- 6.2 plugins/content_types/taxonomy.inc \total_control_taxonomy_content_type_edit_form()
- 6 plugins/content_types/taxonomy.inc \total_control_taxonomy_content_type_edit_form()
'Edit form' callback for the content type.
File
- plugins/
content_types/ taxonomy.inc, line 99
Code
function total_control_taxonomy_content_type_edit_form($form, &$form_state) {
$conf = $form_state['conf'];
if (!module_exists('taxonomy')) {
return $form;
}
$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] = $vid;
}
if (isset($conf['vids'])) {
$vocab_defaults = $conf['vids'];
}
$form['vids'] = array(
'#type' => 'checkboxes',
'#title' => t('Include Vocabularies'),
'#multiple' => TRUE,
'#options' => $vocab_options,
'#default_value' => $vocab_defaults,
);
}
return $form;
}