Version Description
Download this release
Release Info
Developer | rm2773 |
Plugin | Google Language Translator |
Version | 5.0.44 |
Comparing to | |
See all releases |
Code changes from version 5.0.43 to 5.0.44
- css/style.php +5 -0
- google-language-translator.php +25 -5
- js/scripts-admin.js +8 -1
- readme.txt +4 -1
css/style.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
$glt_css = get_option("googlelanguagetranslator_css");
|
4 |
$language_switcher_width = get_option('glt_language_switcher_width');
|
|
|
5 |
$glt_display = get_option('googlelanguagetranslator_display');
|
6 |
$floating_widget_position = get_option ('glt_floating_widget_position');
|
7 |
|
@@ -71,6 +72,10 @@ if (get_option('googlelanguagetranslator_translatebox') == 'no'):
|
|
71 |
endif;
|
72 |
endif;
|
73 |
|
|
|
|
|
|
|
|
|
74 |
if (get_option('googlelanguagetranslator_flags') == 0):
|
75 |
if(get_option('googlelanguagetranslator_active') ==1):
|
76 |
echo '#flags { display:none; }';
|
2 |
|
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 |
|
72 |
endif;
|
73 |
endif;
|
74 |
|
75 |
+
if (!empty($language_switcher_text_color)):
|
76 |
+
echo '#google_language_translator select.goog-te-combo { color:'.$language_switcher_text_color.'; }';
|
77 |
+
endif;
|
78 |
+
|
79 |
if (get_option('googlelanguagetranslator_flags') == 0):
|
80 |
if(get_option('googlelanguagetranslator_active') ==1):
|
81 |
echo '#flags { display:none; }';
|
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/
|
@@ -199,11 +199,12 @@ class google_language_translator {
|
|
199 |
}
|
200 |
|
201 |
public function enqueue_admin_js(){
|
202 |
-
wp_enqueue_script( 'scripts-admin', plugins_url('js/scripts-admin.js',__FILE__), array('jquery'), PLUGIN_VER, true);
|
203 |
-
wp_enqueue_script( 'scripts', plugins_url('js/scripts.js',__FILE__), array('jquery'), PLUGIN_VER, true);
|
204 |
-
wp_enqueue_script( 'scripts-google', '//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit', array('jquery'), null, true);
|
205 |
wp_enqueue_script( 'jquery-ui-core');
|
206 |
wp_enqueue_script( 'jquery-ui-sortable');
|
|
|
|
|
|
|
|
|
207 |
|
208 |
wp_enqueue_style( 'style.css', plugins_url('css/style.css', __FILE__),'', PLUGIN_VER,'');
|
209 |
|
@@ -634,7 +635,7 @@ class google_language_translator {
|
|
634 |
public function initialize_settings() {
|
635 |
add_settings_section('glt_settings','Settings','','google_language_translator');
|
636 |
|
637 |
-
$settings_name_array = array ('googlelanguagetranslator_active','googlelanguagetranslator_language','language_display_settings','googlelanguagetranslator_flags','googlelanguagetranslator_translatebox','googlelanguagetranslator_display','glt_language_switcher_width','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');
|
638 |
|
639 |
foreach ($settings_name_array as $setting) {
|
640 |
add_settings_field( $setting,'',$setting.'_cb','google_language_translator','glt_settings');
|
@@ -847,6 +848,20 @@ $('.languages').find('input:checkbox').prop('checked', false); }); }); </script>
|
|
847 |
<option value="300px" <?php if($options=='300px'){echo "selected";}?>>300px</option>
|
848 |
</select>
|
849 |
<?php }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
850 |
|
851 |
public function googlelanguagetranslator_translatebox_cb() {
|
852 |
|
@@ -1175,6 +1190,11 @@ $('.languages').find('input:checkbox').prop('checked', false); }); }); </script>
|
|
1175 |
<td class="choose_flags_intro"><?php $this->glt_language_switcher_width_cb(); ?></td>
|
1176 |
</tr>
|
1177 |
|
|
|
|
|
|
|
|
|
|
|
1178 |
<tr class="notranslate">
|
1179 |
<td class="choose_flags_intro">Show flag images?<br/>(Display up to 104 flags above the language switcher)</td>
|
1180 |
<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.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/
|
199 |
}
|
200 |
|
201 |
public function enqueue_admin_js(){
|
|
|
|
|
|
|
202 |
wp_enqueue_script( 'jquery-ui-core');
|
203 |
wp_enqueue_script( 'jquery-ui-sortable');
|
204 |
+
wp_enqueue_style( 'wp-color-picker' );
|
205 |
+
wp_enqueue_script( 'scripts-admin', plugins_url('js/scripts-admin.js',__FILE__), array('jquery', 'wp-color-picker'), PLUGIN_VER, true);
|
206 |
+
wp_enqueue_script( 'scripts', plugins_url('js/scripts.js',__FILE__), array('jquery', 'wp-color-picker'), PLUGIN_VER, true);
|
207 |
+
wp_enqueue_script( 'scripts-google', '//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit', array('jquery'), null, true);
|
208 |
|
209 |
wp_enqueue_style( 'style.css', plugins_url('css/style.css', __FILE__),'', PLUGIN_VER,'');
|
210 |
|
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');
|
848 |
<option value="300px" <?php if($options=='300px'){echo "selected";}?>>300px</option>
|
849 |
</select>
|
850 |
<?php }
|
851 |
+
|
852 |
+
public function glt_language_switcher_text_color_cb() {
|
853 |
+
$option_name = 'glt_language_switcher_text_color';
|
854 |
+
$new_value = '#32373c';
|
855 |
+
|
856 |
+
if (get_option($option_name) === false):
|
857 |
+
update_option($option_name, $new_value);
|
858 |
+
endif;
|
859 |
+
|
860 |
+
$options = get_option(''.$option_name.''); ?>
|
861 |
+
|
862 |
+
<input type="text" name="glt_language_switcher_text_color" id="glt_language_switcher_text_color" class="color-field" value="<?php echo $options; ?>"/>
|
863 |
+
<?php
|
864 |
+
}
|
865 |
|
866 |
public function googlelanguagetranslator_translatebox_cb() {
|
867 |
|
1190 |
<td class="choose_flags_intro"><?php $this->glt_language_switcher_width_cb(); ?></td>
|
1191 |
</tr>
|
1192 |
|
1193 |
+
<tr class="notranslate">
|
1194 |
+
<td class="choose_flags_intro">Language switcher text color: <strong style="color:red">NEW!</strong></td>
|
1195 |
+
<td class="choose_flags_intro"><?php $this->glt_language_switcher_text_color_cb(); ?></td>
|
1196 |
+
</tr>
|
1197 |
+
|
1198 |
<tr class="notranslate">
|
1199 |
<td class="choose_flags_intro">Show flag images?<br/>(Display up to 104 flags above the language switcher)</td>
|
1200 |
<td class="choose_flags_intro"><?php $this->googlelanguagetranslator_flags_cb(); ?></td>
|
js/scripts-admin.js
CHANGED
@@ -68,4 +68,11 @@ jQuery(document).ready(function($) {
|
|
68 |
});
|
69 |
|
70 |
$("#sortable,#sortable-toolbar").disableSelection();
|
71 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
});
|
69 |
|
70 |
$("#sortable,#sortable-toolbar").disableSelection();
|
71 |
+
});
|
72 |
+
|
73 |
+
//Color Picker
|
74 |
+
jQuery(document).ready(function($) {
|
75 |
+
$(function() {
|
76 |
+
$('.color-field').wpColorPicker();
|
77 |
+
});
|
78 |
+
}); //jQuery
|
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.43
|
50 |
- Added new setting: Floating Widget position.
|
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.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 |
|
47 |
== Changelog ==
|
48 |
|
49 |
+
5.0.44
|
50 |
+
- Added new setting: Language Switcher Text Color.
|
51 |
+
|
52 |
5.0.43
|
53 |
- Added new setting: Floating Widget position.
|
54 |
|