Google Language Translator - Version 1.3

Version Description

Download this release

Release Info

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

Code changes from version 1.2 to 1.3

Files changed (2) hide show
  1. google-language-translator.php +13 -13
  2. readme.txt +3 -1
google-language-translator.php CHANGED
@@ -7,7 +7,7 @@ Plugin Name: Google Language Translator
7
 
8
  Plugin URI: http://www.studio88design.com/plugins/google-language-translator
9
 
10
- Version: 1.2
11
  Description: The MOST SIMPLE Google Translator plugin. This plugin adds Google Translator to your website by using a single shortcode, [google-translator]. Setting options include: layout style, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
12
 
13
  Author: Rob Myrick
@@ -27,27 +27,27 @@ add_shortcode( 'google-translator', 'google_translator_shortcode');
27
 
28
  function google_translator_shortcode() {
29
  if (get_option('googlelanguagetranslator_display')=='Vertical'){
30
- echo googlelanguagetranslator_vertical();
31
  }
32
 
33
  elseif(get_option('googlelanguagetranslator_display')=='Horizontal'){
34
- echo googlelanguagetranslator_horizontal();
35
  }
36
 
37
  if (get_option('googlelanguagetranslator_toolbar')=='Yes'){
38
- echo googlelanguagetranslator_toolbar_yes();
39
  }
40
 
41
  elseif(get_option('googlelanguagetranslator_toolbar')=='No'){
42
- echo googlelanguagetranslator_toolbar_no();
43
  }
44
 
45
  if (get_option('googlelanguagetranslator_showbranding')=='Yes'){
46
- echo googlelanguagetranslator_showbranding_yes();
47
  }
48
 
49
  elseif(get_option('googlelanguagetranslator_showbranding')=='No'){
50
- echo googlelanguagetranslator_showbranding_no();
51
  }
52
 
53
  }
@@ -194,7 +194,7 @@ function googlelanguagetranslator_vertical(){
194
  }, \'google_translate_element\');
195
  }
196
  </script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>';
197
- echo '<div>'.$str.'</div>';
198
  }
199
  }
200
 
@@ -207,7 +207,7 @@ function googlelanguagetranslator_horizontal(){
207
  }, \'google_translate_element\');
208
  }
209
  </script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>';
210
- echo '<div>'.$str.'</div>';
211
  }
212
  }
213
 
@@ -220,7 +220,7 @@ function googlelanguagetranslator_toolbar_yes(){
220
  .goog-tooltip:hover {display: none !important;}
221
  .goog-text-highlight {background-color: transparent !important; border: none !important;box-shadow: none !important;}
222
  </style>';
223
- echo $str;
224
  }
225
  }
226
 
@@ -232,7 +232,7 @@ $str.='<style type="text/css">
232
  .goog-te-banner-frame{visibility:hidden !important;}
233
  body {top:0px !important;}
234
  </style>';
235
- echo $str;
236
  }
237
  }
238
 
@@ -245,7 +245,7 @@ function googlelanguagetranslator_showbranding_yes() {
245
  .goog-tooltip:hover {display: none !important;}
246
  .goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}
247
  </style>';
248
- echo $str;
249
  }
250
  }
251
 
@@ -259,7 +259,7 @@ div.goog-te-gadget {color: transparent !important;}
259
  .goog-tooltip:hover {display: none !important;}
260
  .goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}
261
  </style>';
262
- echo $str;
263
  }
264
  }
265
 
7
 
8
  Plugin URI: http://www.studio88design.com/plugins/google-language-translator
9
 
10
+ Version: 1.3
11
  Description: The MOST SIMPLE Google Translator plugin. This plugin adds Google Translator to your website by using a single shortcode, [google-translator]. Setting options include: layout style, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
12
 
13
  Author: Rob Myrick
27
 
28
  function google_translator_shortcode() {
29
  if (get_option('googlelanguagetranslator_display')=='Vertical'){
30
+ return googlelanguagetranslator_vertical();
31
  }
32
 
33
  elseif(get_option('googlelanguagetranslator_display')=='Horizontal'){
34
+ return googlelanguagetranslator_horizontal();
35
  }
36
 
37
  if (get_option('googlelanguagetranslator_toolbar')=='Yes'){
38
+ return googlelanguagetranslator_toolbar_yes();
39
  }
40
 
41
  elseif(get_option('googlelanguagetranslator_toolbar')=='No'){
42
+ return googlelanguagetranslator_toolbar_no();
43
  }
44
 
45
  if (get_option('googlelanguagetranslator_showbranding')=='Yes'){
46
+ return googlelanguagetranslator_showbranding_yes();
47
  }
48
 
49
  elseif(get_option('googlelanguagetranslator_showbranding')=='No'){
50
+ return googlelanguagetranslator_showbranding_no();
51
  }
52
 
53
  }
194
  }, \'google_translate_element\');
195
  }
196
  </script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>';
197
+ return '<div>'.$str.'</div>';
198
  }
199
  }
200
 
207
  }, \'google_translate_element\');
208
  }
209
  </script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>';
210
+ return '<div>'.$str.'</div>';
211
  }
212
  }
213
 
220
  .goog-tooltip:hover {display: none !important;}
221
  .goog-text-highlight {background-color: transparent !important; border: none !important;box-shadow: none !important;}
222
  </style>';
223
+ return $str;
224
  }
225
  }
226
 
232
  .goog-te-banner-frame{visibility:hidden !important;}
233
  body {top:0px !important;}
234
  </style>';
235
+ return $str;
236
  }
237
  }
238
 
245
  .goog-tooltip:hover {display: none !important;}
246
  .goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}
247
  </style>';
248
+ return $str;
249
  }
250
  }
251
 
259
  .goog-tooltip:hover {display: none !important;}
260
  .goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}
261
  </style>';
262
+ return $str;
263
  }
264
  }
265
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Plugin link: http://www.studio88design.com/plugins/google-language-translator
5
  Tags: language translator, language translate, google language translator, translation, translate, multi language
6
  Requires at least: 2.9
7
  Tested up to: 3.5
8
- stable tag: 1.2
9
 
10
  Welcome to Google Language Tranlator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
11
 
@@ -30,6 +30,8 @@ Settings include: inline or vertical layout, hide/show Google toolbar, and hide/
30
 
31
  1.2 Shortcode support is now available for adding [google-translator] to text widgets. I apologize for any inconvenience this may have caused.
32
 
 
 
33
  == Screenshots ==
34
 
35
  1. Settings include: inline or vertical layout, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
5
  Tags: language translator, language translate, google language translator, translation, translate, multi language
6
  Requires at least: 2.9
7
  Tested up to: 3.5
8
+ stable tag: 1.3
9
 
10
  Welcome to Google Language Tranlator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
11
 
30
 
31
  1.2 Shortcode support is now available for adding [google-translator] to text widgets. I apologize for any inconvenience this may have caused.
32
 
33
+ 1.3 HTML display problem in the sidebar area now fixed. Previously, inserting the [google-translator] plugin into a text widget caused it to display above the widget, instead of inside of it.
34
+
35
  == Screenshots ==
36
 
37
  1. Settings include: inline or vertical layout, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.