Google Language Translator - Version 5.0.45

Version Description

Download this release

Release Info

Developer rm2773
Plugin Icon wp plugin Google Language Translator
Version 5.0.45
Comparing to
See all releases

Code changes from version 5.0.44 to 5.0.45

css/style.php CHANGED
@@ -5,6 +5,7 @@ $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
 
9
  echo '<style type="text/css">';
10
  echo $glt_css;
@@ -112,6 +113,10 @@ elseif ($floating_widget_position == 'bottom_center'):
112
  echo '#glt-translate-trigger { left:50%; margin-left:-63px; right:auto; }';
113
  endif;
114
 
 
 
 
 
115
  if (!empty($language_switcher_width) && isset($language_switcher_width) && $glt_display != 'Horizontal'):
116
  echo '.goog-te-gadget .goog-te-combo { width:'.$language_switcher_width.'; }';
117
  endif;
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');
9
 
10
  echo '<style type="text/css">';
11
  echo $glt_css;
113
  echo '#glt-translate-trigger { left:50%; margin-left:-63px; right:auto; }';
114
  endif;
115
 
116
+ if (!empty($floating_widget_bg_color)):
117
+ echo '#glt-translate-trigger { background:'.$floating_widget_bg_color.'; }';
118
+ endif;
119
+
120
  if (!empty($language_switcher_width) && isset($language_switcher_width) && $glt_display != 'Horizontal'):
121
  echo '.goog-te-gadget .goog-te-combo { width:'.$language_switcher_width.'; }';
122
  endif;
css/toolbar.css CHANGED
@@ -16,12 +16,6 @@
16
  text-shadow:0px -1px 0px rgba(0,0,0,0.25);
17
  text-decoration:none;
18
  text-align:center;
19
- border-top-left-radius:5px;
20
- border-top-right-radius:5px;
21
- -webkit-border-top-left-radius:5px;
22
- -webkit-border-top-right-radius:5px;
23
- -moz-border-top-left-radius:5px;
24
- -moz-border-top-right-radius:5px;
25
  box-shadow:0px 0px 9px rgba(0,0,0,0.3);
26
  -webkit-box-shadow:0px 0px 9px rgba(0,0,0,0.3);
27
  -moz-box-shadow:0px 0px 9px rgba(0,0,0,0.3);
16
  text-shadow:0px -1px 0px rgba(0,0,0,0.25);
17
  text-decoration:none;
18
  text-align:center;
 
 
 
 
 
 
19
  box-shadow:0px 0px 9px rgba(0,0,0,0.3);
20
  -webkit-box-shadow:0px 0px 9px rgba(0,0,0,0.3);
21
  -moz-box-shadow:0px 0px 9px rgba(0,0,0,0.3);
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.44
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');
639
 
640
  foreach ($settings_name_array as $setting) {
641
  add_settings_field( $setting,'',$setting.'_cb','google_language_translator','glt_settings');
@@ -816,6 +816,20 @@ $('.languages').find('input:checkbox').prop('checked', false); }); }); </script>
816
  <?php
817
  }
818
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
819
  public function glt_language_switcher_width_cb() {
820
 
821
  $option_name = 'glt_language_switcher_width' ;
@@ -1248,6 +1262,11 @@ $('.languages').find('input:checkbox').prop('checked', false); }); }); </script>
1248
  <tr class="floating-widget floating-widget-position notranslate hidden">
1249
  <td>Floating Widget Position: <strong style="color:red">NEW!</strong></td>
1250
  <td><?php $this->glt_floating_widget_position_cb(); ?></td>
 
 
 
 
 
1251
  </tr>
1252
  </table>
1253
  </div> <!-- .postbox -->
3
  /*
4
  Plugin Name: Google Language Translator
5
  Plugin URI: http://wp-studio.net/
6
+ Version: 5.0.45
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','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');
816
  <?php
817
  }
818
 
819
+ public function glt_floating_widget_bg_color_cb() {
820
+ $option_name = 'glt_floating_widget_bg_color';
821
+ $new_value = '#f89406';
822
+
823
+ if (get_option($option_name) === false):
824
+ update_option($option_name, $new_value);
825
+ endif;
826
+
827
+ $options = get_option(''.$option_name.''); ?>
828
+
829
+ <input type="text" name="glt_floating_widget_bg_color" id="glt_floating_widget_bg_color" class="color-field" value="<?php echo $options; ?>"/>
830
+ <?php
831
+ }
832
+
833
  public function glt_language_switcher_width_cb() {
834
 
835
  $option_name = 'glt_language_switcher_width' ;
1262
  <tr class="floating-widget floating-widget-position notranslate hidden">
1263
  <td>Floating Widget Position: <strong style="color:red">NEW!</strong></td>
1264
  <td><?php $this->glt_floating_widget_position_cb(); ?></td>
1265
+ </tr>
1266
+
1267
+ <tr class="floating-widget floating-widget-color notranslate hidden">
1268
+ <td>Floating Widget Background Color <strong style="color:red">NEW!</strong></td>
1269
+ <td><?php $this->glt_floating_widget_bg_color_cb(); ?></td>
1270
  </tr>
1271
  </table>
1272
  </div> <!-- .postbox -->
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.44
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,10 @@ A: Yes! Add the "notranslate" class to the HTML element containing your text. Fo
46
 
47
  == Changelog ==
48
 
 
 
 
 
49
  5.0.44
50
  - Added new setting: Language Switcher Text Color.
51
 
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.45
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.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.
52
+
53
  5.0.44
54
  - Added new setting: Language Switcher Text Color.
55