You are here

function simplenews_subscription_filters in Simplenews 7

Same name and namespace in other branches
  1. 5 simplenews.module \simplenews_subscription_filters()
  2. 6.2 includes/simplenews.admin.inc \simplenews_subscription_filters()
  3. 6 simplenews.admin.inc \simplenews_subscription_filters()
  4. 7.2 includes/simplenews.admin.inc \simplenews_subscription_filters()

Generate subscription filters

1 call to simplenews_subscription_filters()
simplenews_subscription_filter_form in includes/simplenews.admin.inc
Return form for subscription filters.

File

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

Code

function simplenews_subscription_filters() {

  // Newsletter filter
  $filters['list'] = array(
    'title' => t('Subscribed to'),
    'options' => array(
      'all' => t('All newsletters'),
    ),
  );
  foreach (simplenews_categories_load_multiple() as $list) {
    $filters['list']['options']['tid-' . $list->tid] = _simplenews_newsletter_name($list);
  }

  // Email filter
  $filters['email'] = array(
    'title' => t('Email address'),
  );
  return $filters;
}