You are here

function simplenews_admin_types_delete in Simplenews 6

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

Menu callback: Delete newsletter series.

See also

simplenews_admin_types_delete_submit()

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

File

./simplenews.admin.inc, line 292
Newsletter admin, subscription admin, simplenews settings

Code

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