function simplenews_newsletter_delete in Simplenews 7
Same name and namespace in other branches
- 7.2 simplenews.module \simplenews_newsletter_delete()
Delete simplenews newsletter from the database.
Parameters
$newsletter: Simplenews newsletter object or nid.
Related topics
1 call to simplenews_newsletter_delete()
- simplenews_node_delete in ./
simplenews.module - Implements hook_node_delete().
File
- ./
simplenews.module, line 2012 - Simplenews node handling, sent email, newsletter block and general hooks
Code
function simplenews_newsletter_delete($newsletter) {
if (!is_object($newsletter)) {
$newsletter = simplenews_newsletter_load($newsletter);
}
if ($newsletter) {
db_delete('simplenews_newsletter')
->condition('nid', $newsletter->nid)
->execute();
}
}