You are here

function _simplenews_scheduler_tab_permission in Simplenews Scheduler 6

Same name and namespace in other branches
  1. 6.2 simplenews_scheduler.module \_simplenews_scheduler_tab_permission()
  2. 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 318
Simplenews Scheduler module allows a schedule to be set for sending (and resending) a Simplenews item.

Code

function _simplenews_scheduler_tab_permission($node) {
  $pid = _simplenews_scheduler_get_pid($node);
  if (in_array($node->type, variable_get('simplenews_content_types', array(
    'simplenews',
  ))) && user_access('overview scheduled newsletters') && _simplenews_scheduler_count_editions($pid)) {
    return TRUE;
  }
  else {
    return FALSE;
  }
}