Version Description
Download this release
Release Info
Developer | rm2773 |
Plugin | Google Language Translator |
Version | 1.7 |
Comparing to | |
See all releases |
Code changes from version 1.6 to 1.7
- google-language-translator.php +16 -17
- readme.txt +4 -2
- screenshot-1.png +0 -0
- settings.css +1 -0
google-language-translator.php
CHANGED
@@ -1,29 +1,24 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/*
|
4 |
Plugin Name: Google Language Translator
|
5 |
Plugin URI: http://www.studio88design.com/plugins/google-language-translator
|
6 |
-
Version: 1.
|
7 |
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.
|
8 |
Author: Rob Myrick
|
9 |
Author URI: http://www.studio88design.com/
|
10 |
*/
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
label, .languages { display:none; }
|
23 |
-
</style>
|
24 |
-
<?php }
|
25 |
}
|
26 |
-
add_action( 'admin_head', 'translator_style');
|
27 |
|
28 |
add_filter('widget_text', 'do_shortcode');
|
29 |
|
@@ -81,7 +76,11 @@ if (get_option('googlelanguagetranslator_showbranding')=='No') {
|
|
81 |
}
|
82 |
|
83 |
function googlelanguagetranslator_menu_options(){
|
84 |
-
|
|
|
|
|
|
|
|
|
85 |
|
86 |
if(isset($_POST['googlelanguagetranslator_update_options'])){
|
87 |
update_option('googlelanguagetranslator_language',$_POST['googlelanguagetranslator_language']);
|
1 |
<?php
|
|
|
2 |
/*
|
3 |
Plugin Name: Google Language Translator
|
4 |
Plugin URI: http://www.studio88design.com/plugins/google-language-translator
|
5 |
+
Version: 1.7
|
6 |
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.
|
7 |
Author: Rob Myrick
|
8 |
Author URI: http://www.studio88design.com/
|
9 |
*/
|
10 |
|
11 |
+
function toggle_dropdown_script($hook_suffix) {
|
12 |
+
global $my_settings_page;
|
13 |
+
if ($my_settings_page == $hook_suffix) {
|
14 |
+
wp_enqueue_script( 'my-script', plugins_url('/language-dropdown.js',__FILE__), array('jquery'));
|
15 |
+
|
16 |
+
if (get_option('googlelanguagetranslator_language_option')=='all') {
|
17 |
+
wp_register_style( 'settings.css', plugins_url('/settings.css', __FILE__), array(), '1.0', 'all' );
|
18 |
+
wp_enqueue_style( 'settings.css' );
|
19 |
+
}
|
20 |
+
}
|
|
|
|
|
|
|
21 |
}
|
|
|
22 |
|
23 |
add_filter('widget_text', 'do_shortcode');
|
24 |
|
76 |
}
|
77 |
|
78 |
function googlelanguagetranslator_menu_options(){
|
79 |
+
global $my_settings_page;
|
80 |
+
|
81 |
+
add_action( 'admin_enqueue_scripts', 'toggle_dropdown_script');
|
82 |
+
|
83 |
+
$my_settings_page = add_options_page('Google Language Translator', 'Google Language Translator', 'manage_options', 'googlelanguagetranslator-menu-options', 'googlelanguagetranslator_menu');
|
84 |
|
85 |
if(isset($_POST['googlelanguagetranslator_update_options'])){
|
86 |
update_option('googlelanguagetranslator_language',$_POST['googlelanguagetranslator_language']);
|
readme.txt
CHANGED
@@ -5,13 +5,13 @@ 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.51
|
8 |
-
stable tag: 1.
|
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 |
|
12 |
== Description ==
|
13 |
|
14 |
-
Settings include: inline or vertical layout, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
|
15 |
|
16 |
== Installation ==
|
17 |
|
@@ -38,6 +38,8 @@ Settings include: inline or vertical layout, hide/show Google toolbar, and hide/
|
|
38 |
|
39 |
1.6 Added "Specific Language" support to the plugin settings, which allows the user to choose specific languages that are displayed to website visitors.
|
40 |
|
|
|
|
|
41 |
== Screenshots ==
|
42 |
|
43 |
1. Settings include: inline or vertical layout, hide/show Google toolbar, display specific languages, and show/hide Google branding. Add the shortcode to pages, posts, and widgets.
|
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.51
|
8 |
+
stable tag: 1.7
|
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 |
|
12 |
== Description ==
|
13 |
|
14 |
+
Settings include: inline or vertical layout, show/hide specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
|
15 |
|
16 |
== Installation ==
|
17 |
|
38 |
|
39 |
1.6 Added "Specific Language" support to the plugin settings, which allows the user to choose specific languages that are displayed to website visitors.
|
40 |
|
41 |
+
1.7 Modified google-language-translator.php so that jQuery and CSS styles were enqueued properly onto the settings page only. Previously, jQuery functionality and CSS styles were being added to all pages of the Wordpresss Dashboard, which was causing functionality and display issues for some users.
|
42 |
+
|
43 |
== Screenshots ==
|
44 |
|
45 |
1. Settings include: inline or vertical layout, hide/show Google toolbar, display specific languages, and show/hide Google branding. Add the shortcode to pages, posts, and widgets.
|
screenshot-1.png
DELETED
Binary file
|
settings.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
label, .languages { display:none; }
|