示例#1
0
function tm_after_load()
{
    require WPML_TM_PATH . '/inc/actions/wpml-tm-action-helper.class.php';
    require WPML_TM_PATH . '/inc/translation-jobs/collections/wpml-abstract-job-collection.class.php';
    require WPML_TM_PATH . '/inc/translation-proxy/wpml-translation-basket.class.php';
    require WPML_TM_PATH . '/inc/translation-proxy/interfaces/TranslationProxy_Interface.php';
    require WPML_TM_PATH . '/inc/translation-proxy/translationproxy.class.php';
    require WPML_TM_PATH . '/inc/ajax.php';
    global $wpml_translation_job_factory, $wpdb, $wpml_tm_translation_status;
    $wpml_translation_job_factory = new WPML_Translation_Job_Factory($wpdb);
    wpml_tm_init_mail_notifications();
    wpml_tm_load_element_translations();
    require WPML_TM_PATH . '/inc/filters/wpml-tm-translation-status.class.php';
    require WPML_TM_PATH . '/inc/filters/wpml-tm-translation-status-display.class.php';
    $wpml_tm_translation_status = new WPML_TM_Translation_Status();
    $wpml_tm_translation_status->init();
    add_action('wpml_pre_status_icon_display', 'wpml_tm_load_status_display_filter');
    require WPML_TM_PATH . '/inc/wpml-private-actions.php';
}
示例#2
0
文件: plugin.php 项目: ryuqing/cake
Author: OnTheGoSystems
Author URI: http://www.onthegosystems.com/
Version: 2.0.2
Plugin Slug: wpml-translation-management
*/
if (defined('WPML_TM_VERSION')) {
    return;
}
define('WPML_TM_VERSION', '2.0.2');
//define( 'WPML_TM_DEV_VERSION', '2.0.1' );
define('WPML_TM_PATH', dirname(__FILE__));
require WPML_TM_PATH . '/inc/wpml-dependencies-check/wpml-bundle-check.class.php';
require WPML_TM_PATH . '/inc/constants.php';
require WPML_TM_PATH . '/inc/translation-proxy/interfaces/TranslationProxy_Interface.php';
global $wpml_translation_job_factory;
$wpml_translation_job_factory = new WPML_Translation_Job_Factory();
require WPML_TM_PATH . '/inc/translation-proxy/wpml-pro-translation.class.php';
require WPML_TM_PATH . '/inc/ajax.php';
require WPML_TM_PATH . '/inc/wpml-translation-management.class.php';
require WPML_TM_PATH . '/inc/wpml-translation-management-xliff.class.php';
require WPML_TM_PATH . '/inc/translation-proxy/translationproxy.class.php';
require WPML_TM_PATH . '/inc/functions-load.php';
wpml_tm_init_mail_notifications();
wpml_tm_load_element_translations();
global $WPML_Translation_Management, $wpml_tm_translation_status;
$WPML_Translation_Management = new WPML_Translation_Management();
require WPML_TM_PATH . '/inc/filters/wpml-tm-translation-status.class.php';
require WPML_TM_PATH . '/inc/filters/wpml-tm-translation-status-display.class.php';
$wpml_tm_translation_status = new WPML_TM_Translation_Status();
add_action('wpml_loaded', array($wpml_tm_translation_status, 'init'));
add_action('wpml_pre_status_icon_display', 'wpml_tm_load_status_display_filter');
function tm_after_load()
{
    global $wpml_tm_translation_status, $wpdb;
    if (!isset($wpml_tm_translation_status)) {
        require WPML_TM_PATH . '/inc/actions/wpml-tm-action-helper.class.php';
        require WPML_TM_PATH . '/inc/translation-jobs/collections/wpml-abstract-job-collection.class.php';
        require WPML_TM_PATH . '/inc/translation-proxy/wpml-translation-basket.class.php';
        require WPML_TM_PATH . '/inc/translation-jobs/wpml-translation-batch.class.php';
        require WPML_TM_PATH . '/inc/translation-proxy/translationproxy.class.php';
        require WPML_TM_PATH . '/inc/ajax.php';
        wpml_tm_load_job_factory();
        wpml_tm_init_mail_notifications();
        wpml_tm_load_element_translations();
        $tm_records = new WPML_TM_Records($wpdb);
        $wpml_tm_translation_status = new WPML_TM_Translation_Status($tm_records);
        $wpml_tm_translation_status->init();
        add_action('wpml_pre_status_icon_display', 'wpml_tm_load_status_display_filter');
        require WPML_TM_PATH . '/inc/wpml-private-actions.php';
    }
}