You are here

function simplenews_node_tab_access in Simplenews 6.2

Same name and namespace in other branches
  1. 7.2 simplenews.module \simplenews_node_tab_access()
  2. 7 simplenews.module \simplenews_node_tab_access()

Menu item access callback.

Access for Node Tab

1 string reference to 'simplenews_node_tab_access'
simplenews_menu in ./simplenews.module
Implementation of hook_menu().

File

./simplenews.module, line 305
Simplenews node handling, sent email, newsletter block and general hooks

Code

function simplenews_node_tab_access($node = NULL) {
  $simplenews_types = variable_get('simplenews_content_types', array(
    'simplenews',
  ));
  if (in_array($node->type, $simplenews_types) && user_access('send newsletter')) {
    return TRUE;
  }
  else {
    return FALSE;
  }
}