function lingotek_access in Lingotek Translation 7.2
Same name and namespace in other branches
- 7.7 lingotek.util.inc \lingotek_access()
- 7.3 lingotek.util.inc \lingotek_access()
- 7.4 lingotek.util.inc \lingotek_access()
- 7.5 lingotek.util.inc \lingotek_access()
- 7.6 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).
1 call to lingotek_access()
- 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 413 - Utility functions.
Code
function lingotek_access($node, $permission) {
if (lingotek_supported_language($node->language) && lingotek_supported_type($node->type) && node_access('update', $node)) {
if (lingotek_managed_by_entity_translation($node->type) && !lingotek_node_pushed($node)) {
return FALSE;
}
return user_access($permission);
}
return FALSE;
}