Floating Chat Widget: Contact Chat Icons, Telegram Chat, Line, WeChat, Email, SMS, Call Button – Chaty - Version 2.1.4

Version Description

  • Fixed some rare bugs
Download this release

Release Info

Developer galdub
Plugin Icon wp plugin Floating Chat Widget: Contact Chat Icons, Telegram Chat, Line, WeChat, Email, SMS, Call Button – Chaty
Version 2.1.4
Comparing to
See all releases

Code changes from version 2.1.3 to 2.1.4

admin/class-admin-base.php CHANGED
@@ -96,7 +96,7 @@ class CHT_Admin_Base
96
  </tr>
97
  <tr>
98
  <th>Plugin Version</th>
99
- <td><?php echo CHT_CURRENT_VERSION ?></td>
100
  </tr>
101
  <tr>
102
  <th>Domain</th>
96
  </tr>
97
  <tr>
98
  <th>Plugin Version</th>
99
+ <td><?php echo CHT_VERSION ?></td>
100
  </tr>
101
  <tr>
102
  <th>Domain</th>
assets/js/cht-front-script.js CHANGED
@@ -74,7 +74,7 @@
74
  default:
75
  return '<svg version="1.1" id="ch" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54" style="enable-background:new -496 507.7 54 54;" xml:space="preserve">\n<style type="text/css">.st1 {fill: #FFFFFF;}.st0{fill: #808080;}</style>\n<g><circle cx="-469" cy="534.7" r="27" fill="' + t.object_settings.color + '"/></g>\n<path class="st1" d="M-459.9,523.7h-20.3c-1.9,0-3.4,1.5-3.4,3.4v15.3c0,1.9,1.5,3.4,3.4,3.4h11.4l5.9,4.9c0.2,0.2,0.3,0.2,0.5,0.2 h0.3c0.3-0.2,0.5-0.5,0.5-0.8v-4.2h1.7c1.9,0,3.4-1.5,3.4-3.4v-15.3C-456.5,525.2-458,523.7-459.9,523.7z"/>\n<path class="st0" d="M-477.7,530.5h11.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-11.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,530.8-478.2,530.5-477.7,530.5z"/>\n<path class="st0" d="M-477.7,533.5h7.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-7.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,533.9-478.2,533.5-477.7,533.5z"/>\n</svg>'
76
  }
77
- }(e), C = i("display_cta"), "" != d && "none" != C && (g += ' <div class="chaty-widget-i-title true"> ', g += d, g += "</div>"), g += "</div>", g += '<div class="chaty-widget-i i-trigger-close" data-title="Hide" style="background-color:' + e.object_settings.color + '">', g += '<svg viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">', g += '<ellipse cx="26" cy="26" rx="26" ry="26" fill="' + e.object_settings.color + '"/>', g += '<rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(18.35 15.6599) scale(0.998038 1.00196) rotate(45)" fill="white"/>', g += '<rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(37.5056 18.422) scale(0.998038 1.00196) rotate(135)" fill="white"/>', g += "</svg>", g += '<div class="chaty-widget-i-title">', g += "Hide", g += "</div>", g += "</div>", g += " </div>", 0 === n.length && (g += '<div class="get" style="position: absolute;width: 100%;text-align: center;display: block!important; opacity: 1 !important;visibility: visible !important;"> <a href="https://premio.io/downloads/chaty/?utm_source=wpplugin" target="_blank" style=" font-size: 11px !important; top: -5px !important; position: relative !important; color: #222 !important; width:60px !important; font-family: Lato, Helvetica, Arial, sans-serif; display: block !important; opacity: 1 !important; visibility: visible !important; ">Get Chaty</a></div>'), g += "</div>"
78
 
