I wonder if it exists a "official" way to know if if WMPL is active. Something like is_wpml_active()
Otherwise I would write a script checking if any WPML Class exist.
I'm developing a script that given a post ID would return an array with all ID from its translations.
Maybe is there any WPML function which do this job?
Where can I get a list of available functions.
We develop plugins and themes and many customer request to be compatible with WPML
$post_id = 2; // Here is your ID
$post_type = get_post_type($post_id); // Get the post type
// Get "trid" of the post
$trid = apply_filters( 'wpml_element_trid', NULL, $post_id, 'post_' . $post_type );
// Get the translations
$translations = apply_filters( 'wpml_get_element_translations', NULL, $trid, 'post_' . $post_type);
var_dump($translations);
The topic ‘[Closed] Check if WPML is active’ is closed to new replies.