function simplenews_subscription_list_remove in Simplenews 7.2
Same name and namespace in other branches
- 6.2 includes/simplenews.admin.inc \simplenews_subscription_list_remove()
- 6 simplenews.admin.inc \simplenews_subscription_list_remove()
- 7 includes/simplenews.admin.inc \simplenews_subscription_list_remove()
Menu callback: Mass subscribe to newsletters.
@todo Add 32char description field as unsubsription source
See also
simplenews_subscription_list_remove_submit()
1 string reference to 'simplenews_subscription_list_remove'
- simplenews_menu in ./
simplenews.module - Implements hook_menu().
File
- includes/
simplenews.admin.inc, line 944 - Newsletter admin, subscription admin, simplenews settings
Code
function simplenews_subscription_list_remove($form, &$form_state) {
$form['emails'] = array(
'#type' => 'textarea',
'#title' => t('Email addresses'),
'#cols' => 60,
'#rows' => 5,
'#description' => t('Email addresses must be separated by comma, space or newline.'),
);
$form['newsletters'] = array(
'#type' => 'fieldset',
'#description' => t('Unsubscribe from'),
'#tree' => TRUE,
);
foreach (simplenews_newsletter_get_all() as $newsletter) {
$form['newsletters'][$newsletter->newsletter_id] = array(
'#type' => 'checkbox',
'#title' => check_plain($newsletter->name),
'#description' => check_plain($newsletter->description),
);
}
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Unsubscribe'),
);
return $form;
}