taxonomy_overview_vocabularies_submit

Definition

taxonomy_overview_vocabularies_submit($form, &$form_state)
modules/taxonomy/taxonomy.admin.inc, line 49

Description

Submit handler for vocabularies overview. Updates changed vocabulary weights.

See also

taxonomy_overview_vocabularies()

Code

<?php
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_save_vocabulary($form[$vid]['#vocabulary']);
    }
  }
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.