WhatsApp Chat WP - Version 4.4.6

Version Description

Hello! We've recently acquired this plugin and included tons of new features.

Download this release

Release Info

Developer quadlayers
Plugin Icon 128x128 WhatsApp Chat WP
Version 4.4.6
Comparing to
See all releases

Code changes from version 4.4.5 to 4.4.6

assets/js/qlwapp.js CHANGED
@@ -74,7 +74,7 @@
74
  if (!(timeCurrent.getTime() >= timeFrom.getTime() && timeCurrent.getTime() <= timeTo.getTime())) {
75
  $contact.addClass('qlwapp-readonly');
76
  }
77
-
78
  // Add offset timezone to contact timeto & timefrom
79
  $contact.find('.from').text(plugin.timeDateToString(timeFrom));
80
  $contact.find('.to').text(plugin.timeDateToString(timeTo));
@@ -213,7 +213,11 @@
213
  url = 'https://web.whatsapp.com/send';
214
  }
215
 
216
- $(this).attr('href', url + '?phone=' + $(this).data('phone') + '&text=' + $(this).data('message'));
 
 
 
 
217
 
218
  });
219
 
74
  if (!(timeCurrent.getTime() >= timeFrom.getTime() && timeCurrent.getTime() <= timeTo.getTime())) {
75
  $contact.addClass('qlwapp-readonly');
76
  }
77
+
78
  // Add offset timezone to contact timeto & timefrom
79
  $contact.find('.from').text(plugin.timeDateToString(timeFrom));
80
  $contact.find('.to').text(plugin.timeDateToString(timeTo));
213
  url = 'https://web.whatsapp.com/send';
214
  }
215
 
216
+ var $button = $(this),
217
+ message = $button.data('message') || '',
218
+ phone = $button.data('phone') || '';
219
+
220
+ $(this).attr('href', url + '?phone=' + phone + '&text=' + message);
221
 
222
  });
223
 
