本文整理汇总了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();