79
  } else {
80
  var w = "";
74
  default:
75
  return '<svg version="1.1" id="ch" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54" style="enable-background:new -496 507.7 54 54;" xml:space="preserve">\n<style type="text/css">.st1 {fill: #FFFFFF;}.st0{fill: #808080;}</style>\n<g><circle cx="-469" cy="534.7" r="27" fill="' + t.object_settings.color + '"/></g>\n<path class="st1" d="M-459.9,523.7h-20.3c-1.9,0-3.4,1.5-3.4,3.4v15.3c0,1.9,1.5,3.4,3.4,3.4h11.4l5.9,4.9c0.2,0.2,0.3,0.2,0.5,0.2 h0.3c0.3-0.2,0.5-0.5,0.5-0.8v-4.2h1.7c1.9,0,3.4-1.5,3.4-3.4v-15.3C-456.5,525.2-458,523.7-459.9,523.7z"/>\n<path class="st0" d="M-477.7,530.5h11.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-11.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,530.8-478.2,530.5-477.7,530.5z"/>\n<path class="st0" d="M-477.7,533.5h7.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-7.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,533.9-478.2,533.5-477.7,533.5z"/>\n</svg>'
76
  }
77
+ }(e), C = i("display_cta"), "" != d && "none" != C && (g += ' <div class="chaty-widget-i-title true"> ', g += d, g += "</div>"), g += "</div>", g += '<div class="chaty-widget-i i-trigger-close" data-title="Hide" style="background-color:' + e.object_settings.color + '">', g += '<svg viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">', g += '<ellipse cx="26" cy="26" rx="26" ry="26" fill="' + e.object_settings.color + '"/>', g += '<rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(18.35 15.6599) scale(0.998038 1.00196) rotate(45)" fill="white"/>', g += '<rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(37.5056 18.422) scale(0.998038 1.00196) rotate(135)" fill="white"/>', g += "</svg>", g += '<div class="chaty-widget-i-title">', g += "Hide", g += "</div>", g += "</div>", g += " </div>", 0 === n.length && (g += '<div class="get" style="position: absolute;width: 100%;text-align: center;display: block!important; opacity: 1 !important;visibility: visible !important;"> <a href="https://premio.io/downloads/chaty/?utm_source=wpplugin" target="_blank" style=" font-size: 11px !important; top: -5px !important; position: relative !important; color: #222 !important; width:60px !important; font-family: Lato, Helvetica, Arial, sans-serif; display: block !important; opacity: 1 !important; visibility: visible !important; " class="chaty-get-btn">Get Chaty</a></div>'), g += "</div>"
78
 
79
  } else {
80
  var w = "";
assets/js/cht-scripts.js CHANGED
@@ -658,13 +658,13 @@
658
  $('.add_slug').val(newlocaldata);
659
  }
660
  var del_item = $('.btn-cancel[data-social^="' + icon + '"]').parents('.channels-selected__item');
661
- del_item.remove();
662
 
663
  var item = $(this).parent('.channels-selected__item');
664
 
665
-
666
  var social = $(this).data('social');
667
 
 
 
