ナビゲーションをスキップする

Open

Reported for: WPML String Translation 3.2.14

Topic Tags: Bug, Compatibility

Overview of the issue

If your user’s profile language is different from the site’s default language, visiting the WordPress Customizer causes original strings to be replaced by their translations. This occurs with admin strings registered in WPML > String Translation.

This issue may affect themes that use Customizer options such as Astra Theme.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open …/wp-content/plugins/wpml-string-translation/inc/admin-texts/wpml-admin-texts.class.php file.
  • Look for line 214.
  • Replace:
    		$isAdmin = is_admin() && ! wpml_is_ajax();
    
  • With:
    		$isAdmin = is_admin() && ! wpml_is_ajax() || ( isset($_REQUEST["wp_customize"]) && $_REQUEST["wp_customize"] == "on" ) || ( isset($_POST["screen_id"]) && $_POST["screen_id"] == "customize");
    

2 返答 へ “Admin Strings Replaced by Translations After Visiting the Customizer”

  1. It did mixed up my translation in the admin.
    I have adjusted the script, but no improvement.
    My admin is partly Dutch/English.
    I have the astra theme and the mix up also affects the invoices to the customer.
    What else can I do. I don’t bother to have this on my site, but don’t want it for the customers.

返答する

トピックからそれないようにし、他のユーザーを尊重してください。この投稿に関係のない問題についてサポートが必要な場合は、サポート フォーラムを使用してチャットを開始するか、チケットを送信してください。

これらのタグを使用できます:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>