} 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();