assets/js/qlwapp.min.js CHANGED
@@ -1 +1 @@
1
- (function(d,c,a,g){var e={};function b(i,h){this.$qlwapp=d(i);this.init(this)}b.prototype={timeDateToString:function(i){var h=""+i.getMinutes();if(h.length===1){h="0"+h}return i.getHours()+":"+h},timeStringToInt:function(i,h){return parseInt(i+h)},init:function(i){var h=this.$qlwapp;h.on("qlwapp.init",function(j){i.mobiledevice=(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))});h.on("qlwapp.time",function(p){console.log("qlwapp.time");var j=d(p.target),r=j.data("timefrom")||false,s=j.data("timeto")||false,o=parseInt(j.data("timezone"))||0;if(!s||!r||(r===s)){return true}var v=new Date(),l=v.getTimezoneOffset(),q=-l-o;var u=new Date(),k=new Date();var t,m;t=i.timeStringToInt(r[0],r[1]);m=i.timeStringToInt(r[3],r[4]);k.setHours(t);k.setMinutes(m+q);t=i.timeStringToInt(s[0],s[1]);m=i.timeStringToInt(s[3],s[4]);u.setHours(t);u.setMinutes(m+q);if(!(v.getTime()>=k.getTime()&&v.getTime()<=u.getTime())){j.addClass("qlwapp-readonly")}j.find(".from").text(i.timeDateToString(k));j.find(".to").text(i.timeDateToString(u))});h.on("qlwapp.pro",function(j){h.find(".qlwapp-toggle").trigger("qlwapp.time");h.find(".qlwapp-account").each(function(l,k){d(k).trigger("qlwapp.time")})});h.on("qlwapp.resize",function(j){if(d(this).hasClass("qlwapp-show")){d(this).trigger("qlwapp.toggle")}});h.on("qlwapp.init",function(j){if(!i.mobiledevice){h.addClass("desktop").removeClass("mobile")}else{h.addClass("mobile").removeClass("desktop")}h.addClass("qlwapp-js-ready")});h.on("qlwapp.init",function(j){if(h.hasClass("qlwapp-premium")){h.trigger("qlwapp.pro")}});h.addClass("qlwapp-js-ready").trigger("qlwapp.init");h.on("qlwapp.height",function(o){var p=d(o.delegateTarget),n=p.find(".qlwapp-body"),m=n.find(".qlwapp-carousel");var l=p.find(".qlwapp-header"),k=p.find(".qlwapp-footer"),j=(d(c).innerHeight()-l.outerHeight()-k.outerHeight());if(!i.mobiledevice){j=(d(c).innerHeight()*0.7-l.outerHeight()-k.outerHeight())}m.css({"max-height":j+"px"})});h.on("qlwapp.toggle",function(k){var l=d(k.delegateTarget),j=l.find(".qlwapp-box");l.addClass("qlwapp-transition");j.removeClass("response texting");setTimeout(function(){l.toggleClass("qlwapp-show").trigger("qlwapp.height")},10);setTimeout(function(){l.toggleClass("qlwapp-transition")},300)});h.on("click","[data-action=box], [data-action=close]",function(j){j.preventDefault();d(j.delegateTarget).trigger("qlwapp.toggle")});h.on("click","[data-action=open]",function(k){var j="https://api.whatsapp.com/send";if(!i.mobiledevice){j="https://web.whatsapp.com/send"}d(this).attr("href",j+"?phone="+d(this).data("phone")+"&text="+d(this).data("message"))});h.on("click","[data-action=previous]",function(k){k.preventDefault();var l=d(k.delegateTarget),j=l.find(".qlwapp-box");j.addClass("closing");setTimeout(function(){j.removeClass("response").removeClass("closing");j.removeClass("texting")},300)});h.on("click","[data-action=chat]",function(w){w.preventDefault();var n=d(this),t=d(w.delegateTarget),u=t.find(".qlwapp-box"),v=n.find(".qlwapp-avatar img").attr("src"),A=n.find(".qlwapp-name").text(),q=n.find(".qlwapp-label").text(),p=n.find(".qlwapp-time").text(),r=n.data("message"),o=n.data("phone");u.addClass("response").addClass("opening");t.trigger("qlwapp.height");setTimeout(function(){u.removeClass("opening")},300);var k=u.find(".qlwapp-reply"),x=u.find(".qlwapp-header"),j=x.find(".qlwapp-avatar img"),m=x.find(".qlwapp-number"),l=x.find(".qlwapp-name"),z=x.find(".qlwapp-label"),y=u.find(".qlwapp-message");var s=p?p+" - "+q:q;k.data("phone",o);j.attr("src",v);m.html(o);l.html(A);z.html(s);y.html(r)});h.on("click","textarea",function(j){h.off("qlwapp.resize")});h.on("keypress","textarea",function(j){if(j.keyCode==13){h.find(".qlwapp-reply").trigger("click");setTimeout(function(){c.location=h.find(".qlwapp-reply").attr("href")},100)}});h.on("keyup","[data-action=response]",function(m){m.preventDefault();var p=d(this).find("textarea"),o=d(this).find("pre"),j=d(this).find(".qlwapp-reply"),n=d(m.delegateTarget),l=n.find(".qlwapp-box"),k=l.find(".qlwapp-buttons");o.html(p.val());setTimeout(function(){l.addClass("texting").css({"padding-bottom":o.outerHeight()});k.addClass("active");var q=p.val();j.data("message",q);if(q==""){l.removeClass("texting");k.removeClass("active")}},300)})}};d.fn.qlwapp=function(i){var h=arguments;if(i===g||typeof i==="object"){return this.each(function(){if(!d.data(this,"plugin_qlwapp")){d.data(this,"plugin_qlwapp",new b(this,i))}})}else{if(typeof i==="string"&&i[0]!=="_"&&i!=="init"){var j;this.each(function(){var k=d.data(this,"plugin_qlwapp");if(k instanceof b&&typeof k[i]==="function"){j=k[i].apply(k,Array.prototype.slice.call(h,1))}if(i==="destroy"){d.data(this,"plugin_qlwapp",null)}});return j!==g?j:this}}};function f(){d("div#qlwapp").qlwapp()}f();d(c).on("load",function(){f()});d(c).on("click",function(h){if(!d(h.target).closest("#qlwapp.qlwapp-show").length){d("div#qlwapp.qlwapp-show").trigger("qlwapp.toggle")}});d(c).on("resize",function(h){d("div#qlwapp").trigger("qlwapp.resize");d("div#qlwapp").trigger("qlwapp.init")})})(jQuery,window,document);
1
+ (function(d,c,a,g){var e={};function b(i,h){this.$qlwapp=d(i);this.init(this)}b.prototype={timeDateToString:function(i){var h=""+i.getMinutes();if(h.length===1){h="0"+h}return i.getHours()+":"+h},timeStringToInt:function(i,h){return parseInt(i+h)},init:function(i){var h=this.$qlwapp;h.on("qlwapp.init",function(j){i.mobiledevice=(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))});h.on("qlwapp.time",function(p){console.log("qlwapp.time");var j=d(p.target),r=j.data("timefrom")||false,s=j.data("timeto")||false,o=parseInt(j.data("timezone"))||0;if(!s||!r||(r===s)){return true}var v=new Date(),l=v.getTimezoneOffset(),q=-l-o;var u=new Date(),k=new Date();var t,m;t=i.timeStringToInt(r[0],r[1]);m=i.timeStringToInt(r[3],r[4]);k.setHours(t);k.setMinutes(m+q);t=i.timeStringToInt(s[0],s[1]);m=i.timeStringToInt(s[3],s[4]);u.setHours(t);u.setMinutes(m+q);if(!(v.getTime()>=k.getTime()&&v.getTime()<=u.getTime())){j.addClass("qlwapp-readonly")}j.find(".from").text(i.timeDateToString(k));j.find(".to").text(i.timeDateToString(u))});h.on("qlwapp.pro",function(j){h.find(".qlwapp-toggle").trigger("qlwapp.time");h.find(".qlwapp-account").each(function(l,k){d(k).trigger("qlwapp.time")})});h.on("qlwapp.resize",function(j){if(d(this).hasClass("qlwapp-show")){d(this).trigger("qlwapp.toggle")}});h.on("qlwapp.init",function(j){if(!i.mobiledevice){h.addClass("desktop").removeClass("mobile")}else{h.addClass("mobile").removeClass("desktop")}h.addClass("qlwapp-js-ready")});h.on("qlwapp.init",function(j){if(h.hasClass("qlwapp-premium")){h.trigger("qlwapp.pro")}});h.addClass("qlwapp-js-ready").trigger("qlwapp.init");h.on("qlwapp.height",function(o){var p=d(o.delegateTarget),n=p.find(".qlwapp-body"),m=n.find(".qlwapp-carousel");var l=p.find(".qlwapp-header"),k=p.find(".qlwapp-footer"),j=(d(c).innerHeight()-l.outerHeight()-k.outerHeight());if(!i.mobiledevice){j=(d(c).innerHeight()*0.7-l.outerHeight()-k.outerHeight())}m.css({"max-height":j+"px"})});h.on("qlwapp.toggle",function(k){var l=d(k.delegateTarget),j=l.find(".qlwapp-box");l.addClass("qlwapp-transition");j.removeClass("response texting");setTimeout(function(){l.toggleClass("qlwapp-show").trigger("qlwapp.height")},10);setTimeout(function(){l.toggleClass("qlwapp-transition")},300)});h.on("click","[data-action=box], [data-action=close]",function(j){j.preventDefault();d(j.delegateTarget).trigger("qlwapp.toggle")});h.on("click","[data-action=open]",function(n){var k="https://api.whatsapp.com/send";if(!i.mobiledevice){k="https://web.whatsapp.com/send"}var m=d(this),l=m.data("message")||"",j=m.data("phone")||"";d(this).attr("href",k+"?phone="+j+"&text="+l)});h.on("click","[data-action=previous]",function(k){k.preventDefault();var l=d(k.delegateTarget),j=l.find(".qlwapp-box");j.addClass("closing");setTimeout(function(){j.removeClass("response").removeClass("closing");j.removeClass("texting")},300)});h.on("click","[data-action=chat]",function(w){w.preventDefault();var n=d(this),t=d(w.delegateTarget),u=t.find(".qlwapp-box"),v=n.find(".qlwapp-avatar img").attr("src"),A=n.find(".qlwapp-name").text(),q=n.find(".qlwapp-label").text(),p=n.find(".qlwapp-time").text(),r=n.data("message"),o=n.data("phone");u.addClass("response").addClass("opening");t.trigger("qlwapp.height");setTimeout(function(){u.removeClass("opening")},300);var k=u.find(".qlwapp-reply"),x=u.find(".qlwapp-header"),j=x.find(".qlwapp-avatar img"),m=x.find(".qlwapp-number"),l=x.find(".qlwapp-name"),z=x.find(".qlwapp-label"),y=u.find(".qlwapp-message");var s=p?p+" - "+q:q;k.data("phone",o);j.attr("src",v);m.html(o);l.html(A);z.html(s);y.html(r)});h.on("click","textarea",function(j){h.off("qlwapp.resize")});h.on("keypress","textarea",function(j){if(j.keyCode==13){h.find(".qlwapp-reply").trigger("click");setTimeout(function(){c.location=h.find(".qlwapp-reply").attr("href")},100)}});h.on("keyup","[data-action=response]",function(m){m.preventDefault();var p=d(this).find("textarea"),o=d(this).find("pre"),j=d(this).find(".qlwapp-reply"),n=d(m.delegateTarget),l=n.find(".qlwapp-box"),k=l.find(".qlwapp-buttons");o.html(p.val());setTimeout(function(){l.addClass("texting").css({"padding-bottom":o.outerHeight()});k.addClass("active");var q=p.val();j.data("message",q);if(q==""){l.removeClass("texting");k.removeClass("active")}},300)})}};d.fn.qlwapp=function(i){var h=arguments;if(i===g||typeof i==="object"){return this.each(function(){if(!d.data(this,"plugin_qlwapp")){d.data(this,"plugin_qlwapp",new b(this,i))}})}else{if(typeof i==="string"&&i[0]!=="_"&&i!=="init"){var j;this.each(function(){var k=d.data(this,"plugin_qlwapp");if(k instanceof b&&typeof k[i]==="function"){j=k[i].apply(k,Array.prototype.slice.call(h,1))}if(i==="destroy"){d.data(this,"plugin_qlwapp",null)}});return j!==g?j:this}}};function f(){d("div#qlwapp").qlwapp()}f();d(c).on("load",function(){f()});d(c).on("click",function(h){if(!d(h.target).closest("#qlwapp.qlwapp-show").length){d("div#qlwapp.qlwapp-show").trigger("qlwapp.toggle")}});d(c).on("resize",function(h){d("div#qlwapp").trigger("qlwapp.resize");d("div#qlwapp").trigger("qlwapp.init")})})(jQuery,window,document);
changelog.txt CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  = 4.4.5 =
2
  * Fix. fixed phone number issue
