function simplenews_unsubscribe_user_action_form in Simplenews 6
Same name and namespace in other branches
- 6.2 simplenews_action/simplenews_action.module \simplenews_unsubscribe_user_action_form()
Implementation of a configurable Drupal action.
File
- simplenews_action/
simplenews_action.module, line 265 - simplenews_action.inc Provide actions for simplenews.
Code
function simplenews_unsubscribe_user_action_form($context) {
if (!isset($context['newsletter'])) {
$context['newsletter'] = array();
}
$tree = taxonomy_get_tree(variable_get('simplenews_vid', ''));
$terms = array();
foreach ($tree as $newsletter) {
$terms[$newsletter->tid] = $newsletter->name;
}
$form['newsletter'] = array(
'#title' => t('Newsletter'),
'#type' => 'select',
'#options' => $terms,
'#description' => t('The newsletter series the user will be unsubscribed from.'),
);
return $form;
}