Translate WordPress with GTranslate - Version 2.8.57

Version Description

  • New control options for flag size and colors of the "Nice dropdown with flags" language switcher
  • Removed old PNG images for dropdown arrow and gradient background, now using SVG and CSS instead
Download this release

Release Info

Developer edo888
Plugin Icon 128x128 Translate WordPress with GTranslate
Version 2.8.57
Comparing to
See all releases

Code changes from version 2.8.56 to 2.8.57

Files changed (2) hide show
  1. gtranslate.php +224 -45
  2. readme.txt +5 -1
gtranslate.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: GTranslate
4
  Plugin URI: https://gtranslate.io/?xyz=998
5
  Description: Makes your website <strong>multilingual</strong> and available to the world using Google Translate. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support</a>.
6
- Version: 2.8.56
7
  Author: Translate AI Multilingual Solutions
8
  Author URI: https://gtranslate.io
9
  Text Domain: gtranslate
@@ -77,7 +77,7 @@ class GTranslate extends WP_Widget {
77
  wp_enqueue_script('jquery');
78
 
79
  // make sure main_lang is set correctly in config.php file
80
- if($data['pro_version']) {
81
  include dirname(__FILE__) . '/url_addon/config.php';
82
 
83
  if($main_lang != $data['default_language']) { // update main_lang in config.php
@@ -248,6 +248,10 @@ class GTranslate extends WP_Widget {
248
  wp_enqueue_script('jquery-ui-sortable');
249
  wp_enqueue_script('jquery-effects-core');
250
 
 
 
 
 
251
  /* code editor for widget_code textarea
252
  if(function_exists('wp_enqueue_code_editor')) {
253
  $editor_settings = wp_enqueue_code_editor(array('type' => 'text/html'));
@@ -311,6 +315,15 @@ function RefreshDoWidgetCode() {
311
  var native_language_names = jQuery('#native_language_names:checked').length > 0 ? true : false;
312
  var analytics = jQuery('#analytics:checked').length > 0 ? true : false;
313
  var detect_browser_language = jQuery('#detect_browser_language:checked').length > 0 ? true : false;
 
 
 
 
 
 
 
 
 
314
 
315
  // make sure default language is on
316
  if(widget_look == 'flags_dropdown' || widget_look == 'dropdown_with_flags' || widget_look == 'flags' || widget_look == 'flags_name' || widget_code == 'flags_code' || widget_look == 'popup')
@@ -360,12 +373,18 @@ function RefreshDoWidgetCode() {
360
  jQuery('#line_break_option').hide();
361
  }
362
 
363
- if(widget_look == 'dropdown_with_flags' || widget_look == 'dropdown' || widget_look == 'lang_names' || widget_look == 'lang_codes' || widget_look == 'globe') {
364
  jQuery('#flag_size_option').hide();
365
  } else {
366
  jQuery('#flag_size_option').show();
367
  }
368
 
 
 
 
 
 
 
369
  if(native_language_names) {
370
  gt_lang_array = gt_lang_array_native;
371
  jQuery('.en_names').hide();
@@ -628,26 +647,51 @@ function RefreshDoWidgetCode() {
628
  }
629
 
630
  if(widget_look == 'dropdown_with_flags') {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
631
  // Adding slider css
632
  widget_preview += '<style type="text/css">'+new_line;
633
- //widget_preview += 'span.gflag {font-size:16px;padding:1px 0;background-repeat:no-repeat;background-image:url($wp_plugin_url/16.png);}'+new_line;
634
- //widget_preview += 'span.gflag img {border:0;margin-top:2px;}'+new_line;
635
- widget_preview += '.switcher {font-family:Arial;font-size:10pt;text-align:left;cursor:pointer;overflow:hidden;width:163px;line-height:17px;}'+new_line;
636
- widget_preview += '.switcher a {text-decoration:none;display:block;font-size:10pt;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}'+new_line;
637
- //widget_preview += '.switcher a span.gflag {margin-right:3px;padding:0;display:block;float:left;}'+new_line;
638
  widget_preview += '.switcher a img {vertical-align:middle;display:inline;border:0;padding:0;margin:0;opacity:0.8;}'+new_line;
639
  widget_preview += '.switcher a:hover img {opacity:1;}'+new_line;
640
- widget_preview += '.switcher .selected {background:#FFFFFF url($wp_plugin_url/switcher.png) repeat-x;position:relative;z-index:9999;}'+new_line;
641
- widget_preview += '.switcher .selected a {border:1px solid #CCCCCC;background:url($wp_plugin_url/arrow_down.png) 146px center no-repeat;color:#666666;padding:3px 5px;width:151px;}'+new_line;
642
- widget_preview += '.switcher .selected a.open {background-image:url($wp_plugin_url/arrow_up.png)}'+new_line;
643
- widget_preview += '.switcher .selected a:hover {background:#F0F0F0 url($wp_plugin_url/arrow_down.png) 146px center no-repeat;}'+new_line;
644
- widget_preview += '.switcher .option {position:relative;z-index:9998;border-left:1px solid #CCCCCC;border-right:1px solid #CCCCCC;border-bottom:1px solid #CCCCCC;background-color:#EEEEEE;display:none;width:161px;max-height:198px;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;overflow-y:auto;overflow-x:hidden;}'+new_line;
645
- widget_preview += '.switcher .option a {color:#000;padding:3px 5px;}'+new_line;
646
- widget_preview += '.switcher .option a:hover {background:#FFC;}'+new_line;
647
- widget_preview += '.switcher .option a.selected {background:#FFC;}'+new_line;
 
 
 
 
 
 
648
  widget_preview += '#selected_lang_name {float: none;}'+new_line;
649
  widget_preview += '.l_name {float: none !important;margin: 0;}'+new_line;
650
- widget_preview += '.switcher .option::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 3px rgba(0,0,0,0.3);border-radius:5px;background-color:#F5F5F5;}'+new_line;
651
  widget_preview += '.switcher .option::-webkit-scrollbar {width:5px;}'+new_line;
652
  widget_preview += '.switcher .option::-webkit-scrollbar-thumb {border-radius:5px;-webkit-box-shadow: inset 0 0 3px rgba(0,0,0,.3);background-color:#888;}'+new_line;
653
  widget_preview += '</style>'+new_line;
@@ -659,21 +703,21 @@ function RefreshDoWidgetCode() {
659
  widget_preview += '<a href="#" onclick="return false;">';
660
 
661
  if(default_language == 'en' && jQuery('#alt_us:checked').length)
662
- widget_preview += '<img src="{$wp_plugin_url}/flags/16/en-us.png" height="16" width="16" alt="en" /> '+gt_lang_array[default_language]+'</a>'+new_line;
663
  else if(default_language == 'en' && jQuery('#alt_ca:checked').length)
664
- widget_preview += '<img src="{$wp_plugin_url}/flags/16/en-ca.png" height="16" width="16" alt="en" /> '+gt_lang_array[default_language]+'</a>'+new_line;
665
  else if(default_language == 'pt' && jQuery('#alt_br:checked').length)
666
- widget_preview += '<img src="{$wp_plugin_url}/flags/16/pt-br.png" height="16" width="16" alt="pt" /> '+gt_lang_array[default_language]+'</a>'+new_line;
667
  else if(default_language == 'es' && jQuery('#alt_mx:checked').length)
668
- widget_preview += '<img src="{$wp_plugin_url}/flags/16/es-mx.png" height="16" width="16" alt="es" /> '+gt_lang_array[default_language]+'</a>'+new_line;
669
  else if(default_language == 'es' && jQuery('#alt_ar:checked').length)
670
- widget_preview += '<img src="{$wp_plugin_url}/flags/16/es-ar.png" height="16" width="16" alt="es" /> '+gt_lang_array[default_language]+'</a>'+new_line;
671
  else if(default_language == 'es' && jQuery('#alt_co:checked').length)
672
- widget_preview += '<img src="{$wp_plugin_url}/flags/16/es-co.png" height="16" width="16" alt="es" /> '+gt_lang_array[default_language]+'</a>'+new_line;
673
  else if(default_language == 'fr' && jQuery('#alt_qc:checked').length)
674
- widget_preview += '<img src="{$wp_plugin_url}/flags/16/fr-qc.png" height="16" width="16" alt="fr" /> '+gt_lang_array[default_language]+'</a>'+new_line;
675
  else
676
- widget_preview += '<img src="{$wp_plugin_url}/flags/16/'+default_language+'.png" height="16" width="16" alt="'+default_language+'" /> '+gt_lang_array[default_language]+'</a>'+new_line;
677
 
678
  widget_preview += '</div>'+new_line;
679
 
@@ -693,21 +737,21 @@ function RefreshDoWidgetCode() {
693
  widget_preview += '<a href="'+href+'" onclick="doGTranslate(\''+default_language+'|'+lang+'\');jQuery(\'div.switcher div.selected a\').html(jQuery(this).html());return false;" title="'+lang_name+'" class="nturl'+(default_language == lang ? ' selected' : '')+'">';
694
 
695
  if(lang == 'en' && jQuery('#alt_us:checked').length)
696
- widget_preview += '<img data-gt-lazy-src="{$wp_plugin_url}/flags/16/en-us.png" height="16" width="16" alt="en" /> '+lang_name+'</a>';
697
  else if(lang == 'en' && jQuery('#alt_ca:checked').length)
698
- widget_preview += '<img data-gt-lazy-src="{$wp_plugin_url}/flags/16/en-ca.png" height="16" width="16" alt="en" /> '+lang_name+'</a>';
699
  else if(lang == 'pt' && jQuery('#alt_br:checked').length)
700
- widget_preview += '<img data-gt-lazy-src="{$wp_plugin_url}/flags/16/pt-br.png" height="16" width="16" alt="pt" /> '+lang_name+'</a>';
701
  else if(lang == 'es' && jQuery('#alt_mx:checked').length)
702
- widget_preview += '<img data-gt-lazy-src="{$wp_plugin_url}/flags/16/es-mx.png" height="16" width="16" alt="es" /> '+lang_name+'</a>';
703
  else if(lang == 'es' && jQuery('#alt_ar:checked').length)
704
- widget_preview += '<img data-gt-lazy-src="{$wp_plugin_url}/flags/16/es-ar.png" height="16" width="16" alt="es" /> '+lang_name+'</a>';
705
  else if(lang == 'es' && jQuery('#alt_co:checked').length)
706
- widget_preview += '<img data-gt-lazy-src="{$wp_plugin_url}/flags/16/es-co.png" height="16" width="16" alt="es" /> '+lang_name+'</a>';
707
  else if(lang == 'fr' && jQuery('#alt_qc:checked').length)
708
- widget_preview += '<img data-gt-lazy-src="{$wp_plugin_url}/flags/16/fr-qc.png" height="16" width="16" alt="fr" /> '+lang_name+'</a>';
709
  else
710
- widget_preview += '<img data-gt-lazy-src="{$wp_plugin_url}/flags/16/'+lang+'.png" height="16" width="16" alt="'+lang+'" /> '+lang_name+'</a>';
711
 
712
  }
713
  });
@@ -797,6 +841,15 @@ jQuery('#add_new_line').attr('checked', '$add_new_line'.length > 0);
797
  jQuery('#default_language').val('$default_language');
798
  jQuery('#widget_look').val('$widget_look');
799
  jQuery('#flag_size').val('$flag_size');
 
 
 
 
 
 
 
 
 
800
 
801
  if(jQuery('#pro_version:checked').length || jQuery('#enterprise_version:checked').length) {
802
  jQuery('#new_window_option').show();
@@ -833,7 +886,7 @@ if('$widget_look' == 'flags_dropdown') {
833
  jQuery('#line_break_option').hide();
834
  }
835
 
836
- if('$widget_look' == 'dropdown_with_flags' || '$widget_look' == 'dropdown' || '$widget_look' == 'lang_names' || '$widget_look' == 'lang_codes' || '$widget_look' == 'globe') {
837
  jQuery('#flag_size_option').hide();
838
  } else {
839
  jQuery('#flag_size_option').show();
@@ -861,6 +914,34 @@ jQuery(function(){
861
  RefreshDoWidgetCode();
862
  });
863
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
864
  EOT;
865
 
866
  // selected languages
@@ -1163,6 +1244,16 @@ EOT;
1163
  </div>
1164
  </div>
1165
 
 
 
 
 
 
 
 
 
 
 
1166
  <input type="hidden" id="language_codes_order" name="language_codes" value="<?php echo $language_codes; ?>" />
1167
  <input type="hidden" id="language_codes_order2" name="language_codes2" value="<?php echo $language_codes2; ?>" />
1168
  <?php wp_nonce_field('gtranslate-save'); ?>
@@ -1196,6 +1287,53 @@ EOT;
1196
  </div>
1197
  </div>
1198
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1199
  <div id="poststuff">
1200
  <div class="postbox">
1201
  <h3 id="settings"><?php _e('Paid version advantages', 'gtranslate'); ?></h3>
@@ -1246,17 +1384,32 @@ EOT;
1246
  <div class="postbox">
1247
  <h3 id="settings"><?php _e('Useful links', 'gtranslate'); ?></h3>
1248
  <div class="inside">
1249
- <ul style="list-style-type:square;padding-left:20px;">
1250
- <li style="margin:0;"><a style="text-decoration:none;" href="https://gtranslate.io/videos" target="_blank"><?php _e('Videos', 'gtranslate'); ?></a></li>
1251
- <li style="margin:0;"><a style="text-decoration:none;" href="https://docs.gtranslate.io/how-tos" target="_blank"><?php _e('How-tos', 'gtranslate'); ?></a></li>
1252
- <li style="margin:0;"><a style="text-decoration:none;" href="https://gtranslate.io/blog" target="_blank"><?php _e('Blog', 'gtranslate'); ?></a></li>
1253
- <li style="margin:0;"><a style="text-decoration:none;" href="https://gtranslate.io/about-us" target="_blank"><?php _e('About GTranslate team', 'gtranslate'); ?></a></li>
1254
- <li style="margin:0;"><a style="text-decoration:none;" href="https://gtranslate.io/?xyz=998#faq" target="_blank"><?php _e('FAQ', 'gtranslate'); ?></a></li>
1255
- <li style="margin:0;"><a style="text-decoration:none;" href="https://my.gtranslate.io/" target="_blank"><?php _e('User dashboard', 'gtranslate'); ?></a></li>
1256
- <li style="margin:0;"><a style="text-decoration:none;" href="https://gtranslate.io/?xyz=998#pricing" target="_blank"><?php _e('Compare plans', 'gtranslate'); ?></a></li>
1257
- <li style="margin:0;"><a style="text-decoration:none;" href="https://gtranslate.io/website-translation-quote" target="_blank"><?php _e('Website Translation Quote', 'gtranslate'); ?></a></li>
1258
- <li style="margin:0;"><a style="text-decoration:none;" href="https://wordpress.org/support/plugin/gtranslate/reviews/" target="_blank"><?php _e('Reviews', 'gtranslate'); ?></a></li>
1259
- </ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1260
  </div>
1261
  </div>
1262
  </div>
@@ -1283,6 +1436,10 @@ EOT;
1283
 
1284
  <script type="text/javascript"><?php echo $script; ?></script>
1285
  <style type="text/css">
 
 
 
 
1286
  .postbox #settings {padding-left:12px;}
1287
  .og_left_col { width: 59%; }
1288
  .og_right_col { width: 39%; float: right; }
@@ -1333,6 +1490,17 @@ EOT;
1333
  $data['incl_langs'] = (isset($_POST['incl_langs']) and is_array($_POST['incl_langs'])) ? $_POST['incl_langs'] : array($data['default_language']);
1334
  $data['fincl_langs'] = (isset($_POST['fincl_langs']) and is_array($_POST['fincl_langs'])) ? $_POST['fincl_langs'] : array($data['default_language']);
1335
  $data['alt_flags'] = (isset($_POST['alt_flags']) and is_array($_POST['alt_flags'])) ? $_POST['alt_flags'] : array();
 
 
 
 
 
 
 
 
 
 
 
1336
  $data['language_codes'] = (isset($_POST['language_codes']) and !empty($_POST['language_codes'])) ? sanitize_text_field($_POST['language_codes']) : 'af,sq,ar,hy,az,eu,be,bg,ca,zh-CN,zh-TW,hr,cs,da,nl,en,et,tl,fi,fr,gl,ka,de,el,ht,iw,hi,hu,is,id,ga,it,ja,ko,lv,lt,mk,ms,mt,no,fa,pl,pt,ro,ru,sr,sk,sl,es,sw,sv,th,tr,uk,ur,vi,cy,yi';
1337
  $data['language_codes2'] = (isset($_POST['language_codes2']) and !empty($_POST['language_codes2'])) ? sanitize_text_field($_POST['language_codes2']) : 'af,sq,am,ar,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-CN,zh-TW,co,hr,cs,da,nl,en,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,ja,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,ps,fa,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu';
1338
 
@@ -1414,6 +1582,17 @@ EOT;
1414
  $data['incl_langs'] = isset($data['incl_langs']) ? $data['incl_langs'] : array('en', 'es', 'it', 'pt', 'de', 'fr', 'ru', 'nl', 'ar', 'zh-CN');
1415
  $data['fincl_langs'] = isset($data['fincl_langs']) ? $data['fincl_langs'] : array('en', 'es', 'it', 'pt', 'de', 'fr', 'ru', 'nl', 'ar', 'zh-CN');
1416
  $data['alt_flags'] = isset($data['alt_flags']) ? $data['alt_flags'] : array();
 
 
 
 
 
 
 
 
 
 
 
1417
  $data['language_codes'] = (isset($data['language_codes']) and !empty($data['language_codes'])) ? $data['language_codes'] : 'af,sq,am,ar,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-CN,zh-TW,co,hr,cs,da,nl,en,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,ja,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,ps,fa,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu';
1418
  $data['language_codes2'] = (isset($data['language_codes2']) and !empty($data['language_codes2'])) ? $data['language_codes2'] : 'af,sq,am,ar,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-CN,zh-TW,co,hr,cs,da,nl,en,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,ja,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,ps,fa,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu';
1419
 
3
  Plugin Name: GTranslate
4
  Plugin URI: https://gtranslate.io/?xyz=998
5
  Description: Makes your website <strong>multilingual</strong> and available to the world using Google Translate. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support</a>.
6
+ Version: 2.8.57
7
  Author: Translate AI Multilingual Solutions
8
  Author URI: https://gtranslate.io
9
  Text Domain: gtranslate
77
  wp_enqueue_script('jquery');
78
 
79
  // make sure main_lang is set correctly in config.php file
80
+ if($data['pro_version'] or $data['enterprise_version']) {
81
  include dirname(__FILE__) . '/url_addon/config.php';
82
 
83
  if($main_lang != $data['default_language']) { // update main_lang in config.php
248
  wp_enqueue_script('jquery-ui-sortable');
249
  wp_enqueue_script('jquery-effects-core');
250
 
251
+ wp_enqueue_script('wp-color-picker');
252
+ wp_enqueue_style( 'wp-color-picker');
253
+ wp_add_inline_script('wp-color-picker', 'jQuery(document).ready(function($) {$(".color-field").wpColorPicker({change:function(e,c){$("#"+e.target.getAttribute("id")+"_hidden").val(c.color.toString());e.target.value = c.color.toString();RefreshDoWidgetCode();}});});');
254
+
255
  /* code editor for widget_code textarea
256
  if(function_exists('wp_enqueue_code_editor')) {
257
  $editor_settings = wp_enqueue_code_editor(array('type' => 'text/html'));
315
  var native_language_names = jQuery('#native_language_names:checked').length > 0 ? true : false;
316
  var analytics = jQuery('#analytics:checked').length > 0 ? true : false;
317
  var detect_browser_language = jQuery('#detect_browser_language:checked').length > 0 ? true : false;
318
+ var switcher_text_color = jQuery('#switcher_text_color').val();
319
+ var switcher_arrow_color = jQuery('#switcher_arrow_color').val();
320
+ var switcher_border_color = jQuery('#switcher_border_color').val();
321
+ var switcher_background_color = jQuery('#switcher_background_color').val();
322
+ var switcher_background_shadow_color = jQuery('#switcher_background_shadow_color').val();
323
+ var switcher_background_hover_color = jQuery('#switcher_background_hover_color').val();
324
+ var dropdown_text_color = jQuery('#dropdown_text_color').val();
325
+ var dropdown_hover_color = jQuery('#dropdown_hover_color').val();
326
+ var dropdown_background_color = jQuery('#dropdown_background_color').val();
327
 
328
  // make sure default language is on
329
  if(widget_look == 'flags_dropdown' || widget_look == 'dropdown_with_flags' || widget_look == 'flags' || widget_look == 'flags_name' || widget_code == 'flags_code' || widget_look == 'popup')
373
  jQuery('#line_break_option').hide();
374
  }
375
 
376
+ if(widget_look == 'dropdown' || widget_look == 'lang_names' || widget_look == 'lang_codes' || widget_look == 'globe') {
377
  jQuery('#flag_size_option').hide();
378
  } else {
379
  jQuery('#flag_size_option').show();
380
  }
381
 
382
+ if(widget_look == 'dropdown_with_flags') {
383
+ jQuery('.switcher_color_options').show();
384
+ } else {
385
+ jQuery('.switcher_color_options').hide();
386
+ }
387
+
388
  if(native_language_names) {
389
  gt_lang_array = gt_lang_array_native;
390
  jQuery('.en_names').hide();
647
  }
648
 
649
  if(widget_look == 'dropdown_with_flags') {
650
+ var font_size = 10;
651
+ var widget_width = 163;
652
+ var arrow_size = 7;
653
+
654
+ if(flag_size == 16) {
655
+ font_size = 10;
656
+ widget_width = 163;
657
+ arrow_size = 7;
658
+ } else if(flag_size == 24) {
659
+ font_size = 12;
660
+ widget_width = 173;
661
+ arrow_size = 11;
662
+ } else if(flag_size == 32) {
663
+ font_size = 14;
664
+ widget_width = 193;
665
+ arrow_size = 12;
666
+ } else if(flag_size == 48) {
667
+ font_size = 16;
668
+ widget_width = 223;
669
+ arrow_size = 14;
670
+ }
671
+
672
  // Adding slider css
673
  widget_preview += '<style type="text/css">'+new_line;
674
+ widget_preview += '.switcher {font-family:Arial;font-size:'+font_size+'pt;text-align:left;cursor:pointer;overflow:hidden;width:'+widget_width+'px;line-height:17px;}'+new_line;
675
+ widget_preview += '.switcher a {text-decoration:none;display:block;font-size:'+font_size+'pt;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}'+new_line;
 
 
 
676
  widget_preview += '.switcher a img {vertical-align:middle;display:inline;border:0;padding:0;margin:0;opacity:0.8;}'+new_line;
677
  widget_preview += '.switcher a:hover img {opacity:1;}'+new_line;
678
+ //widget_preview += '.switcher .selected {background:#fff url($wp_plugin_url/switcher.png) repeat-x;position:relative;z-index:9999;}'+new_line;
679
+ widget_preview += '.switcher .selected {background:'+switcher_background_color+' linear-gradient(180deg, '+switcher_background_shadow_color+' 0%, '+switcher_background_color+' 70%);position:relative;z-index:9999;}'+new_line;
680
+ //widget_preview += '.switcher .selected a {border:1px solid '+switcher_border_color+';background:url($wp_plugin_url/arrow_down.png) '+(widget_width - 2 * 5 - 2 * 1 - 5)+'px center no-repeat;color:'+switcher_text_color+';padding:3px 5px;width:'+(widget_width - 2 * 5 - 2 * 1)+'px;}'+new_line;
681
+ widget_preview += '.switcher .selected a {border:1px solid '+switcher_border_color+';color:'+switcher_text_color+';padding:3px 5px;width:'+(widget_width - 2 * 5 - 2 * 1)+'px;}'+new_line;
682
+ //////widget_preview += '.switcher .selected a:after {height:'+flag_size+'px;display:inline-block;position:absolute;right:10px;width:15px;background-position:50%;background-size:'+arrow_size+'px;background-image:url($wp_plugin_url/arrow_down.svg);background-repeat:no-repeat;color:'+switcher_text_color+';line-height:37px;content:""!important;transition:all .2s;}'+new_line;
683
+ widget_preview += '.switcher .selected a:after {height:'+flag_size+'px;display:inline-block;position:absolute;right:'+(flag_size < 20 ? 5 : 10)+'px;width:15px;background-position:50%;background-size:'+arrow_size+'px;background-image:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' viewBox=\'0 0 285 285\'><path d=\'M282 76.5l-14.2-14.3a9 9 0 0 0-13.1 0L142.5 174.4 30.3 62.2a9 9 0 0 0-13.2 0L3 76.5a9 9 0 0 0 0 13.1l133 133a9 9 0 0 0 13.1 0l133-133a9 9 0 0 0 0-13z\' style=\'fill:'+escape(switcher_arrow_color)+'\'/></svg>");background-repeat:no-repeat;content:""!important;transition:all .2s;}'+new_line;
684
+ //widget_preview += '.switcher .selected a.open {background-image:url($wp_plugin_url/arrow_up.png)}'+new_line;
685
+ widget_preview += '.switcher .selected a.open:after {-webkit-transform: rotate(-180deg);transform:rotate(-180deg);}'+new_line;
686
+ //widget_preview += '.switcher .selected a:hover {background:#f0f0f0 url($wp_plugin_url/arrow_down.png) '+(widget_width - 2 * 5 - 2 * 1 - 5)+'px center no-repeat;}'+new_line;
687
+ widget_preview += '.switcher .selected a:hover {background:'+switcher_background_hover_color+'}'+new_line;
688
+ widget_preview += '.switcher .option {position:relative;z-index:9998;border-left:1px solid '+switcher_border_color+';border-right:1px solid '+switcher_border_color+';border-bottom:1px solid '+switcher_border_color+';background-color:'+dropdown_background_color+';display:none;width:'+(widget_width - 2 * 1)+'px;max-height:198px;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;overflow-y:auto;overflow-x:hidden;}'+new_line;
689
+ widget_preview += '.switcher .option a {color:'+dropdown_text_color+';padding:3px 5px;}'+new_line;
690
+ widget_preview += '.switcher .option a:hover {background:'+dropdown_hover_color+';}'+new_line;
691
+ widget_preview += '.switcher .option a.selected {background:'+dropdown_hover_color+';}'+new_line;
692
  widget_preview += '#selected_lang_name {float: none;}'+new_line;
693
  widget_preview += '.l_name {float: none !important;margin: 0;}'+new_line;
694
+ widget_preview += '.switcher .option::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 3px rgba(0,0,0,0.3);border-radius:5px;background-color:#f5f5f5;}'+new_line;
695
  widget_preview += '.switcher .option::-webkit-scrollbar {width:5px;}'+new_line;
696
  widget_preview += '.switcher .option::-webkit-scrollbar-thumb {border-radius:5px;-webkit-box-shadow: inset 0 0 3px rgba(0,0,0,.3);background-color:#888;}'+new_line;
697
  widget_preview += '</style>'+new_line;
703
  widget_preview += '<a href="#" onclick="return false;">';
704
 
705
  if(default_language == 'en' && jQuery('#alt_us:checked').length)
706
+ widget_preview += '<img src="{$wp_plugin_url}/flags/'+flag_size+'/en-us.png" height="'+flag_size+'" width="'+flag_size+'" alt="en" /> '+gt_lang_array[default_language]+'</a>'+new_line;
707
  else if(default_language == 'en' && jQuery('#alt_ca:checked').length)
708
+ widget_preview += '<img src="{$wp_plugin_url}/flags/'+flag_size+'/en-ca.png" height="'+flag_size+'" width="'+flag_size+'" alt="en" /> '+gt_lang_array[default_language]+'</a>'+new_line;
709
  else if(default_language == 'pt' && jQuery('#alt_br:checked').length)
710
+ widget_preview += '<img src="{$wp_plugin_url}/flags/'+flag_size+'/pt-br.png" height="'+flag_size+'" width="'+flag_size+'" alt="pt" /> '+gt_lang_array[default_language]+'</a>'+new_line;
711
  else if(default_language == 'es' && jQuery('#alt_mx:checked').length)
712
+ widget_preview += '<img src="{$wp_plugin_url}/flags/'+flag_size+'/es-mx.png" height="'+flag_size+'" width="'+flag_size+'" alt="es" /> '+gt_lang_array[default_language]+'</a>'+new_line;
713
  else if(default_language == 'es' && jQuery('#alt_ar:checked').length)
714
+ widget_preview += '<img src="{$wp_plugin_url}/flags/'+flag_size+'/es-ar.png" height="'+flag_size+'" width="'+flag_size+'" alt="es" /> '+gt_lang_array[default_language]+'</a>'+new_line;
715
  else if(default_language == 'es' && jQuery('#alt_co:checked').length)
716
+ widget_preview += '<img src="{$wp_plugin_url}/flags/'+flag_size+'/es-co.png" height="'+flag_size+'" width="'+flag_size+'" alt="es" /> '+gt_lang_array[default_language]+'</a>'+new_line;
717
  else if(default_language == 'fr' && jQuery('#alt_qc:checked').length)
718
+ widget_preview += '<img src="{$wp_plugin_url}/flags/'+flag_size+'/fr-qc.png" height="'+flag_size+'" width="'+flag_size+'" alt="fr" /> '+gt_lang_array[default_language]+'</a>'+new_line;
719
  else
720
+ widget_preview += '<img src="{$wp_plugin_url}/flags/'+flag_size+'/'+default_language+'.png" height="'+flag_size+'" width="'+flag_size+'" alt="'+default_language+'" /> '+gt_lang_array[default_language]+'</a>'+new_line;
721
 
722
  widget_preview += '</div>'+new_line;
723
 
737
  widget_preview += '<a href="'+href+'" onclick="doGTranslate(\''+default_language+'|'+lang+'\');jQuery(\'div.switcher div.selected a\').html(jQuery(this).html());return false;" title="'+lang_name+'" class="nturl'+(default_language == lang ? ' selected' : '')+'">';
738
 
739
  if(lang == 'en' && jQuery('#alt_us:checked').length)
740
+ widget_preview += '<img data-gt-lazy-src="{$wp_plugin_url}/flags/'+flag_size+'/en-us.png" height="'+flag_size+'" width="'+flag_size+'" alt="en" /> '+lang_name+'</a>';
741
  else if(lang == 'en' && jQuery('#alt_ca:checked').length)
742
+ widget_preview += '<img data-gt-lazy-src="{$wp_plugin_url}/flags/'+flag_size+'/en-ca.png" height="'+flag_size+'" width="'+flag_size+'" alt="en" /> '+lang_name+'</a>';
743
  else if(lang == 'pt' && jQuery('#alt_br:checked').length)
744
+ widget_preview += '<img data-gt-lazy-src="{$wp_plugin_url}/flags/'+flag_size+'/pt-br.png" height="'+flag_size+'" width="'+flag_size+'" alt="pt" /> '+lang_name+'</a>';
745
  else if(lang == 'es' && jQuery('#alt_mx:checked').length)
746
+ widget_preview += '<img data-gt-lazy-src="{$wp_plugin_url}/flags/'+flag_size+'/es-mx.png" height="'+flag_size+'" width="'+flag_size+'" alt="es" /> '+lang_name+'</a>';
747
  else if(lang == 'es' && jQuery('#alt_ar:checked').length)
748
+ widget_preview += '<img data-gt-lazy-src="{$wp_plugin_url}/flags/'+flag_size+'/es-ar.png" height="'+flag_size+'" width="'+flag_size+'" alt="es" /> '+lang_name+'</a>';
749
  else if(lang == 'es' && jQuery('#alt_co:checked').length)
750
+ widget_preview += '<img data-gt-lazy-src="{$wp_plugin_url}/flags/'+flag_size+'/es-co.png" height="'+flag_size+'" width="'+flag_size+'" alt="es" /> '+lang_name+'</a>';
751
  else if(lang == 'fr' && jQuery('#alt_qc:checked').length)
752
+ widget_preview += '<img data-gt-lazy-src="{$wp_plugin_url}/flags/'+flag_size+'/fr-qc.png" height="'+flag_size+'" width="'+flag_size+'" alt="fr" /> '+lang_name+'</a>';
753
  else
754
+ widget_preview += '<img data-gt-lazy-src="{$wp_plugin_url}/flags/'+flag_size+'/'+lang+'.png" height="'+flag_size+'" width="'+flag_size+'" alt="'+lang+'" /> '+lang_name+'</a>';
755
 
756
  }
757
  });
841
  jQuery('#default_language').val('$default_language');
842
  jQuery('#widget_look').val('$widget_look');
843
  jQuery('#flag_size').val('$flag_size');
844
+ jQuery('#switcher_text_color').val('$switcher_text_color');
845
+ jQuery('#switcher_arrow_color').val('$switcher_arrow_color');
846
+ jQuery('#switcher_border_color').val('$switcher_border_color');
847
+ jQuery('#switcher_background_color').val('$switcher_background_color');
848
+ jQuery('#switcher_background_shadow_color').val('$switcher_background_shadow_color');
849
+ jQuery('#switcher_background_hover_color').val('$switcher_background_hover_color');
850
+ jQuery('#dropdown_text_color').val('$dropdown_text_color');
851
+ jQuery('#dropdown_hover_color').val('$dropdown_hover_color');
852
+ jQuery('#dropdown_background_color').val('$dropdown_background_color');
853
 
854
  if(jQuery('#pro_version:checked').length || jQuery('#enterprise_version:checked').length) {
855
  jQuery('#new_window_option').show();
886
  jQuery('#line_break_option').hide();
887
  }
888
 
889
+ if('$widget_look' == 'dropdown' || '$widget_look' == 'lang_names' || '$widget_look' == 'lang_codes' || '$widget_look' == 'globe') {
890
  jQuery('#flag_size_option').hide();
891
  } else {
892
  jQuery('#flag_size_option').show();
914
  RefreshDoWidgetCode();
915
  });
916
  });
917
+
918
+ function light_color_scheme() {
919
+ jQuery('#switcher_text_color').iris('color', '#666');
920
+ jQuery('#switcher_arrow_color').iris('color', '#666');
921
+ jQuery('#switcher_border_color').iris('color', '#ccc');
922
+ jQuery('#switcher_background_color').iris('color', '#fff');
923
+ jQuery('#switcher_background_shadow_color').iris('color', '#efefef');
924
+ jQuery('#switcher_background_hover_color').iris('color', '#f0f0f0');
925
+ jQuery('#dropdown_text_color').iris('color', '#000');
926
+ jQuery('#dropdown_hover_color').iris('color', '#fff');
927
+ jQuery('#dropdown_background_color').iris('color', '#eee');
928
+
929
+ return false;
930
+ }
931
+
932
+ function dark_color_scheme() {
933
+ jQuery('#switcher_text_color').iris('color', '#f7f7f7');
934
+ jQuery('#switcher_arrow_color').iris('color', '#f2f2f2');
935
+ jQuery('#switcher_border_color').iris('color', '#161616');
936
+ jQuery('#switcher_background_color').iris('color', '#303030');
937
+ jQuery('#switcher_background_shadow_color').iris('color', '#474747');
938
+ jQuery('#switcher_background_hover_color').iris('color', '#3a3a3a');
939
+ jQuery('#dropdown_text_color').iris('color', '#eaeaea');
940
+ jQuery('#dropdown_hover_color').iris('color', '#748393');
941
+ jQuery('#dropdown_background_color').iris('color', '#474747');
942
+
943
+ return false;
944
+ }
945
  EOT;
946
 
947
  // selected languages
1244
  </div>
1245
  </div>
1246
 
1247
+ <input type="hidden" name="switcher_text_color" id="switcher_text_color_hidden" value="<?php echo $switcher_text_color; ?>" />
1248
+ <input type="hidden" name="switcher_arrow_color" id="switcher_arrow_color_hidden" value="<?php echo $switcher_arrow_color; ?>" />
1249
+ <input type="hidden" name="switcher_border_color" id="switcher_border_color_hidden" value="<?php echo $switcher_border_color; ?>" />
1250
+ <input type="hidden" name="switcher_background_color" id="switcher_background_color_hidden" value="<?php echo $switcher_background_color; ?>" />
1251
+ <input type="hidden" name="switcher_background_shadow_color" id="switcher_background_shadow_color_hidden" value="<?php echo $switcher_background_shadow_color; ?>" />
1252
+ <input type="hidden" name="switcher_background_hover_color" id="switcher_background_hover_color_hidden" value="<?php echo $switcher_background_hover_color; ?>" />
1253
+ <input type="hidden" name="dropdown_text_color" id="dropdown_text_color_hidden" value="<?php echo $dropdown_text_color; ?>" />
1254
+ <input type="hidden" name="dropdown_hover_color" id="dropdown_hover_color_hidden" value="<?php echo $dropdown_hover_color; ?>" />
1255
+ <input type="hidden" name="dropdown_background_color" id="dropdown_background_color_hidden" value="<?php echo $dropdown_background_color; ?>" />
1256
+
1257
  <input type="hidden" id="language_codes_order" name="language_codes" value="<?php echo $language_codes; ?>" />
1258
  <input type="hidden" id="language_codes_order2" name="language_codes2" value="<?php echo $language_codes2; ?>" />
1259
  <?php wp_nonce_field('gtranslate-save'); ?>
1287
  </div>
1288
  </div>
1289
 
1290
+ <div id="poststuff" class="switcher_color_options">
1291
+ <div class="postbox">
1292
+ <h3 id="settings"><?php _e('Color options', 'gtranslate'); ?> ( <a href="#" onclick="return light_color_scheme()">light</a> | <a href="#" onclick="return dark_color_scheme()">dark</a> )</h3>
1293
+ <div class="inside">
1294
+ <table style="width:100%;" cellpadding="0">
1295
+ <tr>
1296
+ <td class="option_name"><?php _e('Switcher text color', 'gtranslate'); ?>:</td>
1297
+ <td><input type="text" name="switcher_text_color" id="switcher_text_color" class="color-field" value="#666" data-default-color="#666" /></td>
1298
+ </tr>
1299
+ <tr>
1300
+ <td class="option_name"><?php _e('Switcher arrow color', 'gtranslate'); ?>:</td>
1301
+ <td><input type="text" name="switcher_arrow_color" id="switcher_arrow_color" class="color-field" value="#666" data-default-color="#666" /></td>
1302
+ </tr>
1303
+ <tr>
1304
+ <td class="option_name"><?php _e('Switcher border color', 'gtranslate'); ?>:</td>
1305
+ <td><input type="text" name="switcher_border_color" id="switcher_border_color" class="color-field" value="#ccc" data-default-color="#ccc" /></td>
1306
+ </tr>
1307
+ <tr>
1308
+ <td class="option_name"><?php _e('Switcher background color', 'gtranslate'); ?>:</td>
1309
+ <td><input type="text" name="switcher_background_color" id="switcher_background_color" class="color-field" value="#fff" data-default-color="#fff" /></td>
1310
+ </tr>
1311
+ <tr>
1312
+ <td class="option_name"><?php _e('Switcher background shadow color', 'gtranslate'); ?>:</td>
1313
+ <td><input type="text" name="switcher_background_shadow_color" id="switcher_background_shadow_color" class="color-field" value="#fff" data-default-color="#efefef" /></td>
1314
+ </tr>
1315
+ <tr>
1316
+ <td class="option_name"><?php _e('Switcher background hover color', 'gtranslate'); ?>:</td>
1317
+ <td><input type="text" name="switcher_background_hover_color" id="switcher_background_hover_color" class="color-field" value="#f0f0f0" data-default-color="#f0f0f0" /></td>
1318
+ </tr>
1319
+
1320
+ <tr>
1321
+ <td class="option_name"><?php _e('Dropdown text color', 'gtranslate'); ?>:</td>
1322
+ <td><input type="text" name="dropdown_text_color" id="dropdown_text_color" class="color-field" value="#000" data-default-color="#000" /></td>
1323
+ </tr>
1324
+ <tr>
1325
+ <td class="option_name"><?php _e('Dropdown hover color', 'gtranslate'); ?>:</td>
1326
+ <td><input type="text" name="dropdown_hover_color" id="dropdown_hover_color" class="color-field" value="#fff" data-default-color="#fff" /></td>
1327
+ </tr>
1328
+ <tr>
1329
+ <td class="option_name"><?php _e('Dropdown background color', 'gtranslate'); ?>:</td>
1330
+ <td><input type="text" name="dropdown_background_color" id="dropdown_background_color" class="color-field" value="#eee" data-default-color="#eee" /></td>
1331
+ </tr>
1332
+ </table>
1333
+ </div>
1334
+ </div>
1335
+ </div>
1336
+
1337
  <div id="poststuff">
1338
  <div class="postbox">
1339
  <h3 id="settings"><?php _e('Paid version advantages', 'gtranslate'); ?></h3>
1384
  <div class="postbox">
1385
  <h3 id="settings"><?php _e('Useful links', 'gtranslate'); ?></h3>
1386
  <div class="inside">
1387
+ <style>
1388
+ ul.useful_links_list {list-style-type:square;padding-left:20px;margin:0;}
1389
+ ul.useful_links_list li {margin:0;}
1390
+ ul.useful_links_list li a {text-decoration:none;}
1391
+ </style>
1392
+ <table style="width:100%;" cellpadding="4">
1393
+ <tr>
1394
+ <td>
1395
+ <ul class="useful_links_list">
1396
+ <li><a href="https://gtranslate.io/videos" target="_blank"><?php _e('Videos', 'gtranslate'); ?></a></li>
1397
+ <li><a href="https://docs.gtranslate.io/how-tos" target="_blank"><?php _e('How-tos', 'gtranslate'); ?></a></li>
1398
+ <li><a href="https://gtranslate.io/blog" target="_blank"><?php _e('Blog', 'gtranslate'); ?></a></li>
1399
+ <li><a href="https://gtranslate.io/about-us" target="_blank"><?php _e('About GTranslate team', 'gtranslate'); ?></a></li>
1400
+ <li><a href="https://gtranslate.io/?xyz=998#faq" target="_blank"><?php _e('FAQ', 'gtranslate'); ?></a></li>
1401
+ </ul>
1402
+ </td>
1403
+ <td>
1404
+ <ul class="useful_links_list">
1405
+ <li><a href="https://my.gtranslate.io/" target="_blank"><?php _e('User dashboard', 'gtranslate'); ?></a></li>
1406
+ <li><a href="https://gtranslate.io/?xyz=998#pricing" target="_blank"><?php _e('Compare plans', 'gtranslate'); ?></a></li>
1407
+ <li><a href="https://gtranslate.io/website-translation-quote" target="_blank"><?php _e('Website Translation Quote', 'gtranslate'); ?></a></li>
1408
+ <li><a href="https://wordpress.org/support/plugin/gtranslate/reviews/" target="_blank"><?php _e('Reviews', 'gtranslate'); ?></a></li>
1409
+ </ul>
1410
+ </td>
1411
+ </tr>
1412
+ </table>
1413
  </div>
1414
  </div>
1415
  </div>
1436
 
1437
  <script type="text/javascript"><?php echo $script; ?></script>
1438
  <style type="text/css">
1439
+ #widget_preview a:focus {box-shadow:none;outline:none;}
1440
+ .switcher_color_options button {box-shadow:none !important;border:1px solid #b4b9be !important;border-radius:0 !important;}
1441
+ .switcher_color_options h3 a {text-decoration:none;font-weight:400;}
1442
+ .switcher_color_options h3 a:hover {text-decoration:underline;}
1443
  .postbox #settings {padding-left:12px;}
1444
  .og_left_col { width: 59%; }
1445
  .og_right_col { width: 39%; float: right; }
1490
  $data['incl_langs'] = (isset($_POST['incl_langs']) and is_array($_POST['incl_langs'])) ? $_POST['incl_langs'] : array($data['default_language']);
1491
  $data['fincl_langs'] = (isset($_POST['fincl_langs']) and is_array($_POST['fincl_langs'])) ? $_POST['fincl_langs'] : array($data['default_language']);
1492
  $data['alt_flags'] = (isset($_POST['alt_flags']) and is_array($_POST['alt_flags'])) ? $_POST['alt_flags'] : array();
1493
+
1494
+ $data['switcher_text_color'] = isset($_POST['switcher_text_color']) ? $_POST['switcher_text_color'] : '#666';
1495
+ $data['switcher_arrow_color'] = isset($_POST['switcher_arrow_color']) ? $_POST['switcher_arrow_color'] : '#666';
1496
+ $data['switcher_border_color'] = isset($_POST['switcher_border_color']) ? $_POST['switcher_border_color'] : '#ccc';
1497
+ $data['switcher_background_color'] = isset($_POST['switcher_background_color']) ? $_POST['switcher_background_color'] : '#fff';
1498
+ $data['switcher_background_shadow_color'] = isset($_POST['switcher_background_shadow_color']) ? $_POST['switcher_background_shadow_color'] : '#efefef';
1499
+ $data['switcher_background_hover_color'] = isset($_POST['switcher_background_color']) ? $_POST['switcher_background_hover_color'] : '#f0f0f0';
1500
+ $data['dropdown_text_color'] = isset($_POST['dropdown_text_color']) ? $_POST['dropdown_text_color'] : '#000';
1501
+ $data['dropdown_hover_color'] = isset($_POST['dropdown_hover_color']) ? $_POST['dropdown_hover_color'] : '#fff'; // #ffc
1502
+ $data['dropdown_background_color'] = isset($_POST['dropdown_background_color']) ? $_POST['dropdown_background_color'] : '#eee';
1503
+
1504
  $data['language_codes'] = (isset($_POST['language_codes']) and !empty($_POST['language_codes'])) ? sanitize_text_field($_POST['language_codes']) : 'af,sq,ar,hy,az,eu,be,bg,ca,zh-CN,zh-TW,hr,cs,da,nl,en,et,tl,fi,fr,gl,ka,de,el,ht,iw,hi,hu,is,id,ga,it,ja,ko,lv,lt,mk,ms,mt,no,fa,pl,pt,ro,ru,sr,sk,sl,es,sw,sv,th,tr,uk,ur,vi,cy,yi';
1505
  $data['language_codes2'] = (isset($_POST['language_codes2']) and !empty($_POST['language_codes2'])) ? sanitize_text_field($_POST['language_codes2']) : 'af,sq,am,ar,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-CN,zh-TW,co,hr,cs,da,nl,en,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,ja,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,ps,fa,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu';
1506
 
1582
  $data['incl_langs'] = isset($data['incl_langs']) ? $data['incl_langs'] : array('en', 'es', 'it', 'pt', 'de', 'fr', 'ru', 'nl', 'ar', 'zh-CN');
1583
  $data['fincl_langs'] = isset($data['fincl_langs']) ? $data['fincl_langs'] : array('en', 'es', 'it', 'pt', 'de', 'fr', 'ru', 'nl', 'ar', 'zh-CN');
1584
  $data['alt_flags'] = isset($data['alt_flags']) ? $data['alt_flags'] : array();
1585
+
1586
+ $data['switcher_text_color'] = isset($data['switcher_text_color']) ? $data['switcher_text_color'] : '#666';
1587
+ $data['switcher_arrow_color'] = isset($data['switcher_arrow_color']) ? $data['switcher_arrow_color'] : '#666';
1588
+ $data['switcher_border_color'] = isset($data['switcher_border_color']) ? $data['switcher_border_color'] : '#ccc';
1589
+ $data['switcher_background_color'] = isset($data['switcher_background_color']) ? $data['switcher_background_color'] : '#fff';
1590
+ $data['switcher_background_shadow_color'] = isset($data['switcher_background_shadow_color']) ? $data['switcher_background_shadow_color'] : '#efefef';
1591
+ $data['switcher_background_hover_color'] = isset($data['switcher_background_hover_color']) ? $data['switcher_background_hover_color'] : '#fff';
1592
+ $data['dropdown_text_color'] = isset($data['dropdown_text_color']) ? $data['dropdown_text_color'] : '#000';
1593
+ $data['dropdown_hover_color'] = isset($data['dropdown_hover_color']) ? $data['dropdown_hover_color'] : '#fff'; // #ffc
1594
+ $data['dropdown_background_color'] = isset($data['dropdown_background_color']) ? $data['dropdown_background_color'] : '#eee';
1595
+
1596
  $data['language_codes'] = (isset($data['language_codes']) and !empty($data['language_codes'])) ? $data['language_codes'] : 'af,sq,am,ar,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-CN,zh-TW,co,hr,cs,da,nl,en,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,ja,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,ps,fa,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu';
1597
  $data['language_codes2'] = (isset($data['language_codes2']) and !empty($data['language_codes2'])) ? $data['language_codes2'] : 'af,sq,am,ar,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-CN,zh-TW,co,hr,cs,da,nl,en,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,ja,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,ps,fa,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu';
1598
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Author: Translate AI Multilingual Solutions
4
  Tags: translate, translate wordpress, multilingual, translation, translate language, bilingual, localization, translation proxy, localisation, multilanguage, google translate
5
  Requires at least: 2.8.1
6
  Tested up to: 5.4
7
- Stable tag: 2.8.56
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Donate link: https://gtranslate.io/?xyz=998#pricing
@@ -251,6 +251,10 @@ If you want us to translate your website professionally or provide you a proofre
251
  8. User Dashboard
252
 
253
  == Changelog ==
 
 
 
 
254
  = 2.8.56 =
255
  * Translate WooCommerce Emails feature is fixed and is out of beta
256
 
4
  Tags: translate, translate wordpress, multilingual, translation, translate language, bilingual, localization, translation proxy, localisation, multilanguage, google translate
5
  Requires at least: 2.8.1
6
  Tested up to: 5.4
7
+ Stable tag: 2.8.57
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Donate link: https://gtranslate.io/?xyz=998#pricing
251
  8. User Dashboard
252
 
253
  == Changelog ==
254
+ = 2.8.57 =
255
+ * New control options for flag size and colors of the "Nice dropdown with flags" language switcher
256
+ * Removed old PNG images for dropdown arrow and gradient background, now using SVG and CSS instead
257
+
258
  = 2.8.56 =
259
  * Translate WooCommerce Emails feature is fixed and is out of beta
260