function simplenews_rules_map_confirmation in Simplenews 8
Same name and namespace in other branches
- 8.2 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_map_confirmation()
- 7.2 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_map_confirmation()
- 7 simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_map_confirmation()
- 3.x simplenews_rules/simplenews_rules.rules.inc \simplenews_rules_map_confirmation()
Map args to the confrmation argument for subscribing/unsubscribing.
2 calls to simplenews_rules_map_confirmation()
- simplenews_rules_action_subscribe in simplenews_rules/
simplenews_rules.rules.inc - Action Implementation: Subscribe an e-mail adress to a Simplenews newsletter.
- simplenews_rules_action_unsubscribe in simplenews_rules/
simplenews_rules.rules.inc - Action Implementation: Unsubscribe an e-mail adress to a Simplenews newsletter.
File
- simplenews_rules/
simplenews_rules.rules.inc, line 245 - Rules hooks for the Simplenews newsletter module.
Code
function simplenews_rules_map_confirmation($args) {
switch ($args['confirmation']) {
case SIMPLENEWS_RULES_CONFIRMATION_YES:
$confirmation = TRUE;
break;
case SIMPLENEWS_RULES_CONFIRMATION_NO:
$confirmation = FALSE;
break;
case SIMPLENEWS_RULES_CONFIRMATION_DEFAULT:
$confirmation = NULL;
break;
}
return $confirmation;
}