function simplenews_subscription_delete_multiple in Simplenews 7
Callback function to delete subscriptions.
Parameters
$snids: Array of snid's to be deleted.
2 string references to 'simplenews_subscription_delete_multiple'
- 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 1227 - Newsletter admin, subscription admin, simplenews settings
Code
function simplenews_subscription_delete_multiple($snids = array()) {
foreach ($snids as $snid) {
// Delete Subscription
simplenews_subscription_delete(array(
'snid' => $snid,
));
// Delete subscriber
$subscriber = simplenews_subscriber_load($snid);
simplenews_subscriber_delete($subscriber);
}
}