You are here

function taxonomy_term_confirm_delete_submit in Drupal 7

Same name and namespace in other branches
  1. 4 modules/taxonomy.module \taxonomy_term_confirm_delete_submit()
  2. 5 modules/taxonomy/taxonomy.module \taxonomy_term_confirm_delete_submit()
  3. 6 modules/taxonomy/taxonomy.admin.inc \taxonomy_term_confirm_delete_submit()

Submit handler to delete a term after confirmation.

See also

taxonomy_term_confirm_delete()

1 call to taxonomy_term_confirm_delete_submit()
taxonomy_form_term_submit in modules/taxonomy/taxonomy.admin.inc
Submit handler to insert or update a term.

File

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

Code

function taxonomy_term_confirm_delete_submit($form, &$form_state) {
  taxonomy_term_delete($form_state['values']['tid']);
  taxonomy_check_vocabulary_hierarchy($form['#vocabulary'], $form_state['values']);
  drupal_set_message(t('Deleted term %name.', array(
    '%name' => $form_state['values']['name'],
  )));
  watchdog('taxonomy', 'Deleted term %name.', array(
    '%name' => $form_state['values']['name'],
  ), WATCHDOG_NOTICE);
  $form_state['redirect'] = 'admin/structure/taxonomy';
  cache_clear_all();
  return;
}