You are here

function messaging_notify_messaging_methods_alter in Messaging 6

Implementation of hook_messaging_methods_alter()

File

messaging_notify/messaging_notify.module, line 303
Subscriptions to messaging events

Code

function messaging_notify_messaging_methods_alter(&$info) {

  // If debug enabled, replace all send callbacks
  if ($settings = variable_get('messaging_notify_subscribe', array())) {
    foreach (array_keys($info) as $method) {
      if (!empty($settings[$method])) {
        _messaging_callback_add($info[$method], 'aftersend', _messaging_callback('messaging_notify_aftersend'));
      }
    }
  }
}