Function vanilla_wpml_get_translation
WPML helper function that gets the ID of an object's version in another language, if this object has been translated.
Parameters summary
integer |
$object_id |
The ID of the object. |
string |
$object_type = 'post' |
<p>The type of the object. Defaults to the value 'post'.</p> |
boolean |
$return_original = false |
<p>Whether to return the orginal object if the translation is missing. Defaults to false.</p> |
string |
$language_code = null |
<p>The two letter code of the language in which the original object's version is being sought. Defaults to null.</p> |
Return value summary
integer
|
The ID of the object that corresponds the original object's version in the requested language. |