function translation_helpers_get_source in Translation helpers 6
Same name and namespace in other branches
- 7 translation_helpers.module \translation_helpers_get_source()
Return the source translation of a node.
File
- ./
translation_helpers.module, line 73 - Provides methods for other modules to use with translated content.
Code
function translation_helpers_get_source($node) {
if (isset($node->tnid) && translation_supported_type($node->type)) {
// A node can be its own source.
if ($node->nid == $node->tnid) {
return $node;
}
return node_load($node->tnid);
}
return FALSE;
}