$data) { if (stripos($file, 'wpml') === false && stripos($file, 'sitepress') === false) continue; $is_active = in_array($file, $active, true); echo sprintf(" %-50s %s (v%s)\n", $file, $is_active ? '[ACTIVE]' : '[inactive]', $data['Version']); } echo "\nSitepress settings (extracted) :\n"; $opts = get_option('icl_sitepress_settings'); $keys = [ ['translation-management', 'doc_translation_method'], ['translation-management', 'ate', 'ate_enabled'], ['existing_content_language_verified'], ['setup_complete'], ['language_negotiation_type'], ]; foreach ($keys as $path) { $val = $opts; foreach ($path as $k) { $val = is_array($val) && isset($val[$k]) ? $val[$k] : null; if ($val === null) break; } echo " " . implode('.', $path) . " = " . (is_scalar($val) ? var_export($val, true) : '(' . gettype($val) . ')') . "\n"; } // Has Translation Management features ? echo "\nFeature detection :\n"; echo " class TranslationManagement exists : " . (class_exists('TranslationManagement') ? 'yes' : 'no') . "\n"; echo " class WPML_TM_Loader exists : " . (class_exists('WPML_TM_Loader') ? 'yes' : 'no') . "\n"; echo " class WPML_String_Translation exists : " . (class_exists('WPML_String_Translation') ? 'yes' : 'no') . "\n"; echo " WPML_TM_VERSION defined : " . (defined('WPML_TM_VERSION') ? WPML_TM_VERSION : 'no') . "\n"; exit; });