You are here

function hook_subscriptions_digest_alter in Subscriptions 7

Same name and namespace in other branches
  1. 6 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

File

docs/docs.php, line 32
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']);
}