taxonomy_form_vocabulary_submit

Definition

taxonomy_form_vocabulary_submit($form_id, $form_values)
modules/taxonomy.module, line 265

Description

Accept the form submission for a vocabulary and save the results.

Code

<?php
function taxonomy_form_vocabulary_submit($form_id, $form_values) {
  // Fix up the nodes array to remove unchecked nodes.
  $form_values['nodes'] = array_filter($form_values['nodes']);
  switch (taxonomy_save_vocabulary($form_values)) {
  case SAVED_NEW:
    drupal_set_message(t('Created new vocabulary %name.', array('%name' => theme('placeholder', $form_values['name']))));
    break;
  case SAVED_UPDATED:
    drupal_set_message(t('Updated vocabulary %name.', array('%name' => theme('placeholder', $form_values['name']))));
    break;
  }
  return 'admin/taxonomy';
}
?>
 
 

Drupal is a registered trademark of Dries Buytaert.