function simplenews_subscription_activate in Simplenews 7.2
Same name and namespace in other branches
- 7 includes/simplenews.admin.inc \simplenews_subscription_activate()
Callback function to (de-)activate subscriptions.
Parameters
$snids: Array of snid's to be activated.
$status: Status of the subscription (0, 1).
2 string references to 'simplenews_subscription_activate'
- hook_simplenews_subscription_operations in ./
simplenews.api.php - Return operations to be applied to subscriptions.
- simplenews_simplenews_subscription_operations in includes/
simplenews.admin.inc - Implements hook_simplenews_subscription_operations().
File
- includes/
simplenews.admin.inc, line 1185 - Newsletter admin, subscription admin, simplenews settings
Code
function simplenews_subscription_activate($snids, $status) {
foreach (simplenews_subscriber_load_multiple($snids) as $subscriber) {
$subscriber->activated = $status;
simplenews_subscriber_save($subscriber);
}
}