$l) { echo " $lc " . ($l['display_name'] ?? '') . " url=" . ($l['url'] ?? '') . "\n"; } echo "\nURL strategy: " . ($setup['language_negotiation_type'] ?? '?') . " (1=lang in dir, 2=domain, 3=lang param)\n"; echo "Hidden langs: " . implode(',', $setup['hidden_languages'] ?? []) . "\n"; exit; } function av_wpml_translations($post_id) { header('Content-Type: text/plain; charset=utf-8'); $type = get_post_type($post_id); $title = get_the_title($post_id); $element = 'post_' . $type; $trid = apply_filters('wpml_element_trid', null, $post_id, $element); $translations = apply_filters('wpml_get_element_translations', null, $trid, $element); echo "Post #$post_id (type=$type) : \"$title\"\n"; echo "trid: " . ($trid ?? 'null') . "\n\n"; echo "Translations:\n"; foreach ((array) $translations as $lc => $t) { $tid = $t->element_id ?? '?'; $name = $t->post_title ?? '?'; $slug = get_post($tid)->post_name ?? '?'; echo " [$lc] id=$tid slug=$slug title=\"$name\"\n"; } exit; }