public function get_home_url_filter($home_url, $url, $path, $orig_scheme, $blog_id) { if ($this->is_per_domain()) { global $wpml_url_converter; if (!isset($wpml_url_converter)) { load_essential_globals(); } $home_url = untrailingslashit($home_url); $home_url_parsed = parse_url($home_url); $home_url_parsed['path'] = isset($home_url_parsed['path']) ? '/' . untrailingslashit(ltrim($home_url_parsed['path'], '/')) : ''; $path = $path && is_string($path) ? '/' . untrailingslashit(ltrim($path, '/')) : ''; if ($path && (!$home_url_parsed['path'] || $home_url_parsed['path'] != $path)) { $home_url .= $path; } $home_url = $wpml_url_converter->convert_url($home_url, $this->sitepress->get_current_language()); } return $home_url; }
require ICL_PLUGIN_PATH . '/inc/setup/sitepress-schema.php'; require ICL_PLUGIN_PATH . '/inc/functions-load.php'; require ICL_PLUGIN_PATH . '/inc/constants.php'; require ICL_PLUGIN_PATH . '/inc/taxonomy-term-translation/wpml-term-translations.class.php'; require ICL_PLUGIN_PATH . '/inc/functions-troubleshooting.php'; require ICL_PLUGIN_PATH . '/menu/term-taxonomy-menus/taxonomy-translation-display.class.php'; require ICL_PLUGIN_PATH . '/inc/taxonomy-term-translation/wpml-term-translation.class.php'; require ICL_PLUGIN_PATH . '/inc/post-translation/wpml-post-translation.class.php'; require ICL_PLUGIN_PATH . '/inc/post-translation/wpml-admin-post-actions.class.php'; require ICL_PLUGIN_PATH . '/inc/post-translation/wpml-frontend-post-actions.class.php'; require ICL_PLUGIN_PATH . '/inc/url-handling/wpml-url-filters.class.php'; require ICL_PLUGIN_PATH . '/inc/url-handling/wpml-url-converter.class.php'; require ICL_PLUGIN_PATH . '/inc/utilities/wpml-languages.class.php'; require ICL_PLUGIN_PATH . '/inc/utilities/wpml-wp-api.class.php'; require ICL_PLUGIN_PATH . '/menu/post-menus/post-edit-screen/wpml-meta-boxes-post-edit-html.class.php'; load_essential_globals(); require ICL_PLUGIN_PATH . '/inc/query-filtering/wpml-query-utils.class.php'; require ICL_PLUGIN_PATH . '/sitepress.class.php'; require ICL_PLUGIN_PATH . '/inc/query-filtering/wpml-query-filter.class.php'; require ICL_PLUGIN_PATH . '/inc/query-filtering/wpml-query-parser.class.php'; require ICL_PLUGIN_PATH . '/inc/hacks.php'; require ICL_PLUGIN_PATH . '/inc/upgrade.php'; require ICL_PLUGIN_PATH . '/inc/language-switcher.php'; require ICL_PLUGIN_PATH . '/inc/import-xml.php'; // using a plugin version that the db can't be upgraded to if (defined('WPML_UPGRADE_NOT_POSSIBLE') && WPML_UPGRADE_NOT_POSSIBLE) { return; } if (is_admin() || defined('XMLRPC_REQUEST')) { require ICL_PLUGIN_PATH . '/lib/icl_api.php'; require ICL_PLUGIN_PATH . '/lib/xml2array.php';