You are here

function simplify_form_taxonomy_term_form_alter in Simplify 8

Implements hook_form_FORM_ID_alter() for taxonomy_term_tags_form().

Simplifies the taxonomy "edit term" page.

File

./simplify.module, line 268
Hooks implemented by the simplify module.

Code

function simplify_form_taxonomy_term_form_alter(&$form, FormStateInterface $form_state, $form_id) {
  $vid = $form['vid']['#value'];

  // Get array of fields to hide.
  $global_fields = _simplify_get_config_value('simplify_taxonomies_global');
  $vocabulary_fields = _simplify_get_config_value('simplify_taxonomies', [], 'simplify.vocabulary.' . $vid);
  $fields = array_merge($global_fields, $vocabulary_fields);

  // Hide fields.
  simplify_hide_fields($fields, $form);
}