function _simplenews_scheduler_tab_permission in Simplenews Scheduler 6.2
Same name and namespace in other branches
- 6 simplenews_scheduler.module \_simplenews_scheduler_tab_permission()
- 7 simplenews_scheduler.module \_simplenews_scheduler_tab_permission()
Check whether to display the Scheduled Newsletter tab.
1 string reference to '_simplenews_scheduler_tab_permission'
- simplenews_scheduler_menu in ./
simplenews_scheduler.module - Implementation of hook_menu().
File
- ./
simplenews_scheduler.module, line 617 - Simplenews Scheduler module allows a schedule to be set for sending (and resending) a Simplenews item.
Code
function _simplenews_scheduler_tab_permission($node) {
if (in_array($node->type, variable_get('simplenews_content_types', array(
'simplenews',
))) && user_access('overview scheduled newsletters')) {
$pid = _simplenews_scheduler_get_pid($node);
// Only display the tab if there is a parent template newsletter or if this
// is itself a template newsletter.
return !empty($pid);
}
else {
return FALSE;
}
}