You are here

function shoutbox_rules_shoutbox in Shoutbox 7

Same name and namespace in other branches
  1. 6.2 shoutbox_rules/shoutbox_rules.module \shoutbox_rules_shoutbox()
  2. 7.2 shoutbox_rules/shoutbox_rules.module \shoutbox_rules_shoutbox()

Implements hook_shoutbox().().

File

shoutbox_rules/shoutbox_rules.module, line 110
Includes any rules integration provided by shoutbox.

Code

function shoutbox_rules_shoutbox($op, &$shout, &$a1 = NULL, $form_state = NULL) {
  global $user;

  // expose some shoutbox events to Rules
  if (in_array($op, array(
    'insert',
    'edit',
    'unpublish',
    'publish',
    'delete',
  ))) {
    rules_invoke_event('shoutbox_' . $op, $user->uid, $shout);
  }
}