You are here

function lingotek_access_dev_tools in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lingotek.util.inc \lingotek_access_dev_tools()
  2. 7.2 lingotek.module \lingotek_access_dev_tools()
  3. 7.3 lingotek.util.inc \lingotek_access_dev_tools()
  4. 7.4 lingotek.util.inc \lingotek_access_dev_tools()
  5. 7.6 lingotek.util.inc \lingotek_access_dev_tools()
1 string reference to 'lingotek_access_dev_tools'
lingotek_menu in ./lingotek.module
Implements hook_menu().

File

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

Code

function lingotek_access_dev_tools($node, $permission) {

  // Special case:  hide the Lingotek Developer Tools when the node is managed by entity translation and has not been pushed to Lingotek
  // OR when not showing advanced features
  $user_access = user_access($permission);
  if ($user_access && module_exists('entity_translation') && entity_translation_node_supported_type($node->type) && !lingotek_node_pushed($node) || !LingotekAccount::instance()
    ->showAdvanced()) {
    return FALSE;
  }

  // Default: Standard user access
  return $user_access;
}