function _translation_tab_access

_translation_tab_access($node)

Access callback: Checks that the user has permission to 'translate content'.

Only displays the translation tab for nodes that are not language-neutral of types that have translation enabled.

Parameters

$node: A node object.

Return value

TRUE if the translation tab should be displayed, FALSE otherwise.

See also

translation_menu()

File

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

Code

function _translation_tab_access($node) {
  if (entity_language('node', $node) != LANGUAGE_NONE && translation_supported_type($node->type) && node_access('view', $node)) {
    return user_access('translate content');
  }
  return FALSE;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!translation!translation.module/function/_translation_tab_access/7.x