Created
October 31, 2019 15:04
-
-
Save kagg-design/7e0807d6e6308c338d12a8179f9c797b to your computer and use it in GitHub Desktop.
Fix performance issue in Jupiter X with WPML and Polylang. Replace code of \CustomizerMultilingual::get_custom_customizer_option
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
protected function get_custom_customizer_option() { | |
static $theme_slug = null; | |
$current_language = self::get_language(); | |
if ( ! $theme_slug ) { | |
$theme_slug = get_option( 'template' ); | |
} | |
$option_prefix = str_replace( '-', '_', $theme_slug ); | |
$option_name = $option_prefix . self::get_option_key() . $current_language; | |
$value = wp_cache_get( $option_name, 'CustomizerMultilingual', false, $found ); | |
if ( $found ) { | |
return $value; | |
} | |
$value = get_option( $option_name, false ); | |
wp_cache_set( $option_name, $value, 'CustomizerMultilingual' ); | |
return $value; | |
} |
Hello,
This is a partial fix of the problem. Please open ticket in the WPML support forum, specify versions of JupiterX theme, jupiter-core and raven plugins. Ticket will be escalated to me, and I will send to you a fix.
Perfect, thank you very much!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello kagg-design,
we are facing some issues with WPML on our wordpress site which utilizes the Jupiter X theme. Our back-end speed is horrible, but when I deactivate WPML Multilingual CMS everything is fine. Would your fix help with my issue as well? Sry, but I don't understand what your code exactly does. Kind regards.