You are here

function total_control_taxonomy_content_type_edit_form in Total Control Admin Dashboard 6.2

Same name and namespace in other branches
  1. 6 plugins/content_types/taxonomy.inc \total_control_taxonomy_content_type_edit_form()
  2. 7.2 plugins/content_types/taxonomy.inc \total_control_taxonomy_content_type_edit_form()

'Edit form' callback for the content type.

1 string reference to 'total_control_taxonomy_content_type_edit_form'
taxonomy.inc in plugins/content_types/taxonomy.inc
taxonomy.inc

File

plugins/content_types/taxonomy.inc, line 120
taxonomy.inc

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] = $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;
}