You are here

function hook_subscriptions_digest_alter in Subscriptions 6

Same name and namespace in other branches
  1. 7 docs/docs.php \hook_subscriptions_digest_alter()
  2. 2.0.x subscriptions.api.php \hook_subscriptions_digest_alter()

This alter hook is called immediately before sending of a digest.

You get the digest bodies as well as the prepared mailvars just before they are merged into a digest, and you can do with them whatever you like. At the very extreme, you can remove digest items or even set $digest_data to NULL to suppress sending this digest.

Related topics

1 invocation of hook_subscriptions_digest_alter()
_subscriptions_mail_cron in ./subscriptions_mail.cron.inc
Implementation of hook_cron().

File

docs/docs.php, line 69
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.

Code

function hook_subscriptions_digest_alter(&$digest_data) {
  $digest_data['mailvars']['!digest_count'] = count($digest_data['bodies']);
}