function taxonomy_delete_link_confirm_delete_submit in Taxonomy Delete Link 7
Submit handler to delete a term after confirmation.
File
- includes/
taxonomy_delete_link.admin.inc, line 38 - Provides the term delete form.
Code
function taxonomy_delete_link_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 TRUE;
}