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

Version Description

Fixed call to action bug

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.4.1
Comparing to
See all releases

Code changes from version 2.4 to 2.4.1

admin/class-admin-base.php CHANGED
@@ -557,7 +557,11 @@ class CHT_Admin_Base
557
 
558
  // register field section one
559
  foreach ($this->socials as $social) {
560
- register_setting($this->plugin_slug, 'cht_social_' . $social['slug']);
 
 
 
 
561
  }
562
 
563
  // register field section two
557
 
558
  // register field section one
559
  foreach ($this->socials as $social) {
560
+ register_setting($this->plugin_slug, 'cht_social_' . $social['slug']);
561
+ }
562
+
563
+ if(isset($_POST['cht_4_cta'])) {
564
+ $_POST['cht_cta'] = $_POST['cht_4_cta'];
565
  }
566
 
567
  // register field section two
assets/js/cht-scripts.min.js CHANGED
@@ -363,19 +363,26 @@
363
  jQuery("#chaty_attention_effect").val("");
364
  jQuery("#chaty_attention_effect, .test_textarea").attr("disabled", true);
365
  jQuery("#chaty_attention_effect option:first-child").text("Doesn't apply for the open state");
 
 
 
366
  jQuery(".test_textarea").val("Doesn't apply for the open state");
367
  } else if(thisVal == "hover") {
368
  jQuery(".chaty-widget").addClass("hover");
369
  jQuery("#chaty_attention_effect, .test_textarea").attr("disabled", false);
370
  jQuery("#chaty_attention_effect option:first-child").text("None");
371
  jQuery(".test_textarea").attr("placeholder","");
372
- jQuery(".test_textarea").val("Conatct us");
 
 
373
  } else {
374
  jQuery(".chaty-widget").addClass("click");
375
  jQuery("#chaty_attention_effect, .test_textarea").attr("disabled", false);
376
  jQuery("#chaty_attention_effect option:first-child").text("None");
377
  jQuery(".test_textarea").attr("placeholder","");
378
- jQuery(".test_textarea").val("Conatct us");
 
 
379
  }
380
 
381
 
363
  jQuery("#chaty_attention_effect").val("");
364
  jQuery("#chaty_attention_effect, .test_textarea").attr("disabled", true);
365
  jQuery("#chaty_attention_effect option:first-child").text("Doesn't apply for the open state");
366
+ if(jQuery(".test_textarea").val() != "Doesn't apply for the open state") {
367
+ jQuery(".test_textarea").attr("data-value", jQuery(".test_textarea").val());
368
+ }
369
  jQuery(".test_textarea").val("Doesn't apply for the open state");
370
  } else if(thisVal == "hover") {
371
  jQuery(".chaty-widget").addClass("hover");
372
  jQuery("#chaty_attention_effect, .test_textarea").attr("disabled", false);
373
  jQuery("#chaty_attention_effect option:first-child").text("None");
374
  jQuery(".test_textarea").attr("placeholder","");
375
+ if(jQuery(".test_textarea").val() == "Doesn't apply for the open state") {
376
+ jQuery(".test_textarea").val(jQuery(".test_textarea").attr("data-value"));
377
+ }
378
  } else {
379
  jQuery(".chaty-widget").addClass("click");
380
  jQuery("#chaty_attention_effect, .test_textarea").attr("disabled", false);
381
  jQuery("#chaty_attention_effect option:first-child").text("None");
382
  jQuery(".test_textarea").attr("placeholder","");
383
+ if(jQuery(".test_textarea").val() == "Doesn't apply for the open state") {
384
+ jQuery(".test_textarea").val(jQuery(".test_textarea").attr("data-value"));
385
+ }
386
  }
387
 
388
 
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.4
9
  License: GPL2
10
  */
11
 
@@ -23,7 +23,7 @@ define('CHT_INC', CHT_DIR . '/includes');
23
  define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
24
  define('CHT_PLUGIN_URL', plugin_dir_url(__FILE__));
25
  define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
26
- define('CHT_VERSION', "2.4");
27
 