668
  $.ajax({
669
  type: 'POST',
670
  dataType: 'json',
@@ -682,7 +682,6 @@
682
  item.remove();
683
  del_item.remove();
684
 
685
-
686
  $('.icon-sm').each(function () {
687
  if ($(this).data('social') === social) {
688
  // $(this).removeClass('active');
658
  $('.add_slug').val(newlocaldata);
659
  }
660
  var del_item = $('.btn-cancel[data-social^="' + icon + '"]').parents('.channels-selected__item');
 
661
 
662
  var item = $(this).parent('.channels-selected__item');
663
 
 
664
  var social = $(this).data('social');
665
 
666
+ del_item.remove();
667
+
668
  $.ajax({
669
  type: 'POST',
670
  dataType: 'json',
682
  item.remove();
683
  del_item.remove();
684
 
 
685
  $('.icon-sm').each(function () {
686
  if ($(this).data('social') === social) {
687
  // $(this).removeClass('active');
assets/js/cht-scripts.min.js CHANGED
@@ -363,6 +363,14 @@ function check_for_close_btn() {
363
  } else {
364
  jQuery("#chaty-social-close").hide();
365
  }
 
 
 
 
 
 
 
 
366
  }
367
  function set_social_channel_order() {
368
  socialString = [];
363
  } else {
364
  jQuery("#chaty-social-close").hide();
365
  }
366
+ var srtString = "";
367
+ jQuery("#channels-selected-list > li").each(function(){
368
+ if(jQuery(this).attr("data-id") != "undefined" && jQuery(this).attr("data-id") != "") {
369
+ srtString += jQuery(this).attr("data-id")+",";
370
+ }
371
+ srtString = srtString.trimRight(",")
372
+ });
373
+ jQuery(".add_slug").val(srtString);
374
  }
375
  function set_social_channel_order() {
376
  socialString = [];
cht-icons.php CHANGED
@@ -5,7 +5,7 @@
5
  Description: Chat with your website visitors via their favorite channels. Show a chat icon on the bottom of your site and communicate with your customers.
6
  Author: Premio
7
  Author URI: https://premio.io/downloads/chaty/
8
- Version: 2.1.3
9
  License: GPL2
10
  */
11
 
@@ -13,6 +13,7 @@ if (!defined('ABSPATH')) {
13
  exit; // don't access directly
14
  };
15
 
 
16
  define('CHT_FILE', __FILE__); // this file
17
  define('CHT_OPT', 'chaty');
18
  define('CHT_DIR', dirname(CHT_FILE)); // our directory
@@ -22,7 +23,7 @@ define('CHT_INC', CHT_DIR . '/includes');
22
  define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
23
  define('CHT_PLUGIN_URL', plugins_url() . "/chaty/");
24
  define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
25
- define('CHT_VERSION', "2.1.3");
26
 
27
  if (!function_exists('wp_doing_ajax')) {
28
  function wp_doing_ajax()
5
  Description: Chat with your website visitors via their favorite channels. Show a chat icon on the bottom of your site and communicate with your customers.
6
  Author: Premio
7
  Author URI: https://premio.io/downloads/chaty/
8
+ Version: 2.1.4
9
  License: GPL2
10
  */
11
 
13
  exit; // don't access directly
14
  };
15
 
16
+
17
  define('CHT_FILE', __FILE__); // this file
18
  define('CHT_OPT', 'chaty');
19
  define('CHT_DIR', dirname(CHT_FILE)); // our directory
23
  define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
24
  define('CHT_PLUGIN_URL', plugins_url() . "/chaty/");
25
  define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
26
+ define('CHT_VERSION', "2.1.4");
27
 
28
  if (!function_exists('wp_doing_ajax')) {
29
  function wp_doing_ajax()
frontend/class-frontend.php CHANGED
@@ -256,6 +256,7 @@ class CHT_Frontend extends CHT_Admin_Base
256
 
257
  // echo $res;
258
  // }
 
259
  wp_die();
260
  }
261
 
@@ -295,11 +296,11 @@ class CHT_Frontend extends CHT_Admin_Base
295
  if (!wp_is_mobile()) {
296
  $val = "+" . $val;
297
  }
298
- $arr[mb_strtolower($social['slug'])] = $val;
299
  } else if($social['slug'] == "Whatsapp") {
300
  $val = $value['value'];
301
  $val = str_replace("+","", $val);
302
- $arr[mb_strtolower($social['slug'])] = $val;
303
  } else if($social['slug'] == "Facebook_Messenger") {
304
  $val = $value['value'];
305
  $val = str_replace("facebook.com","m.me", $val);
@@ -307,13 +308,15 @@ class CHT_Frontend extends CHT_Admin_Base
307
  $val = esc_url($val);
308
  $val = str_replace("http:", "https:", $val);
309
  $value['value'] = $val;
310
- $arr[mb_strtolower($social['slug'])] = $value['value'];
311
  } else if($social['slug'] == "Link" || $social['slug'] == "Custom_Link") {
312
  $value['value'] = esc_url($value['value']);
313
- $arr[mb_strtolower($social['slug'])] = $value['value'];
314
  } else {
315
- $arr[mb_strtolower($social['slug'])] = $value['value'];
316
  }
 
 
317
  }
318
  };
319
  endforeach;
256
 
257
  // echo $res;
258
  // }
259
+ echo "1";
260
  wp_die();
261
  }
262
 
296
  if (!wp_is_mobile()) {
297
  $val = "+" . $val;
298
  }
299
+ $arr[strtolower($social['slug'])] = $val;
300
  } else if($social['slug'] == "Whatsapp") {
301
  $val = $value['value'];
302
  $val = str_replace("+","", $val);
303
+ $arr[strtolower($social['slug'])] = $val;
304
  } else if($social['slug'] == "Facebook_Messenger") {
305
  $val = $value['value'];
306
  $val = str_replace("facebook.com","m.me", $val);
308
  $val = esc_url($val);
309
  $val = str_replace("http:", "https:", $val);
310
  $value['value'] = $val;
311
+ $arr[strtolower($social['slug'])] = $value['value'];
312
  } else if($social['slug'] == "Link" || $social['slug'] == "Custom_Link") {
313
  $value['value'] = esc_url($value['value']);
314
+ $arr[strtolower($social['slug'])] = $value['value'];
315
  } else {
316
+ $arr[strtolower($social['slug'])] = $value['value'];
317
  }
318
+ $value['value'] = esc_attr__($value['value']);
319
+ $arr[strtolower($social['slug'])] = $value['value'];
320
  }
321
  };
322
  endforeach;
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: galdub, tomeraharon, premio
3
  Tags: whatsapp, facebook messenger, click to chat, chat, chat button, call now button
4
  Requires at least: 3.1
5
  Tested up to: 5.2
6
- Stable tag: 2.1.3
7
  Plugin URI: https://premio.io/downloads/chaty/
8
 
9
  FREE customizable live chat and call buttons. Let your visitors contact you via Facebook Messenger, Whatsapp, Telegram, Viber, Email, SMS and more.
@@ -173,6 +173,9 @@ Yes! You can even decide what chat buttons will show up on each device (desktop/
173
 
174
  == Changelog ==
175
 
 
 
 
176
  = 2.1.3 =
177
  * Multi widgets + Reduced CSS conflicts
178
 
3
  Tags: whatsapp, facebook messenger, click to chat, chat, chat button, call now button
4
  Requires at least: 3.1
5
  Tested up to: 5.2
6
+ Stable tag: 2.1.4
7
  Plugin URI: https://premio.io/downloads/chaty/
8
 
9
  FREE customizable live chat and call buttons. Let your visitors contact you via Facebook Messenger, Whatsapp, Telegram, Viber, Email, SMS and more.
173
 
174
  == Changelog ==
175
 
176
+ = 2.1.4 =
177
+ * Fixed some rare bugs
178
+
179
  = 2.1.3 =
180
  * Multi widgets + Reduced CSS conflicts
181
 
views/widget.php CHANGED
@@ -52,6 +52,7 @@ if($len > 0 && $len < 3) {
52
  echo "<style>";
53
  echo ".chaty-widget-is a{display: block; margin:0; padding:0; }";
54
  echo ".chaty-widget-is svg{margin:0; padding:0;}";
 
55
  echo "</style>";
56
  ?>
57
  <script>
52
  echo "<style>";
53
  echo ".chaty-widget-is a{display: block; margin:0; padding:0; }";
54
  echo ".chaty-widget-is svg{margin:0; padding:0;}";
55
+ echo ".chaty-widget.one_widget .chaty-get-btn {padding-top: 5px;}";
56
  echo "</style>";
57
  ?>
58
  <script>