3
  * Fix. duplicated qlwapp.init call
1
+ = 4.4.6 =
2
+ * Fix. fixed undefined message text in shortcode
3
+ * Fix. fixed default shortcode attributes
4
+
5
  = 4.4.5 =
6
  * Fix. fixed phone number issue
7
  * Fix. duplicated qlwapp.init call
includes/defaults.php CHANGED
@@ -26,13 +26,14 @@ if (!class_exists('QLWAPP_Options')) {
26
  'label' => '',
27
  'name' => '',
28
  ),
29
- 'user' => array(
30
- 'message' => sprintf(esc_html__('Hello! I\'m testing the %s plugin @https://quadlayers.com', 'wp-whatsapp-chat'), QLWAPP_PLUGIN_NAME)
31
- ),
32
  'button' => array(
33
  'layout' => 'button',
34
  'position' => 'bottom-right',
35
  'text' => esc_html__('How can I help you?', 'wp-whatsapp-chat'),
 
36
  'icon' => 'qlwapp-whatsapp-icon',
37
  'phone' => '',
38
  'developer' => 'no',
@@ -208,6 +209,10 @@ if (!class_exists('QLWAPP_Options')) {
208
 
209
  $options = get_option(QLWAPP_DOMAIN, $this->defaults());
210
 
 
 
 
 
211
  if (isset($options['button']['rounded']) && $options['button']['rounded'] == 1) {
212
  $options['button']['rounded'] = 'yes';
213
  }
26
  'label' => '',
27
  'name' => '',
28
  ),
29
+ //'user' => array(
30
+ // 'message' => sprintf(esc_html__('Hello! I\'m testing the %s plugin @https://quadlayers.com', 'wp-whatsapp-chat'), QLWAPP_PLUGIN_NAME)
31
+ //),
32
  'button' => array(
33
  'layout' => 'button',
34
  'position' => 'bottom-right',
35
  'text' => esc_html__('How can I help you?', 'wp-whatsapp-chat'),
36
+ 'message' => sprintf(esc_html__('Hello! I\'m testing the %s plugin @https://quadlayers.com', 'wp-whatsapp-chat'), QLWAPP_PLUGIN_NAME),
37
  'icon' => 'qlwapp-whatsapp-icon',
38
  'phone' => '',
39
  'developer' => 'no',
209
 
210
  $options = get_option(QLWAPP_DOMAIN, $this->defaults());
211
 
212
+ if (isset($options['user']['message'])) {
213
+ $options['button']['message'] = $options['user']['message'];
214
+ }
215
+
216
  if (isset($options['button']['rounded']) && $options['button']['rounded'] == 1) {
217
  $options['button']['rounded'] = 'yes';
218
  }
includes/frontend.php CHANGED
@@ -6,8 +6,8 @@ if (!class_exists('QLWAPP_Frontend')) {
6
  protected static $instance;
7
 
8
  function add_js() {
9
- wp_enqueue_style(QLWAPP_DOMAIN, plugins_url('/assets/css/qlwapp'. QLWAPP::is_min().'.css', QLWAPP_PLUGIN_FILE), null, QLWAPP_PLUGIN_VERSION, 'all');
10
- wp_enqueue_script(QLWAPP_DOMAIN, plugins_url('/assets/js/qlwapp'. QLWAPP::is_min().'.js', QLWAPP_PLUGIN_FILE), array('jquery'), QLWAPP_PLUGIN_VERSION, true);
11
  }
12
 
13
  function add_box() {
@@ -96,7 +96,7 @@ if (!class_exists('QLWAPP_Frontend')) {
96
  if (in_array($wp_query->queried_object->term_id, $qlwapp['display'][$wp_query->queried_object->taxonomy])) {
97
  return true;
98
  }
99
-
100
  //backward compatibility for $term->name
101
  if (in_array($wp_query->queried_object->slug, $qlwapp['display'][$wp_query->queried_object->taxonomy])) {
102
  return true;
@@ -111,16 +111,17 @@ if (!class_exists('QLWAPP_Frontend')) {
111
 
112
  global $qlwapp;
113
 
114
- extract(shortcode_atts($qlwapp['button'], $atts));
115
 
116
  ob_start();
117
  ?>
118
- <div id="qlwapp" class="qlwapp-button qlwapp-js-ready">
119
- <a class="qlwapp-toggle" data-action="open" data-phone="<?php echo esc_attr($phone); ?>" href="#" target="_blank">
120
- <?php if ($icon): ?>
121
- <i class="qlwapp-icon <?php echo esc_attr($icon); ?>"></i>
122
  <?php endif; ?>
123
- <?php if ($content): ?>
 
124
  <span class="qlwapp-text"><?php echo esc_html($content); ?></span>
125
  <?php endif; ?>
126
  </a>
6
  protected static $instance;
7
 
8
  function add_js() {
9
+ wp_enqueue_style(QLWAPP_DOMAIN, plugins_url('/assets/css/qlwapp' . QLWAPP::is_min() . '.css', QLWAPP_PLUGIN_FILE), null, QLWAPP_PLUGIN_VERSION, 'all');
10
+ wp_enqueue_script(QLWAPP_DOMAIN, plugins_url('/assets/js/qlwapp' . QLWAPP::is_min() . '.js', QLWAPP_PLUGIN_FILE), array('jquery'), QLWAPP_PLUGIN_VERSION, true);
11
  }
12
 
13
  function add_box() {
96
  if (in_array($wp_query->queried_object->term_id, $qlwapp['display'][$wp_query->queried_object->taxonomy])) {
97
  return true;
98
  }
99
+
100
  //backward compatibility for $term->name
101
  if (in_array($wp_query->queried_object->slug, $qlwapp['display'][$wp_query->queried_object->taxonomy])) {
102
  return true;
111
 
112
  global $qlwapp;
113
 
114
+ $atts = wp_parse_args($atts, $qlwapp['button']);
115
 
116
  ob_start();
117
  ?>
118
+ <div style="width: auto;" id="qlwapp" class="qlwapp-js-ready <?php printf("qlwapp-%s qlwapp-%s", esc_attr($atts['layout']), esc_attr($atts['rounded'] === 'yes' ? 'rounded' : 'square')); ?>">
119
+ <a class="qlwapp-toggle" data-action="open" data-phone="<?php echo esc_attr($atts['phone']); ?>" data-message="<?php echo esc_html($atts['message']); ?>" href="#" target="_blank">
120
+ <?php if ($atts['icon']): ?>
121
+ <i class="qlwapp-icon <?php echo esc_attr($atts['icon']); ?>"></i>
122
  <?php endif; ?>
123
+ <i class="qlwapp-close" data-action="close">&times;</i>
124
+ <?php if ($atts['text']): ?>
125
  <span class="qlwapp-text"><?php echo esc_html($content); ?></span>
126
  <?php endif; ?>
127
  </a>
includes/pages/button.php CHANGED
@@ -73,7 +73,7 @@
73
  <tr>
74
  <th scope="row"><?php esc_html_e('Message', 'wp-whatsapp-chat'); ?></th>
75
  <td>
76
- <textarea maxlength="500" style="width:100%;height: 100px;padding: 8px;" name="<?php echo esc_attr(QLWAPP_DOMAIN); ?>[user][message]" placeholder="<?php echo esc_html($this->defaults['user']['message']); ?>" ><?php echo esc_html(trim($qlwapp['user']['message'])); ?></textarea>
77
  <p class="description hidden"><?php esc_html_e('Message that will automatically appear in the text field of a chat.', 'wp-whatsapp-chat'); ?></p>
78
  </td>
79
  </tr>
73
  <tr>
74
  <th scope="row"><?php esc_html_e('Message', 'wp-whatsapp-chat'); ?></th>
75
  <td>
76
+ <textarea maxlength="500" style="width:100%;height: 100px;padding: 8px;" name="<?php echo esc_attr(QLWAPP_DOMAIN); ?>[button][message]" placeholder="<?php echo esc_html($this->defaults['button']['message']); ?>" ><?php echo esc_html(trim($qlwapp['button']['message'])); ?></textarea>
77
  <p class="description hidden"><?php esc_html_e('Message that will automatically appear in the text field of a chat.', 'wp-whatsapp-chat'); ?></p>
78
  </td>
79
  </tr>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://quadlayers.com/portfolio/wordpress-whatsapp-chat/
4
  Tags: whatsapp, whatsapp button, whatsapp chat, whatsapp support, contact, click to chat, directly message whatsapp, floating whatsapp, whatsapp business, messaging, help desk
5
  Requires at least: 4.6
6
  Tested up to: 5.2.2
7
- Stable tag: 4.4.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
4
  Tags: whatsapp, whatsapp button, whatsapp chat, whatsapp support, contact, click to chat, directly message whatsapp, floating whatsapp, whatsapp business, messaging, help desk
5
  Requires at least: 4.6
6
  Tested up to: 5.2.2
7
+ Stable tag: 4.4.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
template/box.php CHANGED
@@ -12,7 +12,7 @@
12
  <?php endif; ?>
13
  <div class="qlwapp-body">
14
  <?php if (isset($qlwapp['contacts'][0])): ?>
15
- <a class="qlwapp-account" data-action="open" data-phone="<?php echo esc_attr($qlwapp['contacts'][0]['phone']); ?>" data-message="<?php echo esc_html($qlwapp['user']['message']); ?>" href="javascript:void(0);" target="_blank">
16
  <?php if (!empty($qlwapp['contacts'][0]['avatar'])): ?>
17
  <div class="qlwapp-avatar">
18
  <div class="qlwapp-avatar-container">
@@ -34,7 +34,7 @@
34
  <?php endif; ?>
35
  </div>
36
  <?php endif; ?>
37
- <a class="qlwapp-toggle" data-action="<?php echo ($qlwapp['box']['enable'] === 'yes' ? 'box' : 'open'); ?>" data-phone="<?php echo esc_attr($qlwapp['button']['phone']); ?>" data-message="<?php echo esc_html($qlwapp['user']['message']); ?>" href="#" target="_blank">
38
  <?php if ($qlwapp['button']['icon']): ?>
39
  <i class="qlwapp-icon <?php echo esc_attr($qlwapp['button']['icon']); ?>"></i>
40
  <?php endif; ?>
12
  <?php endif; ?>
13
  <div class="qlwapp-body">
14
  <?php if (isset($qlwapp['contacts'][0])): ?>
15
+ <a class="qlwapp-account" data-action="open" data-phone="<?php echo esc_attr($qlwapp['contacts'][0]['phone']); ?>" data-message="<?php echo esc_html($qlwapp['button']['message']); ?>" href="javascript:void(0);" target="_blank">
16
  <?php if (!empty($qlwapp['contacts'][0]['avatar'])): ?>
17
  <div class="qlwapp-avatar">
18
  <div class="qlwapp-avatar-container">
34
  <?php endif; ?>
35
  </div>
36
  <?php endif; ?>
37
+ <a class="qlwapp-toggle" data-action="<?php echo ($qlwapp['box']['enable'] === 'yes' ? 'box' : 'open'); ?>" data-phone="<?php echo esc_attr($qlwapp['button']['phone']); ?>" data-message="<?php echo esc_html($qlwapp['button']['message']); ?>" href="#" target="_blank">
38
  <?php if ($qlwapp['button']['icon']): ?>
39
  <i class="qlwapp-icon <?php echo esc_attr($qlwapp['button']['icon']); ?>"></i>
40
  <?php endif; ?>
wp-whatsapp-chat.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WhatsApp Chat
4
  * Plugin URI: https://quadlayers.com/portfolio/wordpress-whatsapp-chat/
5
  * Description: WhatsApp Chat allows your visitors to contact you or your team through WhatsApp chat with a single click.
6
- * Version: 4.4.5
7
  * Author: QuadLayers
8
  * Author URI: https://quadlayers.com
9
  * License: GPL-2.0+
@@ -18,7 +18,7 @@ if (!defined('QLWAPP_PLUGIN_NAME')) {
18
  define('QLWAPP_PLUGIN_NAME', 'WhatsApp Chat');
19
  }
20
  if (!defined('QLWAPP_PLUGIN_VERSION')) {
21
- define('QLWAPP_PLUGIN_VERSION', '4.4.5');
22
  }
23
  if (!defined('QLWAPP_PLUGIN_FILE')) {
24
  define('QLWAPP_PLUGIN_FILE', __FILE__);
3
  * Plugin Name: WhatsApp Chat
4
  * Plugin URI: https://quadlayers.com/portfolio/wordpress-whatsapp-chat/
5
  * Description: WhatsApp Chat allows your visitors to contact you or your team through WhatsApp chat with a single click.
6
+ * Version: 4.4.6
7
  * Author: QuadLayers
8
  * Author URI: https://quadlayers.com
9
  * License: GPL-2.0+
18
  define('QLWAPP_PLUGIN_NAME', 'WhatsApp Chat');
19
  }
20
  if (!defined('QLWAPP_PLUGIN_VERSION')) {
21
+ define('QLWAPP_PLUGIN_VERSION', '4.4.6');
22
  }
23
  if (!defined('QLWAPP_PLUGIN_FILE')) {
24
  define('QLWAPP_PLUGIN_FILE', __FILE__);