You are here

function simplenews_action_info_alter in Simplenews 6.2

Implementation of hook_action_info_alter().

Makes user and system actions available to the Simplenews 'subscribe' and 'unsubscribe' triggers.

File

simplenews_action/simplenews_action.module, line 57
Provide actions for simplenews.

Code

function simplenews_action_info_alter(&$actions) {
  foreach ($actions as $id => $action) {
    if ($action['type'] == 'user' || $action['type'] == 'system') {
      $actions[$id]['hooks']['simplenews'] = array(
        'subscribe',
        'unsubscribe',
      );
    }
  }
}