Version Description
- Fix for PHP 8
- CSS added to hide Google Translate popup on text hover
Download this release
Release Info
Developer | edo888 |
Plugin | Google Language Translator |
Version | 6.0.13 |
Comparing to | |
See all releases |
Code changes from version 6.0.12 to 6.0.13
- css/style.php +115 -134
- google-language-translator.php +2 -2
- readme.txt +6 -2
css/style.php
CHANGED
@@ -1,134 +1,115 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$
|
4 |
-
$
|
5 |
-
$
|
6 |
-
$
|
7 |
-
$
|
8 |
-
$
|
9 |
-
$
|
10 |
-
|
11 |
-
|
12 |
-
echo
|
13 |
-
|
14 |
-
|
15 |
-
if
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
echo '.goog-
|
62 |
-
echo '.goog-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
}
|
71 |
-
|
72 |
-
if
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
echo '
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
echo '
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
endif;
|
117 |
-
|
118 |
-
if (!empty($floating_widget_text_color)):
|
119 |
-
echo '#glt-translate-trigger > span { color:'.$floating_widget_text_color.'; }';
|
120 |
-
endif;
|
121 |
-
|
122 |
-
if (!empty($floating_widget_bg_color)):
|
123 |
-
echo '#glt-translate-trigger { background:'.$floating_widget_bg_color.'; }';
|
124 |
-
endif;
|
125 |
-
|
126 |
-
if (!empty($language_switcher_width) && isset($language_switcher_width) && $glt_display != 'Horizontal'):
|
127 |
-
echo '.goog-te-gadget .goog-te-combo { width:'.$language_switcher_width.'; }';
|
128 |
-
endif;
|
129 |
-
|
130 |
-
if (!empty($language_switcher_bg_color) && isset($language_switcher_bg_color)):
|
131 |
-
echo '#google_language_translator .goog-te-gadget .goog-te-combo { background:'.$language_switcher_bg_color.'; border:0 !important; }';
|
132 |
-
endif;
|
133 |
-
|
134 |
-
echo '</style>'; ?>
|
1 |
+
<?php
|
2 |
+
$glt_css = get_option('googlelanguagetranslator_css');
|
3 |
+
$language_switcher_width = get_option('glt_language_switcher_width');
|
4 |
+
$language_switcher_text_color = get_option('glt_language_switcher_text_color');
|
5 |
+
$language_switcher_bg_color = get_option('glt_language_switcher_bg_color');
|
6 |
+
$glt_display = get_option('googlelanguagetranslator_display');
|
7 |
+
$floating_widget_position = get_option ('glt_floating_widget_position');
|
8 |
+
$floating_widget_text_color = get_option ('glt_floating_widget_text_color');
|
9 |
+
$floating_widget_bg_color = get_option('glt_floating_widget_bg_color');
|
10 |
+
|
11 |
+
echo '<style>';
|
12 |
+
echo $glt_css;
|
13 |
+
|
14 |
+
if(get_option('googlelanguagetranslator_flags') == 1) {
|
15 |
+
if(get_option('googlelanguagetranslator_display') == 'Vertical') {
|
16 |
+
echo 'p.hello{font-size:12px;color:darkgray;}';
|
17 |
+
echo '#google_language_translator,#flags{text-align:left;}';
|
18 |
+
} elseif(get_option('googlelanguagetranslator_display') == 'Horizontal') {
|
19 |
+
if(get_option('googlelanguagetranslator_flags_alignment') == 'flags_right') {
|
20 |
+
echo '#google_language_translator{text-align:left!important;}';
|
21 |
+
echo 'select.goog-te-combo{float:right;}';
|
22 |
+
echo '.goog-te-gadget{padding-top:13px;}';
|
23 |
+
echo '.goog-te-gadget .goog-te-combo{margin-top:-7px!important;}';
|
24 |
+
}
|
25 |
+
|
26 |
+
echo '.goog-te-gadget{margin-top:2px!important;}';
|
27 |
+
echo 'p.hello{font-size:12px;color:#666;}';
|
28 |
+
} elseif(get_option('googlelanguagetranslator_display') == 'SIMPLE' and get_option('googlelanguagetranslator_flags_alignment') == 'flags_right') {
|
29 |
+
echo '.goog-te-gadget{float:right;clear:right;}';
|
30 |
+
}
|
31 |
+
|
32 |
+
if(get_option('googlelanguagetranslator_flags_alignment') == 'flags_right') {
|
33 |
+
echo '#google_language_translator,#language{clear:both;width:160px;text-align:right;}';
|
34 |
+
echo '#language{float:right;}';
|
35 |
+
echo '#flags{text-align:right;width:165px;float:right;clear:right;}';
|
36 |
+
echo '#flags ul{float:right!important;}';
|
37 |
+
echo 'p.hello{text-align:right;float:right;clear:both;}';
|
38 |
+
echo '.glt-clear{height:0px;clear:both;margin:0px;padding:0px;}';
|
39 |
+
}
|
40 |
+
|
41 |
+
if(get_option('googlelanguagetranslator_flags_alignment') == 'flags_left') {
|
42 |
+
echo '#google_language_translator{clear:both;}';
|
43 |
+
echo '#flags{width:165px;}';
|
44 |
+
echo '#flags a{display:inline-block;margin-right:2px;}';
|
45 |
+
} elseif(get_option('googlelanguagetranslator_flags_alignment') == 'flags_right') {
|
46 |
+
echo '#flags{width:165px;}';
|
47 |
+
echo '#flags a{display:inline-block;margin-left:2px;}';
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
if(get_option('googlelanguagetranslator_active') == 1) {
|
52 |
+
if(get_option('googlelanguagetranslator_showbranding') == 'Yes')
|
53 |
+
echo '#google_language_translator{width:auto!important;}';
|
54 |
+
elseif(get_option('googlelanguagetranslator_showbranding') == 'No' and get_option('googlelanguagetranslator_display') != 'SIMPLE') {
|
55 |
+
echo '#google_language_translator a{display:none!important;}';
|
56 |
+
echo '.goog-te-gadget{color:transparent!important;}';
|
57 |
+
echo '.goog-te-gadget{font-size:0px!important;}';
|
58 |
+
echo '.goog-branding{display:none;}';
|
59 |
+
}
|
60 |
+
|
61 |
+
echo '.goog-tooltip{display: none!important;}';
|
62 |
+
echo '.goog-tooltip:hover{display: none!important;}';
|
63 |
+
echo '.goog-text-highlight{background-color:transparent!important;border:none!important;box-shadow:none!important;}';
|
64 |
+
|
65 |
+
if(get_option('googlelanguagetranslator_translatebox') == 'no')
|
66 |
+
echo '#google_language_translator{display:none;}';
|
67 |
+
}
|
68 |
+
|
69 |
+
if(!empty($language_switcher_text_color))
|
70 |
+
echo '#google_language_translator select.goog-te-combo{color:'.$language_switcher_text_color.';}';
|
71 |
+
|
72 |
+
if(get_option('googlelanguagetranslator_flags') == 0 and get_option('googlelanguagetranslator_active') == 1)
|
73 |
+
echo '#flags{display:none;}';
|
74 |
+
|
75 |
+
if(get_option('googlelanguagetranslator_active') == 1) {
|
76 |
+
if(get_option('googlelanguagetranslator_toolbar') == 'Yes'){
|
77 |
+
echo '#google_language_translator{color:transparent;}';
|
78 |
+
} elseif(get_option('googlelanguagetranslator_toolbar') == 'No') {
|
79 |
+
echo '.goog-te-banner-frame{visibility:hidden!important;}';
|
80 |
+
}
|
81 |
+
echo 'body{top:0px!important;}';
|
82 |
+
echo '#goog-gt-tt{display:none!important;}';
|
83 |
+
}
|
84 |
+
|
85 |
+
if($floating_widget_position == 'bottom_left') {
|
86 |
+
echo '#glt-translate-trigger{left:20px;right:auto;}';
|
87 |
+
} elseif($floating_widget_position == 'top_right') {
|
88 |
+
echo '#glt-translate-trigger{bottom:auto;top:0;}';
|
89 |
+
echo '.tool-container.tool-top{top:50px!important;bottom:auto!important;}';
|
90 |
+
echo '.tool-container.tool-top .arrow{border-color:transparent transparent #d0cbcb; top:-14px;}';
|
91 |
+
} elseif ($floating_widget_position == 'top_left') {
|
92 |
+
echo '#glt-translate-trigger{bottom:auto;top:0;left:20px;right:auto;}';
|
93 |
+
echo '.tool-container.tool-top{top:50px!important;bottom:auto!important;}';
|
94 |
+
echo '.tool-container.tool-top .arrow{border-color:transparent transparent #d0cbcb;top:-14px;}';
|
95 |
+
} elseif ($floating_widget_position == 'top_center') {
|
96 |
+
echo '#glt-translate-trigger{bottom:auto;top:0;left:50%;margin-left:-63px;right:auto;}';
|
97 |
+
echo '.tool-container.tool-top{top:50px!important;bottom:auto!important;}';
|
98 |
+
echo '.tool-container.tool-top .arrow{border-color:transparent transparent #d0cbcb;top:-14px;}';
|
99 |
+
} elseif ($floating_widget_position == 'bottom_center') {
|
100 |
+
echo '#glt-translate-trigger{left:50%; margin-left:-63px; right:auto;}';
|
101 |
+
}
|
102 |
+
|
103 |
+
if(!empty($floating_widget_text_color))
|
104 |
+
echo '#glt-translate-trigger > span{color:'.$floating_widget_text_color.';}';
|
105 |
+
|
106 |
+
if(!empty($floating_widget_bg_color))
|
107 |
+
echo '#glt-translate-trigger{background:'.$floating_widget_bg_color.';}';
|
108 |
+
|
109 |
+
if(!empty($language_switcher_width) and isset($language_switcher_width) and $glt_display != 'Horizontal')
|
110 |
+
echo '.goog-te-gadget .goog-te-combo{width:'.$language_switcher_width.';}';
|
111 |
+
|
112 |
+
if(!empty($language_switcher_bg_color) and isset($language_switcher_bg_color))
|
113 |
+
echo '#google_language_translator .goog-te-gadget .goog-te-combo{background:'.$language_switcher_bg_color.';border:0!important;}';
|
114 |
+
|
115 |
+
echo '</style>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
@@ -510,7 +510,7 @@ class google_language_translator {
|
|
510 |
if($glt_seo_active != '1')
|
511 |
$str.="<div id='glt-footer'>".(!isset($vertical) && !isset($horizontal) ? '<div id="google_language_translator" class="default-language-'.$default_language.'"></div>' : '')."</div><script>function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: '".$default_language."'".$language_choices . ($layout=='Horizontal' ? $horizontal_layout : ($layout=='SIMPLE' ? $simple_layout : '')) . $auto_display . $multilanguagePage . $this->analytics()."}, 'google_language_translator');}</script>";
|
512 |
echo $str;
|
513 |
-
|
514 |
if($glt_seo_active != '1')
|
515 |
$str.="<div id='glt-footer'>".(!isset($vertical) && !isset($horizontal) ? '<div id="google_language_translator" class="default-language-'.$default_language.'"></div>' : '')."</div><script>function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: '".$default_language."'".$language_choices . ($layout=='Horizontal' ? $horizontal_layout : ($layout=='SIMPLE' ? $simple_layout : '')) . $auto_display . $this->analytics()."}, 'google_language_translator');}</script>";
|
516 |
echo $str;
|
2 |
/*
|
3 |
Plugin Name: Google Language Translator
|
4 |
Plugin URI: https://gtranslate.io/?xyz=3167
|
5 |
+
Version: 6.0.13
|
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
|
510 |
if($glt_seo_active != '1')
|
511 |
$str.="<div id='glt-footer'>".(!isset($vertical) && !isset($horizontal) ? '<div id="google_language_translator" class="default-language-'.$default_language.'"></div>' : '')."</div><script>function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: '".$default_language."'".$language_choices . ($layout=='Horizontal' ? $horizontal_layout : ($layout=='SIMPLE' ? $simple_layout : '')) . $auto_display . $multilanguagePage . $this->analytics()."}, 'google_language_translator');}</script>";
|
512 |
echo $str;
|
513 |
+
else:
|
514 |
if($glt_seo_active != '1')
|
515 |
$str.="<div id='glt-footer'>".(!isset($vertical) && !isset($horizontal) ? '<div id="google_language_translator" class="default-language-'.$default_language.'"></div>' : '')."</div><script>function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: '".$default_language."'".$language_choices . ($layout=='Horizontal' ? $horizontal_layout : ($layout=='SIMPLE' ? $simple_layout : '')) . $auto_display . $this->analytics()."}, 'google_language_translator');}</script>";
|
516 |
echo $str;
|
readme.txt
CHANGED
@@ -5,8 +5,8 @@ Author: Translate AI Multilingual Solutions
|
|
5 |
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.
|
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.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
|
5 |
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.9
|
9 |
+
Stable tag: 6.0.13
|
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.13 =
|
159 |
+
* Fix for PHP 8
|
160 |
+
* CSS added to hide Google Translate popup on text hover
|
161 |
+
|
162 |
= 6.0.12 =
|
163 |
* Sanitize admin HTML input with wp_kses_post to avoid self hurting
|
164 |
* Avoid minification of Google Translate javascript library by LiteSpeed Cache and WP Rocket cache plugins
|