function ad_actions_action_info_alter in Advertisement 7
Same name and namespace in other branches
- 6.3 actions/ad_actions.module \ad_actions_action_info_alter()
- 6.2 actions/ad_actions.module \ad_actions_action_info_alter()
Implementation of hook_action_info_alter Allow ad module triggers to trigger other actions.
File
- actions/
ad_actions.module, line 259 - Enable ad triggers and actions.
Code
function ad_actions_action_info_alter(&$info) {
// Add this modules's triggers to the core system email action
if (isset($info['system_send_email_action']['hooks']['ad_actions'])) {
array_merge($info['system_send_email_action']['hooks']['ad_actions'], array(
'click',
'approved',
'pending',
'offline',
'denied',
'active',
'autoactivated',
'expired',
'autoexpired',
'created',
'update',
'delete',
));
}
else {
$info['system_send_email_action']['hooks']['ad_actions'] = array(
'click',
'approved',
'pending',
'offline',
'denied',
'active',
'autoactivated',
'expired',
'autoexpired',
'created',
'update',
'delete',
);
}
// Add this modules's triggers to the core system message action
if (isset($info['system_message_action']['hooks']['ad_actions'])) {
array_merge($info['system_message_action']['hooks']['ad_actions'], array(
'click',
'approved',
'pending',
'offline',
'denied',
'active',
'autoactivated',
'expired',
'autoexpired',
'created',
'update',
'delete',
));
}
else {
$info['system_message_action']['hooks']['ad_actions'] = array(
'click',
'approved',
'pending',
'offline',
'denied',
'active',
'autoactivated',
'expired',
'autoexpired',
'created',
'update',
'delete',
);
}
// Add this modules's triggers to the core system goto action
if (isset($info['system_goto_action']['hooks']['ad_actions'])) {
array_merge($info['system_goto_action']['hooks']['ad_actions'], array(
'click',
'approved',
'pending',
'offline',
'denied',
'active',
'autoactivated',
'expired',
'autoexpired',
'created',
'update',
'delete',
));
}
else {
$info['system_goto_action']['hooks']['ad_actions'] = array(
'click',
'approved',
'pending',
'offline',
'denied',
'active',
'autoactivated',
'expired',
'autoexpired',
'created',
'update',
'delete',
);
}
// Add this modules's triggers to the token message action
if (isset($info['token_actions_message_action']['hooks']['ad_actions'])) {
array_merge($info['token_actions_message_action']['hooks']['ad_actions'], array(
'click',
'approved',
'pending',
'offline',
'denied',
'active',
'autoactivated',
'expired',
'autoexpired',
'created',
'update',
'delete',
));
}
else {
$info['token_actions_message_action']['hooks']['ad_actions'] = array(
'click',
'approved',
'pending',
'offline',
'denied',
'active',
'autoactivated',
'expired',
'autoexpired',
'created',
'update',
'delete',
);
}
// Add this modules's triggers to the token send email action
if (isset($info['token_actions_send_email_action']['hooks']['ad_actions'])) {
array_merge($info['token_actions_send_email_action']['hooks']['ad_actions'], array(
'click',
'approved',
'pending',
'offline',
'denied',
'active',
'autoactivated',
'expired',
'autoexpired',
'created',
'update',
'delete',
));
}
else {
$info['token_actions_send_email_action']['hooks']['ad_actions'] = array(
'click',
'approvated',
'pending',
'offline',
'denied',
'active',
'autoactivated',
'expired',
'autoexpired',
'created',
'update',
'delete',
);
}
// Add this modules's triggers to the token goto action
if (isset($info['token_actions_goto_action']['hooks']['ad_actions'])) {
array_merge($info['token_actions_goto_action']['hooks']['ad_actions'], array(
'click',
'approved',
'pending',
'offline',
'denied',
'active',
'autoactivated',
'expired',
'autoexpired',
'created',
'update',
'delete',
));
}
else {
$info['token_actions_goto_action']['hooks']['ad_actions'] = array(
'click',
'approved',
'pending',
'offline',
'denied',
'active',
'autoactivated',
'expired',
'autoexpired',
'created',
'update',
'delete',
);
}
}