예제 #1
0
function wpml_tm_load_ui()
{
    if (version_compare(ICL_SITEPRESS_VERSION, '3.3.1', '>=')) {
        global $sitepress, $wpdb, $WPML_Translation_Management;
        $core_translation_management = wpml_load_core_tm();
        $tm_loader = new WPML_TM_Loader();
        $WPML_Translation_Management = new WPML_Translation_Management($sitepress, $tm_loader, $core_translation_management);
        $WPML_Translation_Management->load();
        $wpml_wp_api = new WPML_WP_API();
        $TranslationProxy = new WPML_Translation_Proxy_API();
        new WPML_TM_Troubleshooting_Reset_Pro_Trans_Config($sitepress, $TranslationProxy, $wpml_wp_api, $wpdb);
        new WPML_TM_Troubleshooting_Clear_TS($wpml_wp_api);
    }
}
예제 #2
0
function wpml_tm_load_ui()
{
    require_once WPML_TM_PATH . '/menu/basket-tab/sitepress-table-basket.class.php';
    require_once WPML_TM_PATH . '/menu/dashboard/wpml-tm-dashboard.class.php';
    require_once WPML_TM_PATH . '/menu/wpml-tm-menus.class.php';
    require_once WPML_TM_PATH . '/menu/wpml-translator-settings.class.php';
    if (version_compare(ICL_SITEPRESS_VERSION, '3.3.1', '>=')) {
        global $sitepress, $wpdb, $WPML_Translation_Management;
        $core_translation_management = wpml_load_core_tm();
        $tm_loader = new WPML_TM_Loader();
        $wpml_tp_translator = new WPML_TP_Translator();
        $WPML_Translation_Management = new WPML_Translation_Management($sitepress, $tm_loader, $core_translation_management, $wpml_tp_translator);
        $WPML_Translation_Management->load();
        if (is_admin()) {
            $wpml_wp_api = new WPML_WP_API();
            $TranslationProxy = new WPML_Translation_Proxy_API();
            new WPML_TM_Troubleshooting_Reset_Pro_Trans_Config($sitepress, $TranslationProxy, $wpml_wp_api, $wpdb);
            new WPML_TM_Troubleshooting_Clear_TS($wpml_wp_api);
            new WPML_TM_Promotions($wpml_wp_api);
        }
    }
}