You are here

function _simplenews_scheduler_tab_permission in Simplenews Scheduler 7

Same name and namespace in other branches
  1. 6.2 simplenews_scheduler.module \_simplenews_scheduler_tab_permission()
  2. 6 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
Implements hook_menu().

File

./simplenews_scheduler.module, line 635
Simplenews Scheduler module allows a schedule to be set for sending (and resending) a Simplenews item.

Code

function _simplenews_scheduler_tab_permission($node) {

  // Check if this is a simplenews node type and permission.
  if (simplenews_check_node_types($node->type) && user_access('overview scheduled newsletters')) {

    // Check if this is either a scheduler newsletter or an edition.
    return !empty($node->simplenews_scheduler) || !empty($node->is_edition);
  }
}