function simplenews_admin_category_delete_submit in Simplenews 7
Form submit callback for deleting a simplenews category.
File
- includes/
simplenews.admin.inc, line 686 - Newsletter admin, subscription admin, simplenews settings
Code
function simplenews_admin_category_delete_submit($form, &$form_state) {
$tid = $form_state['values']['tid'];
$name = $form_state['values']['name'];
// Delete newsletter category and associated taxonomy term.
// Subscriptions are deleted by simplenews_simplenews_category_delete()
simplenews_category_delete($tid);
taxonomy_term_delete($tid);
drupal_set_message(t('Newsletter category %name has been deleted.', array(
'%name' => $name,
)));
$form_state['redirect'] = 'admin/config/services/simplenews';
return;
}