Version Description
Download this release
Release Info
| Developer | rm2773 |
| Plugin | |
| Version | 5.0.46 |
| Comparing to | |
| See all releases | |
Code changes from version 5.0.45 to 5.0.46
- css/style.css +5 -1
- css/style.php +8 -3
- google-language-translator.php +21 -2
- readme.txt +4 -1
css/style.css
CHANGED
|
@@ -135,7 +135,7 @@ a.wp-helpdesk-logo:focus {
|
|
| 135 |
margin:4px 0;
|
| 136 |
}
|
| 137 |
|
| 138 |
-
select.goog-te-combo {
|
| 139 |
width:143px;
|
| 140 |
background:#fff;
|
| 141 |
box-shadow:none !important;
|
|
@@ -150,6 +150,10 @@ select.goog-te-combo {
|
|
| 150 |
-o-border-radius:0px !important;
|
| 151 |
}
|
| 152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
#flags {
|
| 154 |
overflow:hidden;
|
| 155 |
}
|
| 135 |
margin:4px 0;
|
| 136 |
}
|
| 137 |
|
| 138 |
+
#google_language_translator select.goog-te-combo {
|
| 139 |
width:143px;
|
| 140 |
background:#fff;
|
| 141 |
box-shadow:none !important;
|
| 150 |
-o-border-radius:0px !important;
|
| 151 |
}
|
| 152 |
|
| 153 |
+
#google_language_translator select.goog-te-combo:focus {
|
| 154 |
+
outline:none !important;
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
#flags {
|
| 158 |
overflow:hidden;
|
| 159 |
}
|
css/style.php
CHANGED
|
@@ -3,6 +3,7 @@
|
|
| 3 |
$glt_css = get_option("googlelanguagetranslator_css");
|
| 4 |
$language_switcher_width = get_option('glt_language_switcher_width');
|
| 5 |
$language_switcher_text_color = get_option('glt_language_switcher_text_color');
|
|
|
|
| 6 |
$glt_display = get_option('googlelanguagetranslator_display');
|
| 7 |
$floating_widget_position = get_option ('glt_floating_widget_position');
|
| 8 |
$floating_widget_bg_color = get_option('glt_floating_widget_bg_color');
|
|
@@ -98,15 +99,15 @@ endif;
|
|
| 98 |
if ($floating_widget_position == 'bottom_left'):
|
| 99 |
echo '#glt-translate-trigger { left:20px; right:auto; }';
|
| 100 |
elseif ($floating_widget_position == 'top_right'):
|
| 101 |
-
echo '#glt-translate-trigger { bottom:auto; top:0;
|
| 102 |
echo '.tool-container.tool-top { top:50px !important; bottom:auto !important; }';
|
| 103 |
echo '.tool-container.tool-top .arrow { border-color:transparent transparent #d0cbcb; top:-14px; }';
|
| 104 |
elseif ($floating_widget_position == 'top_left'):
|
| 105 |
-
echo '#glt-translate-trigger { bottom:auto; top:0; left:20px; right:auto;
|
| 106 |
echo '.tool-container.tool-top { top:50px !important; bottom:auto !important; }';
|
| 107 |
echo '.tool-container.tool-top .arrow { border-color:transparent transparent #d0cbcb; top:-14px; }';
|
| 108 |
elseif ($floating_widget_position == 'top_center'):
|
| 109 |
-
echo '#glt-translate-trigger { bottom:auto; top:0; left:50%; margin-left:-63px; right:auto;
|
| 110 |
echo '.tool-container.tool-top { top:50px !important; bottom:auto !important; }';
|
| 111 |
echo '.tool-container.tool-top .arrow { border-color:transparent transparent #d0cbcb; top:-14px; }';
|
| 112 |
elseif ($floating_widget_position == 'bottom_center'):
|
|
@@ -121,4 +122,8 @@ if (!empty($language_switcher_width) && isset($language_switcher_width) && $glt_
|
|
| 121 |
echo '.goog-te-gadget .goog-te-combo { width:'.$language_switcher_width.'; }';
|
| 122 |
endif;
|
| 123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
echo '</style>'; ?>
|
| 3 |
$glt_css = get_option("googlelanguagetranslator_css");
|
| 4 |
$language_switcher_width = get_option('glt_language_switcher_width');
|
| 5 |
$language_switcher_text_color = get_option('glt_language_switcher_text_color');
|
| 6 |
+
$language_switcher_bg_color = get_option('glt_language_switcher_bg_color');
|
| 7 |
$glt_display = get_option('googlelanguagetranslator_display');
|
| 8 |
$floating_widget_position = get_option ('glt_floating_widget_position');
|
| 9 |
$floating_widget_bg_color = get_option('glt_floating_widget_bg_color');
|
| 99 |
if ($floating_widget_position == 'bottom_left'):
|
| 100 |
echo '#glt-translate-trigger { left:20px; right:auto; }';
|
| 101 |
elseif ($floating_widget_position == 'top_right'):
|
| 102 |
+
echo '#glt-translate-trigger { bottom:auto; top:0; }';
|
| 103 |
echo '.tool-container.tool-top { top:50px !important; bottom:auto !important; }';
|
| 104 |
echo '.tool-container.tool-top .arrow { border-color:transparent transparent #d0cbcb; top:-14px; }';
|
| 105 |
elseif ($floating_widget_position == 'top_left'):
|
| 106 |
+
echo '#glt-translate-trigger { bottom:auto; top:0; left:20px; right:auto; }';
|
| 107 |
echo '.tool-container.tool-top { top:50px !important; bottom:auto !important; }';
|
| 108 |
echo '.tool-container.tool-top .arrow { border-color:transparent transparent #d0cbcb; top:-14px; }';
|
| 109 |
elseif ($floating_widget_position == 'top_center'):
|
| 110 |
+
echo '#glt-translate-trigger { bottom:auto; top:0; left:50%; margin-left:-63px; right:auto; }';
|
| 111 |
echo '.tool-container.tool-top { top:50px !important; bottom:auto !important; }';
|
| 112 |
echo '.tool-container.tool-top .arrow { border-color:transparent transparent #d0cbcb; top:-14px; }';
|
| 113 |
elseif ($floating_widget_position == 'bottom_center'):
|
| 122 |
echo '.goog-te-gadget .goog-te-combo { width:'.$language_switcher_width.'; }';
|
| 123 |
endif;
|
| 124 |
|
| 125 |
+
if (!empty($language_switcher_bg_color) && isset($language_switcher_bg_color)):
|
| 126 |
+
echo '#google_language_translator .goog-te-gadget .goog-te-combo { background:'.$language_switcher_bg_color.'; border:0 !important; }';
|
| 127 |
+
endif;
|
| 128 |
+
|
| 129 |
echo '</style>'; ?>
|
google-language-translator.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
/*
|
| 4 |
Plugin Name: Google Language Translator
|
| 5 |
Plugin URI: http://wp-studio.net/
|
| 6 |
-
Version: 5.0.
|
| 7 |
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.
|
| 8 |
Author: Rob Myrick
|
| 9 |
Author URI: http://wp-studio.net/
|
|
@@ -635,7 +635,7 @@ class google_language_translator {
|
|
| 635 |
public function initialize_settings() {
|
| 636 |
add_settings_section('glt_settings','Settings','','google_language_translator');
|
| 637 |
|
| 638 |
-
$settings_name_array = array ('googlelanguagetranslator_active','googlelanguagetranslator_language','language_display_settings','googlelanguagetranslator_flags','googlelanguagetranslator_translatebox','googlelanguagetranslator_display','glt_language_switcher_width','glt_language_switcher_text_color','googlelanguagetranslator_toolbar','googlelanguagetranslator_showbranding','googlelanguagetranslator_flags_alignment','googlelanguagetranslator_analytics','googlelanguagetranslator_analytics_id','googlelanguagetranslator_css','googlelanguagetranslator_multilanguage','googlelanguagetranslator_floating_widget','googlelanguagetranslator_flag_size','googlelanguagetranslator_flags_order','googlelanguagetranslator_english_flag_choice','googlelanguagetranslator_spanish_flag_choice','googlelanguagetranslator_portuguese_flag_choice','googlelanguagetranslator_floating_widget_text','googlelanguagetranslator_floating_widget_text_allow_translation','glt_floating_widget_position','glt_floating_widget_bg_color');
|
| 639 |
|
| 640 |
foreach ($settings_name_array as $setting) {
|
| 641 |
add_settings_field( $setting,'',$setting.'_cb','google_language_translator','glt_settings');
|
|
@@ -876,6 +876,20 @@ $('.languages').find('input:checkbox').prop('checked', false); }); }); </script>
|
|
| 876 |
<input type="text" name="glt_language_switcher_text_color" id="glt_language_switcher_text_color" class="color-field" value="<?php echo $options; ?>"/>
|
| 877 |
<?php
|
| 878 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 879 |
|
| 880 |
public function googlelanguagetranslator_translatebox_cb() {
|
| 881 |
|
|
@@ -1209,6 +1223,11 @@ $('.languages').find('input:checkbox').prop('checked', false); }); }); </script>
|
|
| 1209 |
<td class="choose_flags_intro"><?php $this->glt_language_switcher_text_color_cb(); ?></td>
|
| 1210 |
</tr>
|
| 1211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1212 |
<tr class="notranslate">
|
| 1213 |
<td class="choose_flags_intro">Show flag images?<br/>(Display up to 104 flags above the language switcher)</td>
|
| 1214 |
<td class="choose_flags_intro"><?php $this->googlelanguagetranslator_flags_cb(); ?></td>
|
| 3 |
/*
|
| 4 |
Plugin Name: Google Language Translator
|
| 5 |
Plugin URI: http://wp-studio.net/
|
| 6 |
+
Version: 5.0.46
|
| 7 |
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.
|
| 8 |
Author: Rob Myrick
|
| 9 |
Author URI: http://wp-studio.net/
|
| 635 |
public function initialize_settings() {
|
| 636 |
add_settings_section('glt_settings','Settings','','google_language_translator');
|
| 637 |
|
| 638 |
+
$settings_name_array = array ('googlelanguagetranslator_active','googlelanguagetranslator_language','language_display_settings','googlelanguagetranslator_flags','googlelanguagetranslator_translatebox','googlelanguagetranslator_display','glt_language_switcher_width','glt_language_switcher_text_color','glt_language_switcher_bg_color','googlelanguagetranslator_toolbar','googlelanguagetranslator_showbranding','googlelanguagetranslator_flags_alignment','googlelanguagetranslator_analytics','googlelanguagetranslator_analytics_id','googlelanguagetranslator_css','googlelanguagetranslator_multilanguage','googlelanguagetranslator_floating_widget','googlelanguagetranslator_flag_size','googlelanguagetranslator_flags_order','googlelanguagetranslator_english_flag_choice','googlelanguagetranslator_spanish_flag_choice','googlelanguagetranslator_portuguese_flag_choice','googlelanguagetranslator_floating_widget_text','googlelanguagetranslator_floating_widget_text_allow_translation','glt_floating_widget_position','glt_floating_widget_bg_color');
|
| 639 |
|
| 640 |
foreach ($settings_name_array as $setting) {
|
| 641 |
add_settings_field( $setting,'',$setting.'_cb','google_language_translator','glt_settings');
|
| 876 |
<input type="text" name="glt_language_switcher_text_color" id="glt_language_switcher_text_color" class="color-field" value="<?php echo $options; ?>"/>
|
| 877 |
<?php
|
| 878 |
}
|
| 879 |
+
|
| 880 |
+
public function glt_language_switcher_bg_color_cb() {
|
| 881 |
+
$option_name = 'glt_language_switcher_bg_color';
|
| 882 |
+
$new_value = '';
|
| 883 |
+
|
| 884 |
+
if (get_option($option_name) === false):
|
| 885 |
+
update_option($option_name, $new_value);
|
| 886 |
+
endif;
|
| 887 |
+
|
| 888 |
+
$options = get_option(''.$option_name.''); ?>
|
| 889 |
+
|
| 890 |
+
<input type="text" name="glt_language_switcher_bg_color" id="glt_language_switcher_bg_color" class="color-field" value="<?php echo $options; ?>"/>
|
| 891 |
+
<?php
|
| 892 |
+
}
|
| 893 |
|
| 894 |
public function googlelanguagetranslator_translatebox_cb() {
|
| 895 |
|
| 1223 |
<td class="choose_flags_intro"><?php $this->glt_language_switcher_text_color_cb(); ?></td>
|
| 1224 |
</tr>
|
| 1225 |
|
| 1226 |
+
<tr class="notranslate">
|
| 1227 |
+
<td class="choose_flags_intro">Language switcher background color: <strong style="color:red">NEW!</strong></td>
|
| 1228 |
+
<td class="choose_flags_intro"><?php $this->glt_language_switcher_bg_color_cb(); ?></td>
|
| 1229 |
+
</tr>
|
| 1230 |
+
|
| 1231 |
<tr class="notranslate">
|
| 1232 |
<td class="choose_flags_intro">Show flag images?<br/>(Display up to 104 flags above the language switcher)</td>
|
| 1233 |
<td class="choose_flags_intro"><?php $this->googlelanguagetranslator_flags_cb(); ?></td>
|
readme.txt
CHANGED
|
@@ -5,7 +5,7 @@ Plugin link: http://wp-studio.net/how-it-works
|
|
| 5 |
Tags: language translator, google translator, language translate, translate wordpress, google language translator, translation, translate, multi language
|
| 6 |
Requires at least: 2.9
|
| 7 |
Tested up to: 4.9.2
|
| 8 |
-
Stable tag: 5.0.
|
| 9 |
|
| 10 |
Welcome to Google Language Translator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
|
| 11 |
|
|
@@ -46,6 +46,9 @@ A: Yes! Add the "notranslate" class to the HTML element containing your text. Fo
|
|
| 46 |
|
| 47 |
== Changelog ==
|
| 48 |
|
|
|
|
|
|
|
|
|
|
| 49 |
5.0.45
|
| 50 |
- Added new setting: Floating Widget background color.
|
| 51 |
- Removed border-radius from the floating widget for a more standard look and feel. Please email me if you need the CSS to add back rounded edges.
|
| 5 |
Tags: language translator, google translator, language translate, translate wordpress, google language translator, translation, translate, multi language
|
| 6 |
Requires at least: 2.9
|
| 7 |
Tested up to: 4.9.2
|
| 8 |
+
Stable tag: 5.0.46
|
| 9 |
|
| 10 |
Welcome to Google Language Translator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
|
| 11 |
|
| 46 |
|
| 47 |
== Changelog ==
|
| 48 |
|
| 49 |
+
5.0.46
|
| 50 |
+
- Added new setting: Language Switcher Background Color.
|
| 51 |
+
|
| 52 |
5.0.45
|
| 53 |
- Added new setting: Floating Widget background color.
|
| 54 |
- Removed border-radius from the floating widget for a more standard look and feel. Please email me if you need the CSS to add back rounded edges.
|
