当前位置: 首页>>代码示例>>PHP>>正文


PHP SitePress::load_core_tm方法代码示例

本文整理汇总了PHP中SitePress::load_core_tm方法的典型用法代码示例。如果您正苦于以下问题:PHP SitePress::load_core_tm方法的具体用法?PHP SitePress::load_core_tm怎么用?PHP SitePress::load_core_tm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SitePress的用法示例。


在下文中一共展示了SitePress::load_core_tm方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: WPML_Global_AJAX

    }
    include_once ICL_PLUGIN_PATH . '/inc/functions-network.php';
    if (get_option('_wpml_inactive', false) && isset($wpmu_sitewide_plugins[ICL_PLUGIN_FOLDER . '/sitepress.php']) && $is_not_network_admin) {
        wpml_set_plugin_as_inactive();
        return;
    }
}
if (!wp_next_scheduled('update_wpml_config_index')) {
    //Set cron job to update WPML config index file from CDN
    wp_schedule_event(time(), 'daily', 'update_wpml_config_index');
}
/** @var WPML_Post_Translation $wpml_post_translations */
global $sitepress, $wpdb, $wpml_url_filters, $wpml_post_translations, $wpml_term_translations, $wpml_url_converter, $wpml_language_resolution, $wpml_slug_filter, $wpml_cache_factory;
$wpml_cache_factory = new WPML_Cache_Factory();
$sitepress = new SitePress();
$sitepress->load_core_tm();
new WPML_Global_AJAX($sitepress);
$wpml_wp_api = $sitepress->get_wp_api();
if ($wpml_wp_api->is_support_page()) {
    new WPML_Support_Page($wpml_wp_api);
}
wpml_load_query_filter(icl_get_setting('setup_complete'));
$canonicals = new WPML_Canonicals($sitepress);
$wpml_url_filters = new WPML_URL_Filters($wpml_post_translations, $wpml_url_converter, $canonicals, $sitepress);
wpml_load_request_handler(is_admin(), $wpml_language_resolution->get_active_language_codes(), $sitepress->get_default_language());
require ICL_PLUGIN_PATH . '/inc/url-handling/wpml-slug-filter.class.php';
$wpml_slug_filter = new WPML_Slug_Filter($wpdb, $sitepress, $wpml_post_translations);
/** @var array $sitepress_settings */
$sitepress_settings = $sitepress->get_settings();
wpml_load_term_filters();
wpml_maybe_setup_post_edit();
开发者ID:studiopengpeng,项目名称:ASCOMETAL,代码行数:31,代码来源:sitepress.php


注:本文中的SitePress::load_core_tm方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。