function taxonomy_overview_vocabularies_submit

taxonomy_overview_vocabularies_submit($form, &$form_state)

Submit handler for vocabularies overview. Updates changed vocabulary weights.

See also

taxonomy_overview_vocabularies()

File

modules/taxonomy/taxonomy.admin.inc, line 50
Administrative page callbacks for the taxonomy module.

Code

function taxonomy_overview_vocabularies_submit($form, &$form_state) {
  foreach ($form_state['values'] as $vid => $vocabulary) {
    if (is_numeric($vid) && $form[$vid]['#vocabulary']->weight != $form_state['values'][$vid]['weight']) {
      $form[$vid]['#vocabulary']->weight = $form_state['values'][$vid]['weight'];
      taxonomy_vocabulary_save($form[$vid]['#vocabulary']);
    }
  }
  drupal_set_message(t('The configuration options have been saved.'));
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.admin.inc/function/taxonomy_overview_vocabularies_submit/7.x