You are here

function lingotek_access in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lingotek.util.inc \lingotek_access()
  2. 7.2 lingotek.util.inc \lingotek_access()
  3. 7.3 lingotek.util.inc \lingotek_access()
  4. 7.4 lingotek.util.inc \lingotek_access()
  5. 7.5 lingotek.util.inc \lingotek_access()

Menu access callback.

Only display Lingotek tab for node types, which have translation enabled and where the current node is not language neutral (which should span all languages).

2 calls to lingotek_access()
lingotek_entity_translation_node_tab_access in ./lingotek.module
Entity Translation access callback when enabled with Lingotek Translation module.
lingotek_node_view in ./lingotek.module
Implements hook_node_view().
1 string reference to 'lingotek_access'
lingotek_menu in ./lingotek.module
Implements hook_menu().

File

./lingotek.util.inc, line 467
Utility functions.

Code

function lingotek_access($node, $permission) {
  if (Lingotek::isSupportedLanguage($node->language) && node_access('update', $node) && $node->lingotek['profile'] != LingotekSync::PROFILE_DISABLED) {
    return user_access($permission);
  }
  return FALSE;
}