28
  if (!function_exists('wp_doing_ajax')) {
29
  function wp_doing_ajax()
@@ -129,7 +129,7 @@ function cht_install()
129
  update_option('cht_active', '1');
130
  update_option('cht_position', 'right');
131
  update_option('cht_cta', 'Contact us');
132
- update_option('cht_numb_slug', ',Phone,Whatsapp,Facebook Messenger');
133
  update_option('cht_social_whatsapp', '');
134
  update_option('cht_social_phone', '');
135
  update_option('cht_widget_size', '54');
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.4.1
9
  License: GPL2
10
  */
11
 
23
  define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
24
  define('CHT_PLUGIN_URL', plugin_dir_url(__FILE__));
25
  define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
26
+ define('CHT_VERSION', "2.4.1");
27
 
28
  if (!function_exists('wp_doing_ajax')) {
29
  function wp_doing_ajax()
129
  update_option('cht_active', '1');
130
  update_option('cht_position', 'right');
131
  update_option('cht_cta', 'Contact us');
132
+ update_option('cht_numb_slug', ',Phone,Whatsapp');
133
  update_option('cht_social_whatsapp', '');
134
  update_option('cht_social_phone', '');
135
  update_option('cht_widget_size', '54');
frontend/class-frontend.php CHANGED
@@ -348,6 +348,9 @@ class CHT_Frontend extends CHT_Admin_Base
348
  $is_mobile = isset($value['is_mobile']) ? "is-in-mobile" : 0;
349
  $is_desktop = isset($value['is_desktop']) ? "is-in-desktop" : 0;
350
 
 
 
 
351
  if(!empty($value['value'])) {
352
  $data = array(
353
  "value" => $value['value'],
348
  $is_mobile = isset($value['is_mobile']) ? "is-in-mobile" : 0;
349
  $is_desktop = isset($value['is_desktop']) ? "is-in-desktop" : 0;
350
 
351
+ if(empty($mobile_url)) {
352
+ $mobile_url = $value['value'];
353
+ }
354
  if(!empty($value['value'])) {
355
  $data = array(
356
  "value" => $value['value'],
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, messenger, whatsapp button, chat icon, messenger chat icon, contact button, click to call
4
  Requires at least: 3.1
5
  Tested up to: 5.3
6
- Stable tag: 2.4
7
  Plugin URI: https://premio.io/downloads/chaty/
8
 
9
  Let your visitors contact you via Facebook Messenger, Whatsapp, Telegram, Viber, Email, Phone call, SMS and more with customizable chat & call buttons
@@ -194,6 +194,9 @@ Yes! You can even decide what chat buttons will show up on each device (desktop/
194
 
195
  == Changelog ==
196
 
 
 
 
197
  = 2.4 =
198
  A huge release for Black Friday! We've added triggers (time-based, scroll-based, and exit intent), attention effects, open-widget state, click/hover launch options, widget size, 4 widget icons, and bug fixes.
199
 
3
  Tags: whatsapp, facebook messenger, click to chat, chat, chat button, call now button, messenger, whatsapp button, chat icon, messenger chat icon, contact button, click to call
4
  Requires at least: 3.1
5
  Tested up to: 5.3
6
+ Stable tag: 2.4.1
7
  Plugin URI: https://premio.io/downloads/chaty/
8
 
9
  Let your visitors contact you via Facebook Messenger, Whatsapp, Telegram, Viber, Email, Phone call, SMS and more with customizable chat & call buttons
194
 
195
  == Changelog ==
196
 
197
+ = 2.4.1 =
198
+ Fixed call to action bug
199
+
200
  = 2.4 =
201
  A huge release for Black Friday! We've added triggers (time-based, scroll-based, and exit intent), attention effects, open-widget state, click/hover launch options, widget size, 4 widget icons, and bug fixes.
202
 
views/parts/section2.php CHANGED
@@ -242,7 +242,7 @@
242
  $cta =nl2br(get_option('cht_cta'));
243
  $cta = str_replace(array("\r","\n"),"",$cta);
244
  ?>
245
- <textarea type="text" data-gramm_editor="false" class="test_textarea" cols="40" rows="2" name="cht_cta" value="<?php echo $cta ?>" placeholder="<?php esc_attr_e('Message us!', CHT_OPT);?>" onkeydown="return limitLines(this, event)"><?php esc_attr_e($cta); ?></textarea>
246
  </div>
247
  </div>
248
 
242
  $cta =nl2br(get_option('cht_cta'));
243
  $cta = str_replace(array("\r","\n"),"",$cta);
244
  ?>
245
+ <textarea class="test_textarea" cols="40" rows="2" name="cht_cta" data-value="<?php echo esc_attr($cta) ?>" ><?php echo esc_attr($cta) ?></textarea>
246
  </div>
247
  </div>
248
 
views/widget.php CHANGED
@@ -24,28 +24,28 @@ $cta = str_replace('"',"&#34;",$cta);
24
  $font_family = get_option('cht_widget_font');
25
 
26
 
27
- $animation_class = get_option("chaty_attention_effect".$this->widget_number);
28
  $animation_class = empty($animation_class)?"":$animation_class;
29
 
30
- $time_trigger = get_option("chaty_trigger_on_time".$this->widget_number);
31
  $time_trigger = empty($time_trigger)?"no":$time_trigger;
32
 
33
- $trigger_time = get_option("chaty_trigger_time".$this->widget_number);
34
  $trigger_time = (empty($trigger_time) || !is_numeric($trigger_time) || $trigger_time < 0)?"0":$trigger_time;
35
 
36
- $exit_intent = get_option("chaty_trigger_on_exit".$this->widget_number);
37
  $exit_intent = empty($exit_intent)?"no":$exit_intent;
38
 
39
- $on_page_scroll = get_option("chaty_trigger_on_scroll".$this->widget_number);
40
  $on_page_scroll = empty($on_page_scroll)?"no":$on_page_scroll;
41
 
42
- $page_scroll = get_option("chaty_trigger_on_page_scroll".$this->widget_number);
43
  $page_scroll = (empty($page_scroll) || !is_numeric($page_scroll) || $page_scroll < 0)?"0":$page_scroll;
44
 
45
- $state = get_option("chaty_default_state".$this->widget_number);
46
  $state = empty($state)?"click":$state;
47
 
48
- $has_close_button = get_option("cht_close_button".$this->widget_number);
49
  $has_close_button = empty($has_close_button)?"yes":$has_close_button;
50
 
51
  if($state == "open") {
24
  $font_family = get_option('cht_widget_font');
25
 
26
 
27
+ $animation_class = get_option("chaty_attention_effect");
28
  $animation_class = empty($animation_class)?"":$animation_class;
29
 
30
+ $time_trigger = get_option("chaty_trigger_on_time");
31
  $time_trigger = empty($time_trigger)?"no":$time_trigger;
32
 
33
+ $trigger_time = get_option("chaty_trigger_time");
34
  $trigger_time = (empty($trigger_time) || !is_numeric($trigger_time) || $trigger_time < 0)?"0":$trigger_time;
35
 
36
+ $exit_intent = get_option("chaty_trigger_on_exit");
37
  $exit_intent = empty($exit_intent)?"no":$exit_intent;
38
 
39
+ $on_page_scroll = get_option("chaty_trigger_on_scroll");
40
  $on_page_scroll = empty($on_page_scroll)?"no":$on_page_scroll;
41
 
42
+ $page_scroll = get_option("chaty_trigger_on_page_scroll");
43
  $page_scroll = (empty($page_scroll) || !is_numeric($page_scroll) || $page_scroll < 0)?"0":$page_scroll;
44
 
45
+ $state = get_option("chaty_default_state");
46
  $state = empty($state)?"click":$state;
47
 
48
+ $has_close_button = get_option("cht_close_button");
49
  $has_close_button = empty($has_close_button)?"yes":$has_close_button;
50
 
51
  if($state == "open") {