_translation_tab_access

Versions
6 – 7
_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).

Code

modules/translation/translation.module, line 77

<?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
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.