Community Documentation

_translation_tab_access

6 translation.module _translation_tab_access($node)
7 translation.module _translation_tab_access($node)
8 translation.module _translation_tab_access($node)

Menu access callback.

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

File

modules/translation/translation.module, line 77
Manages content translations.

Code

<?php
function _translation_tab_access($node) {
  return !empty($node->language) && translation_supported_type($node->type) && node_access('view', $node) && user_access('translate content');
}
?>
Login or register to post comments