You are here

function lingotek_get_source_node in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.5 lingotek.util.inc \lingotek_get_source_node()
  2. 7.6 lingotek.util.inc \lingotek_get_source_node()
3 calls to lingotek_get_source_node()
lingotek_get_language_override_form_submit in ./lingotek.module
lingotek_node_view in ./lingotek.module
Implements hook_node_view().
lingotek_process_entity_xml in ./lingotek.remote.inc

File

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

Code

function lingotek_get_source_node($node) {
  if (!empty($node->tnid)) {
    return lingotek_entity_load_single('node', $node->tnid);
  }
  return lingotek_entity_load_single('node', $node->nid);
}