Version Description
- Sanitize admin HTML input with wp_kses_post to avoid self hurting
- Avoid minification of Google Translate javascript library by LiteSpeed Cache and WP Rocket cache plugins
Download this release
Release Info
| Developer | edo888 |
| Plugin | |
| Version | 6.0.12 |
| Comparing to | |
| See all releases | |
Code changes from version 6.0.11 to 6.0.12
- google-language-translator.php +23 -3
- readme.txt +5 -1
google-language-translator.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
/*
|
| 3 |
Plugin Name: Google Language Translator
|
| 4 |
Plugin URI: https://gtranslate.io/?xyz=3167
|
| 5 |
-
Version: 6.0.
|
| 6 |
Description: The MOST SIMPLE Google Translator plugin. This plugin adds Google Translator to your website by using a single shortcode, [google-translator]. Settings include: layout style, hide/show specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
|
| 7 |
Author: Translate AI Multilingual Solutions
|
| 8 |
Author URI: https://gtranslate.io
|
|
@@ -912,7 +912,11 @@ class google_language_translator {
|
|
| 912 |
|
| 913 |
foreach ($settings_name_array as $setting) {
|
| 914 |
add_settings_field( $setting,'',$setting.'_cb','google_language_translator','glt_settings');
|
| 915 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 916 |
}
|
| 917 |
}
|
| 918 |
|
|
@@ -2539,4 +2543,20 @@ function glt_update_option($old_value, $value, $option_name) {
|
|
| 2539 |
|
| 2540 |
add_action('update_option_googlelanguagetranslator_seo_active', 'glt_update_option', 10, 3);
|
| 2541 |
add_action('update_option_googlelanguagetranslator_url_structure', 'glt_update_option', 10, 3);
|
| 2542 |
-
add_action('update_option_googlelanguagetranslator_language', 'glt_update_option', 10, 3);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
/*
|
| 3 |
Plugin Name: Google Language Translator
|
| 4 |
Plugin URI: https://gtranslate.io/?xyz=3167
|
| 5 |
+
Version: 6.0.12
|
| 6 |
Description: The MOST SIMPLE Google Translator plugin. This plugin adds Google Translator to your website by using a single shortcode, [google-translator]. Settings include: layout style, hide/show specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
|
| 7 |
Author: Translate AI Multilingual Solutions
|
| 8 |
Author URI: https://gtranslate.io
|
| 912 |
|
| 913 |
foreach ($settings_name_array as $setting) {
|
| 914 |
add_settings_field( $setting,'',$setting.'_cb','google_language_translator','glt_settings');
|
| 915 |
+
|
| 916 |
+
if ($setting == 'googlelanguagetranslator_floating_widget_text')
|
| 917 |
+
register_setting( 'google_language_translator', $setting, array('sanitize_callback' => 'wp_kses_post'));
|
| 918 |
+
else
|
| 919 |
+
register_setting( 'google_language_translator',$setting);
|
| 920 |
}
|
| 921 |
}
|
| 922 |
|
| 2543 |
|
| 2544 |
add_action('update_option_googlelanguagetranslator_seo_active', 'glt_update_option', 10, 3);
|
| 2545 |
add_action('update_option_googlelanguagetranslator_url_structure', 'glt_update_option', 10, 3);
|
| 2546 |
+
add_action('update_option_googlelanguagetranslator_language', 'glt_update_option', 10, 3);
|
| 2547 |
+
|
| 2548 |
+
// exclude javascript minification by cache plugins for free version
|
| 2549 |
+
if($glt_seo_active != '1') {
|
| 2550 |
+
function cache_exclude_js_glt($excluded_js) {
|
| 2551 |
+
if(is_array($excluded_js) or empty($excluded_js))
|
| 2552 |
+
$excluded_js[] = 'translate.google.com/translate_a/element.js';
|
| 2553 |
+
|
| 2554 |
+
return $excluded_js;
|
| 2555 |
+
}
|
| 2556 |
+
|
| 2557 |
+
// LiteSpeed Cache
|
| 2558 |
+
add_filter('litespeed_optimize_js_excludes', 'cache_exclude_js_glt');
|
| 2559 |
+
|
| 2560 |
+
// WP Rocket
|
| 2561 |
+
add_filter('rocket_exclude_js', 'cache_exclude_js_glt');
|
| 2562 |
+
}
|
readme.txt
CHANGED
|
@@ -6,7 +6,7 @@ Author URI: https://gtranslate.io/?xyz=3167
|
|
| 6 |
Tags: translate wordpress, translate, translator, translation, language, multi language
|
| 7 |
Requires at least: 2.9
|
| 8 |
Tested up to: 5.8
|
| 9 |
-
Stable tag: 6.0.
|
| 10 |
|
| 11 |
Translate WordPress with Google Language Translator multilanguage plugin which allows to insert Google Translate widget anywhere on your website.
|
| 12 |
|
|
@@ -155,6 +155,10 @@ If you want us to translate your website professionally or provide you a proofre
|
|
| 155 |
Yes! Add the "notranslate" class to the HTML element containing your text. For example, the following text will be excluded from translation: <span class="notranslate">Hello World!</span>
|
| 156 |
|
| 157 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
= 6.0.11 =
|
| 159 |
* New server added into our Translation Delivery Network
|
| 160 |
* Tested with new WordPress 5.8 version
|
| 6 |
Tags: translate wordpress, translate, translator, translation, language, multi language
|
| 7 |
Requires at least: 2.9
|
| 8 |
Tested up to: 5.8
|
| 9 |
+
Stable tag: 6.0.12
|
| 10 |
|
| 11 |
Translate WordPress with Google Language Translator multilanguage plugin which allows to insert Google Translate widget anywhere on your website.
|
| 12 |
|
| 155 |
Yes! Add the "notranslate" class to the HTML element containing your text. For example, the following text will be excluded from translation: <span class="notranslate">Hello World!</span>
|
| 156 |
|
| 157 |
== Changelog ==
|
| 158 |
+
= 6.0.12 =
|
| 159 |
+
* Sanitize admin HTML input with wp_kses_post to avoid self hurting
|
| 160 |
+
* Avoid minification of Google Translate javascript library by LiteSpeed Cache and WP Rocket cache plugins
|
| 161 |
+
|
| 162 |
= 6.0.11 =
|
| 163 |
* New server added into our Translation Delivery Network
|
| 164 |
* Tested with new WordPress 5.8 version
|
