You are here

function simplenews_admin_types_delete in Simplenews 5

Same name and namespace in other branches
  1. 6.2 includes/simplenews.admin.inc \simplenews_admin_types_delete()
  2. 6 simplenews.admin.inc \simplenews_admin_types_delete()

Forms API callback; newsletter (term) delete form.

1 string reference to 'simplenews_admin_types_delete'
simplenews_menu in ./simplenews.module
Implementation of hook_menu().

File

./simplenews.module, line 2577

Code

function simplenews_admin_types_delete($tid = NULL) {
  if (!isset($tid)) {
    drupal_not_found();
    return;
  }
  $term = taxonomy_get_term($tid);
  $form = array();
  $form['tid'] = array(
    '#type' => 'value',
    '#value' => $tid,
  );
  return confirm_form($form, t('Are you sure you want to delete %title? All subscriptions associated with this newsletter will be lost.', array(
    '%title' => $term->name,
  )), $_GET['destination'] ? $_GET['destination'] : 'admin/content/newsletters/types', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}