function _simplenews_scheduler_get_pid in Simplenews Scheduler 7
Same name and namespace in other branches
- 6.2 simplenews_scheduler.module \_simplenews_scheduler_get_pid()
- 6 simplenews_scheduler.module \_simplenews_scheduler_get_pid()
Helper function to get the identifier of newsletter.
Parameters
$node: The node object for the newsletter.
Return value
If the node is a newsletter edition, the node id of its parent template newsletter; if the node is a template newsletter, its own node id; and FALSE if the node is not part of a scheduled newsletter set.
1 call to _simplenews_scheduler_get_pid()
- simplenews_scheduler_node_page in ./
simplenews_scheduler.module - Menu callback to provide an overview page with the scheduled newsletters.
File
- ./
simplenews_scheduler.module, line 733 - Simplenews Scheduler module allows a schedule to be set for sending (and resending) a Simplenews item.
Code
function _simplenews_scheduler_get_pid($node) {
// First assume this is a newsletter edition,
if (isset($node->simplenews_scheduler_edition)) {
return $node->simplenews_scheduler_edition->pid;
}
elseif (isset($node->simplenews_scheduler)) {
return $node->nid;
}
return FALSE;
}