You are here

function simplenews_admin_category_delete in Simplenews 7

Menu callback: Delete newsletter category.

See also

simplenews_admin_category_delete_submit()

1 call to simplenews_admin_category_delete()
simplenews_admin_category_form in includes/simplenews.admin.inc
Menu callback: newsletter admin form for newsletter add/edit.
1 string reference to 'simplenews_admin_category_delete'
simplenews_menu in ./simplenews.module
Implements hook_menu().

File

includes/simplenews.admin.inc, line 669
Newsletter admin, subscription admin, simplenews settings

Code

function simplenews_admin_category_delete($form, &$form_state, $category) {

  // Store some category values for submit handling.
  $form = array();
  $form['tid'] = array(
    '#type' => 'value',
    '#value' => $category->tid,
  );
  $form['name'] = array(
    '#type' => 'value',
    '#value' => _simplenews_newsletter_name($category),
  );
  $form['notice'] = array(
    '#markup' => '<p><strong>' . t('Note: All subscriptions associated with this newsletter will be lost.') . '</strong></p>',
  );
  return confirm_form($form, t('Are you sure you want to delete category %name?', array(
    '%name' => _simplenews_newsletter_name($category),
  )), 'admin/config/services/simplenews', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}