Google Language Translator - Version 4.0.5

Version Description

Download this release

Release Info

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

Code changes from version 4.0.4 to 4.0.5

Files changed (3) hide show
  1. css/style.css +11 -1
  2. google-language-translator.php +13 -3
  3. readme.txt +8 -2
css/style.css CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  select.goog-te-combo {
2
  width:143px !important;
3
  background:#fff;
@@ -29,6 +34,7 @@ select.goog-te-combo {
29
  #flags li:before {
30
  content:none !important;
31
  border:none !important;
 
32
  }
33
 
34
  #flags a {
@@ -109,7 +115,11 @@ span.goog-branding {
109
  float: right;
110
  }
111
 
112
- .goog-logo-link, .goog-logo-link:link, .goog-logo-link:visited, .goog-logo-link:hover, .goog-logo-link:active {
 
 
 
 
113
  font-size: 12px;
114
  font-weight: bold;
115
  color: rgb(68, 68, 68);
1
+ #glt-footer,
2
+ #glt-footer #google_language_translator {
3
+ display:none !important;
4
+ }
5
+
6
  select.goog-te-combo {
7
  width:143px !important;
8
  background:#fff;
34
  #flags li:before {
35
  content:none !important;
36
  border:none !important;
37
+ background:none !important;
38
  }
39
 
40
  #flags a {
115
  float: right;
116
  }
117
 
118
+ .goog-logo-link,
119
+ .goog-logo-link:link,
120
+ .goog-logo-link:visited,
121
+ .goog-logo-link:hover,
122
+ .goog-logo-link:active {
123
  font-size: 12px;
124
  font-weight: bold;
125
  color: rgb(68, 68, 68);
google-language-translator.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Google Language Translator
4
  Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
- Version: 4.0.4
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: Rob Myrick
8
  Author URI: http://www.studio88design.com/
@@ -27,6 +27,7 @@ class google_language_translator {
27
  add_shortcode( 'glt', array(&$this, 'google_translator_menu_language'));
28
  add_filter('widget_text','do_shortcode');
29
  add_filter('walker_nav_menu_start_el', array(&$this,'menu_shortcodes') , 10 , 2);
 
30
 
31
  if (!is_admin()) {
32
  add_action('init',array(&$this, 'flags'));
@@ -77,6 +78,13 @@ class google_language_translator {
77
  delete_option('googlelanguagetranslator_flags_order','');
78
  }
79
 
 
 
 
 
 
 
 
80
  public function add_my_admin_menus(){
81
  $p = add_options_page('Google Language Translator', 'Google Language Translator', 'manage_options', 'google_language_translator', array(&$this, 'page_layout_cb'));
82
 
@@ -198,14 +206,16 @@ class google_language_translator {
198
 
199
  if ($is_multilanguage == 1) {
200
  $multilanguagePage = ', multilanguagePage:true';
201
- $str.='<script type="text/javascript">
202
  function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\''.$language_choices . ($layout=='Horizontal' ? $horizontal_layout : '') . $auto_display . $multilanguagePage . $this->analytics().'}, \'google_language_translator\');}</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>';
 
203
  echo $str;
204
 
205
  } elseif ($is_multilanguage == 0) {
206
 
207
- $str.='<script type="text/javascript">
208
  function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\''.$language_choices . ($layout=='Horizontal' ? $horizontal_layout : '') . $auto_display . $this->analytics().'}, \'google_language_translator\');}</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>';
 
209
  echo $str;
210
  }
211
  }
2
  /*
3
  Plugin Name: Google Language Translator
4
  Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
+ Version: 4.0.5
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: Rob Myrick
8
  Author URI: http://www.studio88design.com/
27
  add_shortcode( 'glt', array(&$this, 'google_translator_menu_language'));
28
  add_filter('widget_text','do_shortcode');
29
  add_filter('walker_nav_menu_start_el', array(&$this,'menu_shortcodes') , 10 , 2);
30
+ add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array(&$this, 'glt_settings_link') );
31
 
32
  if (!is_admin()) {
33
  add_action('init',array(&$this, 'flags'));
78
  delete_option('googlelanguagetranslator_flags_order','');
79
  }
80
 
81
+ public function glt_settings_link ( $links ) {
82
+ $settings_link = array(
83
+ '<a href="' . admin_url( 'options-general.php?page=google_language_translator' ) . '">Settings</a>',
84
+ );
85
+ return array_merge( $links, $settings_link );
86
+ }
87
+
88
  public function add_my_admin_menus(){
89
  $p = add_options_page('Google Language Translator', 'Google Language Translator', 'manage_options', 'google_language_translator', array(&$this, 'page_layout_cb'));
90
 
206
 
207
  if ($is_multilanguage == 1) {
208
  $multilanguagePage = ', multilanguagePage:true';
209
+ $str.='<div id="glt-footer"><div id="google_language_translator"></div></div><script type="text/javascript">
210
  function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\''.$language_choices . ($layout=='Horizontal' ? $horizontal_layout : '') . $auto_display . $multilanguagePage . $this->analytics().'}, \'google_language_translator\');}</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>';
211
+ $str.='';
212
  echo $str;
213
 
214
  } elseif ($is_multilanguage == 0) {
215
 
216
+ $str.='<div id="glt-footer"><div id="google_language_translator"></div></div><script type="text/javascript">
217
  function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\''.$language_choices . ($layout=='Horizontal' ? $horizontal_layout : '') . $auto_display . $this->analytics().'}, \'google_language_translator\');}</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>';
218
+ $str.='';
219
  echo $str;
220
  }
221
  }
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: http://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id
4
  Plugin link: http://www.studio88design.com/plugins/google-language-translator
5
  Tags: language translator, google translator, language translate, google, google language translator, translation, translate, multi language
6
  Requires at least: 2.9
7
- Tested up to: 3.9.1
8
- stable tag: 4.0.4
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
 
@@ -27,6 +27,12 @@ Settings include: inline or vertical layout, show/hide specific languages, hide/
27
 
28
  == Changelog ==
29
 
 
 
 
 
 
 
30
  4.0.4
31
 
32
  - Added NEW shortcode! Allows placement of single languages into the navigation menu, pages, and posts. See settings panel for usage details.
4
  Plugin link: http://www.studio88design.com/plugins/google-language-translator
5
  Tags: language translator, google translator, language translate, google, google language translator, translation, translate, multi language
6
  Requires at least: 2.9
7
+ Tested up to: 4.0
8
+ stable tag: 4.0.5
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
 
27
 
28
  == Changelog ==
29
 
30
+ 4.0.5
31
+
32
+ - Fixed: Display bug when using single language shortcode.
33
+ - Added: New link on the Plugins menu page, which links directly to Google Language Translator settings.
34
+
35
+
36
  4.0.4
37
 
38
  - Added NEW shortcode! Allows placement of single languages into the navigation menu, pages, and posts. See settings panel for usage details.