You are here

function simplenews_statistics_count_subscribers in Simplenews Statistics 7

Same name and namespace in other branches
  1. 7.2 simplenews_statistics.module \simplenews_statistics_count_subscribers()

Get subscriber count for the given newsletter node.

2 calls to simplenews_statistics_count_subscribers()
simplenews_statistics_handler_subscribers::render in includes/views/handlers/simplenews_statistics_handler_subscribers.inc
Renders the field handler.
simplenews_statistics_mail_alter in ./simplenews_statistics.module
Implements hook_mail_alter().

File

./simplenews_statistics.module, line 425
Main simplenews statistics file.

Code

function simplenews_statistics_count_subscribers($nid) {
  module_load_include('inc', 'simplenews', 'includes/simplenews.admin');
  $newsletter = simplenews_newsletter_load($nid);
  return simplenews_count_subscriptions($newsletter->tid);
}