function flag_node::get_translation_id in Flag 6.2
Same name and namespace in other branches
- 5 flag.inc \flag_node::get_translation_id()
- 6 flag.inc \flag_node::get_translation_id()
- 7.3 includes/flag/flag_node.inc \flag_node::get_translation_id()
- 7.2 flag.inc \flag_node::get_translation_id()
Adjust the Content ID to find the translation parent if i18n-enabled.
Parameters
$content_id: The nid for the content.
Return value
The tnid if available, the nid otherwise.
2 calls to flag_node::get_translation_id()
File
- ./
flag.inc, line 1358 - Implements various flags. Uses object oriented style inspired by that of Views 2.
Class
- flag_node
- Implements a node flag.
Code
function get_translation_id($content_id) {
if ($this->i18n) {
$node = $this
->fetch_content($content_id);
if (!empty($node->tnid)) {
$content_id = $node->tnid;
}
}
return $content_id;
}