WhatsApp Chat WP - Version 4.7.3

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

Code changes from version 4.7.2 to 4.7.3

assets/backend/js/admin.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('jquery', 'qlwapp-select2', 'wp-color-picker'), 'version' => '1021046b05730b4f9a64430a9d112f36');
1
+ <?php return array('dependencies' => array('jquery', 'qlwapp-select2', 'wp-color-picker'), 'version' => 'b72c3e0d6cbe4fffd9812912e78e34bd');
assets/backend/js/admin.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){!function(){e.exports=this.jQuery}()},function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a);n(2),n(3);!function(e){function t(t){t?e("#submit").attr("disabled",!0):e("#submit").attr("disabled",!1)}t(!0),e("form").change((function(e){t(!1)})),e(".button").click((function(){t(!1)})),e("button").click((function(){t(!1)})),e(".qlwapp-color-field").wpColorPicker({change:function(e,n){t(!1)},clear:function(e,n){t(!1)}}),e(document).on("tinymce_change",(function(e){t(!1)})),e(document).on("qlwapp-enhanced-select",(function(t){e(".qlwapp-select2").filter(":not(.enhanced)").each((function(){e(this).select2({allowClear:!1,theme:"default",minimumResultsForSearch:-1}).addClass("enhanced")})),e(".qlwapp-select2-search").filter(":not(.enhanced)").each((function(){var t=e(this),n=e(this).data("name"),a={allowClear:!0,ajax:{url:ajaxurl,dataType:"json",data:function(e){return{name:n,per_page:10,q:e.term||0,selected:t.select2("val")||0,action:"qlwapp_get_posts",nonce:qlwapp.nonce.qlwapp_get_posts}},processResults:function(t){var n=[];return t&&e.each(t,(function(e,t){n.push({id:e,text:t})})),{results:n}},cache:!0},minimumInputLength:3};e(this).select2(a).addClass("enhanced")}))})).trigger("qlwapp-enhanced-select"),e("select[name=box]").on("change",(function(){e(".nav-tab.qlwapp_box").toggleClass("hidden"),e(".nav-tab.qlwapp_contacts").toggleClass("hidden");var t=e("#qlwapp_button_form"),n=t.find("#qlwapp_button_form_nonce").val();t.trigger("qlwapp.save",["qlwapp_save_button",n])})),e(".qlwapp-color-field").wpColorPicker(),e(document).on("click",".upload_image_button",(function(t){t.preventDefault();var n=wp.media.editor.send.attachment,a=e(this);return wp.media.editor.send.attachment=function(t,r){e(a).parent().prev().attr("src",r.url),e(a).prev().val(r.url).trigger("change"),wp.media.editor.send.attachment=n},wp.media.editor.open(a),!1})),e(document).on("click",".remove_image_button",(function(t){t.preventDefault();var n=e(this).parent().prev().attr("data-src");return e(this).parent().prev().attr("src",n),e(this).prev().prev().val("").trigger("change"),!1})),e(document).on("qlwapp.save","form",(function(n,a,r){var o=e(n.currentTarget),i=o.find(".settings-save-status .spinner"),c=o.find(".settings-save-status .saved");return e.ajax({url:ajaxurl,data:{action:a,nonce:r,form_data:o.serialize()},dataType:"json",type:"POST",beforeSend:function(){t(!0),i.addClass("is-active")},complete:function(){i.removeClass("is-active")},error:function(e){console.log(e)},success:function(e){c.addClass("is-active"),e.success?setTimeout((function(){c.removeClass("is-active")}),2e3):alert(e.data)}}),!1})),e(document).on("submit","#qlwapp_button_form",(function(t){t.preventDefault();var n=e(this),a=n.find("#qlwapp_button_form_nonce").val();n.trigger("qlwapp.save",["qlwapp_save_button",a])})),e(document).on("submit","#qlwapp_box_form",(function(t){t.preventDefault();var n=e(this),a=n.find("#qlwapp_box_form_nonce").val();n.trigger("qlwapp.save",["qlwapp_save_box",a])})),e(document).on("submit","#qlwapp_display_form",(function(t){t.preventDefault();var n=e(this),a=n.find("#qlwapp_display_form_nonce").val();n.trigger("qlwapp.save",["qlwapp_save_display",a])})),e(document).on("submit","#qlwapp_scheme_form",(function(t){t.preventDefault();var n=e(this),a=n.find("#qlwapp_scheme_form_nonce").val();n.trigger("qlwapp.save",["qlwapp_save_scheme",a])}))}(r.a)},function(e,t){!function(){e.exports=this.wp.wpColorPicker}()},function(e,t){!function(){e.exports=this.jQuery.select2}()}]);
1
+ !function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(a,o,function(t){return e[t]}.bind(null,o));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){!function(){e.exports=this.jQuery}()},function(e,t,n){"use strict";n.r(t);var a=n(0),o=n.n(a);n(2),n(3);!function(e){function t(t){t?e("#submit").attr("disabled",!0):e("#submit").attr("disabled",!1)}t(!0),e("form").change((function(e){t(!1)})),e(".button").click((function(){t(!1)})),e("button").click((function(){t(!1)})),e(".qlwapp-color-field").wpColorPicker({change:function(e,n){t(!1)},clear:function(e,n){t(!1)}}),e(document).on("tinymce_change",(function(e){t(!1)})),e(document).on("qlwapp-enhanced-select",(function(t){e(".qlwapp-select2").filter(":not(.enhanced)").each((function(){e(this).select2({allowClear:!1,theme:"default",minimumResultsForSearch:-1}).addClass("enhanced")})),e(".qlwapp-select2-search").filter(":not(.enhanced)").each((function(){var t=e(this),n=e(this).data("name"),a={allowClear:!0,ajax:{url:ajaxurl,dataType:"json",data:function(e){return{name:n,per_page:10,q:e.term||0,selected:t.select2("val")||0,action:"qlwapp_get_posts",nonce:qlwapp.nonce.qlwapp_get_posts}},processResults:function(t){var n=[];return t&&e.each(t,(function(e,t){n.push({id:e,text:t})})),{results:n}},cache:!0},minimumInputLength:3};e(this).select2(a).addClass("enhanced")}))})).trigger("qlwapp-enhanced-select"),e("select[name=box]").on("change",(function(){e(".nav-tab.qlwapp_box").toggleClass("hidden"),e(".nav-tab.qlwapp_contacts").toggleClass("hidden");var t=e("#qlwapp_button_form"),n=t.find("#qlwapp_button_form_nonce").val();t.trigger("qlwapp.save",["qlwapp_save_button",n])})),"no"==e("select[name=auto_open]").val()&&e("input[name=auto_delay_open]").closest("tr").addClass("hidden"),e("select[name=auto_open]").on("change",(function(){e("input[name=auto_delay_open]").closest("tr").toggleClass("hidden")})),e(".qlwapp-color-field").wpColorPicker(),e(document).on("click",".upload_image_button",(function(t){t.preventDefault();var n=wp.media.editor.send.attachment,a=e(this);return wp.media.editor.send.attachment=function(t,o){e(a).parent().prev().attr("src",o.url),e(a).prev().val(o.url).trigger("change"),wp.media.editor.send.attachment=n},wp.media.editor.open(a),!1})),e(document).on("click",".remove_image_button",(function(t){t.preventDefault();var n=e(this).parent().prev().attr("data-src");return e(this).parent().prev().attr("src",n),e(this).prev().prev().val("").trigger("change"),!1})),e(document).on("qlwapp.save","form",(function(n,a,o){var r=e(n.currentTarget),i=r.find(".settings-save-status .spinner"),c=r.find(".settings-save-status .saved");return e.ajax({url:ajaxurl,data:{action:a,nonce:o,form_data:r.serialize()},dataType:"json",type:"POST",beforeSend:function(){t(!0),i.addClass("is-active")},complete:function(){i.removeClass("is-active")},error:function(e){console.log(e)},success:function(e){c.addClass("is-active"),e.success?setTimeout((function(){c.removeClass("is-active")}),2e3):alert(e.data)}}),!1})),e(document).on("submit","#qlwapp_button_form",(function(t){t.preventDefault();var n=e(this),a=n.find("#qlwapp_button_form_nonce").val();n.trigger("qlwapp.save",["qlwapp_save_button",a])})),e(document).on("submit","#qlwapp_box_form",(function(t){t.preventDefault();var n=e(this),a=n.find("#qlwapp_box_form_nonce").val();n.trigger("qlwapp.save",["qlwapp_save_box",a])})),e(document).on("submit","#qlwapp_display_form",(function(t){t.preventDefault();var n=e(this),a=n.find("#qlwapp_display_form_nonce").val();n.trigger("qlwapp.save",["qlwapp_save_display",a])})),e(document).on("submit","#qlwapp_scheme_form",(function(t){t.preventDefault();var n=e(this),a=n.find("#qlwapp_scheme_form_nonce").val();n.trigger("qlwapp.save",["qlwapp_save_scheme",a])}))}(o.a)},function(e,t){!function(){e.exports=this.wp.wpColorPicker}()},function(e,t){!function(){e.exports=this.jQuery.select2}()}]);
assets/frontend/js/frontend.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('jquery'), 'version' => '2baf2d7a5baa432f05a1d211d5c64717');
1
+ <?php return array('dependencies' => array('jquery'), 'version' => 'e2250d904379b5643ff6b5d306acc73c');
assets/frontend/js/frontend.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function n(a){if(e[a])return e[a].exports;var i=e[a]={i:a,l:!1,exports:{}};return t[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(a,i,function(e){return t[e]}.bind(null,i));return a},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n},function(t,e){!function(){t.exports=this.jQuery}()},function(t,e,n){"use strict";n.r(e);var a=n(0),i=n.n(a),o=(n(3),n(1));!function(t,e,n,a){function o(e,n){this.$qlwapp=t(e),this.init(this)}function r(){t("div#qlwapp").qlwapp()}t.fn.simulateClick=function(){return this.each((function(){if("createEvent"in n){var t=this.ownerDocument,e=t.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,t.defaultView,1,0,0,0,0,!1,!1,!1,!1,0,null),this.dispatchEvent(e)}else this.click()}))},o.prototype={timeDateToString:function(t){var e=""+t.getMinutes();return 1===e.length&&(e="0"+e),t.getHours()+":"+e},timeStringToInt:function(t,e){return parseInt(t+e)},init:function(n){var a=this.$qlwapp;a.on("qlwapp.init",(function(t){n.mobiledevice=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)})),a.on("qlwapp.time",(function(e){var a=t(e.target),i=a.data("timefrom")||!1,o=a.data("timeto")||!1,r=a.data("timedays")||!1,p=parseInt(a.data("timezone"))||0;if(!o||!i||i===o)return!0;var l,s,d=new Date,u=-d.getTimezoneOffset()-p,c=new Date((new Date).getTime()+60*p*1e3).getUTCDay().toString(),f=new Date,g=new Date;if(l=n.timeStringToInt(i[0],i[1]),s=n.timeStringToInt(i[3],i[4]),g.setHours(l),g.setMinutes(s+u),l=n.timeStringToInt(o[0],o[1]),s=n.timeStringToInt(o[3],o[4]),f.setHours(l),f.setMinutes(s+u),r.includes(c)?d.getTime()>=g.getTime()&&d.getTime()<=f.getTime()||(a.addClass("qlwapp-readonly"),a.find(".qlwapp-days").hide()):(a.addClass("qlwapp-readonly"),a.find(".qlwapp-time").hide()),!p)return!0;a.find(".from").text(n.timeDateToString(g)),a.find(".to").text(n.timeDateToString(f));var w=r.reduce((function(t,e){return Math.abs(e-c)<Math.abs(t-c)?e:t}));a.find(".day"+w).addClass("qlwapp-available-time")})),a.on("qlwapp.pro",(function(e){a.find(".qlwapp-toggle").trigger("qlwapp.time"),a.find(".qlwapp-account").each((function(e,n){t(n).trigger("qlwapp.time")}))})),a.on("qlwapp.resize",(function(e){t(this).hasClass("qlwapp-show")&&t(this).trigger("qlwapp.toggle")})),a.on("qlwapp.init",(function(t){n.mobiledevice?a.addClass("mobile").removeClass("desktop"):a.addClass("desktop").removeClass("mobile"),a.addClass("qlwapp-js-ready")})),a.on("qlwapp.init",(function(t){a.hasClass("qlwapp-premium")&&a.trigger("qlwapp.pro")})),a.addClass("qlwapp-js-ready").trigger("qlwapp.init"),a.on("qlwapp.height",(function(a){var i=t(a.delegateTarget),o=i.find(".qlwapp-body").find(".qlwapp-carousel"),r=i.find(".qlwapp-header"),p=i.find(".qlwapp-footer"),l=t(e).innerHeight()-r.outerHeight()-p.outerHeight();n.mobiledevice||(l=.7*t(e).innerHeight()-r.outerHeight()-p.outerHeight()),o.css({"max-height":l+"px"})})),a.on("qlwapp.toggle",(function(e){var n=t(e.delegateTarget),a=n.find(".qlwapp-box");n.addClass("qlwapp-transition"),a.removeClass("response texting"),setTimeout((function(){n.toggleClass("qlwapp-show").trigger("qlwapp.height")}),10),setTimeout((function(){n.toggleClass("qlwapp-transition")}),300)})),a.on("click","[data-action=box], [data-action=close]",(function(e){e.preventDefault(),t(e.delegateTarget).trigger("qlwapp.toggle")})),a.on("click","[data-action=open]",(function(e){var a="https://api.whatsapp.com/send";n.mobiledevice||(a="https://web.whatsapp.com/send");var i=t(this),o=i.data("message")||"",r=i.data("phone")||"";t(this).attr("href",a+"?phone="+r+"&text="+o)})),a.on("click","[data-action=previous]",(function(e){e.preventDefault();var n=t(e.delegateTarget).find(".qlwapp-box");n.addClass("closing"),setTimeout((function(){n.removeClass("response").removeClass("closing"),n.removeClass("texting")}),300)})),a.on("click","[data-action=chat]",(function(e){e.preventDefault();var n=t(this),a=t(e.delegateTarget),i=a.find(".qlwapp-box"),o=n.find(".qlwapp-avatar img").attr("src"),r=n.find(".qlwapp-name").text(),p=n.find(".qlwapp-label").text(),l=n.find(".qlwapp-time").text(),s=n.data("message"),d=n.data("phone");i.addClass("response").addClass("opening"),a.trigger("qlwapp.height"),setTimeout((function(){i.removeClass("opening")}),300);var u=i.find(".qlwapp-reply"),c=i.find(".qlwapp-header"),f=c.find(".qlwapp-avatar img"),g=c.find(".qlwapp-number"),w=c.find(".qlwapp-name"),m=c.find(".qlwapp-label"),h=i.find(".qlwapp-message"),q=l?l+" - "+p:p;u.data("phone",d),f.attr("src",o),f.attr("alt",r),g.html(d),w.html(r),m.html(q),h.html(s)})),a.on("click","textarea",(function(t){a.off("qlwapp.resize")})),a.on("keypress","textarea",(function(t){13==t.keyCode&&setTimeout((function(){a.find(".qlwapp-reply").simulateClick("click")}),100)})),a.on("keyup","[data-action=response]",(function(e){e.preventDefault();var n=t(this).find("textarea"),a=t(this).find("pre"),i=t(this).find(".qlwapp-reply"),o=t(e.delegateTarget).find(".qlwapp-box"),r=o.find(".qlwapp-buttons");a.html(n.val()),setTimeout((function(){o.addClass("texting").css({"padding-bottom":a.outerHeight()}),r.addClass("active");var t=n.val();i.data("message",t),""==t&&(o.removeClass("texting"),r.removeClass("active"))}),300)}))}},t.fn.qlwapp=function(e){var n,a=arguments;return void 0===e||"object"===i()(e)?this.each((function(){t.data(this,"plugin_qlwapp")||t.data(this,"plugin_qlwapp",new o(this,e))})):"string"==typeof e&&"_"!==e[0]&&"init"!==e?(this.each((function(){var i=t.data(this,"plugin_qlwapp");i instanceof o&&"function"==typeof i[e]&&(n=i[e].apply(i,Array.prototype.slice.call(a,1))),"destroy"===e&&t.data(this,"plugin_qlwapp",null)})),void 0!==n?n:this):void 0},r(),t(e).on("load",(function(){r()})),t(e).on("click",(function(e){t(e.target).closest("#qlwapp.qlwapp-show").length||t("div#qlwapp.qlwapp-show").trigger("qlwapp.toggle")})),t(e).on("resize",(function(e){t("div#qlwapp").trigger("qlwapp.resize"),t("div#qlwapp").trigger("qlwapp.init")}))}(n.n(o).a,window,document)},function(t,e){}]);
1
+ !function(t){var e={};function a(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,a),i.l=!0,i.exports}a.m=t,a.c=e,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)a.d(n,i,function(e){return t[e]}.bind(null,i));return n},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=2)}([function(t,e){function a(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=a=function(t){return typeof t}:t.exports=a=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(e)}t.exports=a},function(t,e){!function(){t.exports=this.jQuery}()},function(t,e,a){"use strict";a.r(e);var n=a(0),i=a.n(n),o=(a(3),a(1));!function(t,e,a,n){function o(e,a){this.$qlwapp=t(e),this.init(this)}function p(){t("div#qlwapp").qlwapp()}t.fn.simulateClick=function(){return this.each((function(){if("createEvent"in a){var t=this.ownerDocument,e=t.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,t.defaultView,1,0,0,0,0,!1,!1,!1,!1,0,null),this.dispatchEvent(e)}else this.click()}))},o.prototype={timeDateToString:function(t){var e=""+t.getMinutes();return 1===e.length&&(e="0"+e),t.getHours()+":"+e},timeStringToInt:function(t,e){return parseInt(t+e)},init:function(a){var n=this.$qlwapp;if(n.on("qlwapp.init",(function(t){a.mobiledevice=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)})),n.on("qlwapp.time",(function(e){var n=t(e.target),i=n.data("timefrom")||!1,o=n.data("timeto")||!1,p=n.data("timedays")||!1,r=parseInt(n.data("timezone"))||0;if(!o||!i||i===o)return!0;var l,s,d=new Date,u=-d.getTimezoneOffset()-r,c=new Date((new Date).getTime()+60*r*1e3).getUTCDay().toString(),f=new Date,g=new Date;if(l=a.timeStringToInt(i[0],i[1]),s=a.timeStringToInt(i[3],i[4]),g.setHours(l),g.setMinutes(s+u),l=a.timeStringToInt(o[0],o[1]),s=a.timeStringToInt(o[3],o[4]),f.setHours(l),f.setMinutes(s+u),p.includes(c)?d.getTime()>=g.getTime()&&d.getTime()<=f.getTime()||(n.addClass("qlwapp-readonly"),n.find(".qlwapp-days").hide()):(n.addClass("qlwapp-readonly"),n.find(".qlwapp-time").hide()),!r)return!0;n.find(".from").text(a.timeDateToString(g)),n.find(".to").text(a.timeDateToString(f));var w=p.reduce((function(t,e){return Math.abs(e-c)<Math.abs(t-c)?e:t}));n.find(".day"+w).addClass("qlwapp-available-time")})),n.on("qlwapp.pro",(function(e){n.find(".qlwapp-toggle").trigger("qlwapp.time"),n.find(".qlwapp-account").each((function(e,a){t(a).trigger("qlwapp.time")}))})),n.on("qlwapp.resize",(function(e){t(this).hasClass("qlwapp-show")&&t(this).trigger("qlwapp.toggle")})),n.on("qlwapp.init",(function(t){a.mobiledevice?n.addClass("mobile").removeClass("desktop"):n.addClass("desktop").removeClass("mobile"),n.addClass("qlwapp-js-ready")})),n.on("qlwapp.init",(function(t){n.hasClass("qlwapp-premium")&&n.trigger("qlwapp.pro")})),n.addClass("qlwapp-js-ready").trigger("qlwapp.init"),n.on("qlwapp.height",(function(n){var i=t(n.delegateTarget),o=i.find(".qlwapp-body").find(".qlwapp-carousel"),p=i.find(".qlwapp-header"),r=i.find(".qlwapp-footer"),l=t(e).innerHeight()-p.outerHeight()-r.outerHeight();a.mobiledevice||(l=.7*t(e).innerHeight()-p.outerHeight()-r.outerHeight()),o.css({"max-height":l+"px"})})),n.on("qlwapp.toggle",(function(e){var a=t(e.delegateTarget),n=a.find(".qlwapp-box");a.addClass("qlwapp-transition"),n.removeClass("response texting"),setTimeout((function(){a.toggleClass("qlwapp-show").trigger("qlwapp.height")}),10),setTimeout((function(){a.toggleClass("qlwapp-transition")}),300)})),n.on("click","[data-action=box], [data-action=close]",(function(e){e.preventDefault(),t(e.delegateTarget).trigger("qlwapp.toggle")})),n.on("click","[data-action=open]",(function(e){var n="https://api.whatsapp.com/send";a.mobiledevice||(n="https://web.whatsapp.com/send");var i=t(this),o=i.data("message")||"",p=i.data("phone")||"";t(this).attr("href",n+"?phone="+p+"&text="+o)})),n.on("click","[data-action=previous]",(function(e){e.preventDefault();var a=t(e.delegateTarget).find(".qlwapp-box");a.addClass("closing"),setTimeout((function(){a.removeClass("response").removeClass("closing"),a.removeClass("texting")}),300)})),n.on("click","[data-action=chat]",(function(e){e.preventDefault();var a=t(this),n=t(e.delegateTarget),i=n.find(".qlwapp-box"),o=a.find(".qlwapp-avatar img").attr("src"),p=a.find(".qlwapp-name").text(),r=a.find(".qlwapp-label").text(),l=a.find(".qlwapp-time").text(),s=a.data("message"),d=a.data("phone");i.addClass("response").addClass("opening"),n.trigger("qlwapp.height"),setTimeout((function(){i.removeClass("opening")}),300);var u=i.find(".qlwapp-reply"),c=i.find(".qlwapp-header"),f=c.find(".qlwapp-avatar img"),g=c.find(".qlwapp-number"),w=c.find(".qlwapp-name"),m=c.find(".qlwapp-label"),h=i.find(".qlwapp-message"),q=l?l+" - "+r:r;u.data("phone",d),f.attr("src",o),f.attr("alt",p),g.html(d),w.html(p),m.html(q),h.html(s)})),n.on("click","textarea",(function(t){n.off("qlwapp.resize")})),n.on("keypress","textarea",(function(t){13==t.keyCode&&setTimeout((function(){n.find(".qlwapp-reply").simulateClick("click")}),100)})),n.on("keyup","[data-action=response]",(function(e){e.preventDefault();var a=t(this).find("textarea"),n=t(this).find("pre"),i=t(this).find(".qlwapp-reply"),o=t(e.delegateTarget).find(".qlwapp-box"),p=o.find(".qlwapp-buttons");n.html(a.val()),setTimeout((function(){o.addClass("texting").css({"padding-bottom":n.outerHeight()}),p.addClass("active");var t=a.val();i.data("message",t),""==t&&(o.removeClass("texting"),p.removeClass("active"))}),300)})),n.hasClass("auto-load")&&t.cookie&&!t.cookie("qlwapp-auto-load")){var i=n.data("autoloadelay");setTimeout((function(){n.trigger("qlwapp.toggle")}),i),t.cookie("qlwapp-auto-load","auto open cookie",{expires:1})}}},t.fn.qlwapp=function(e){var a,n=arguments;return void 0===e||"object"===i()(e)?this.each((function(){t.data(this,"plugin_qlwapp")||t.data(this,"plugin_qlwapp",new o(this,e))})):"string"==typeof e&&"_"!==e[0]&&"init"!==e?(this.each((function(){var i=t.data(this,"plugin_qlwapp");i instanceof o&&"function"==typeof i[e]&&(a=i[e].apply(i,Array.prototype.slice.call(n,1))),"destroy"===e&&t.data(this,"plugin_qlwapp",null)})),void 0!==a?a:this):void 0},p(),t(e).on("load",(function(){p()})),t(e).on("click",(function(e){t(e.target).closest("#qlwapp.qlwapp-show").length||t("div#qlwapp.qlwapp-show").trigger("qlwapp.toggle")})),t(e).on("resize",(function(e){t("div#qlwapp").trigger("qlwapp.resize"),t("div#qlwapp").trigger("qlwapp.init")}))}(a.n(o).a,window,document)},function(t,e){}]);
changelog.txt CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  = 4.7.2 =
2
  * Fix. premium compatibility
3
 
1
+ = 4.7.3 =
2
+ * Fix. premium compatibility
3
+
4
  = 4.7.2 =
5
  * Fix. premium compatibility
6
 
includes/frontend.php CHANGED
@@ -10,6 +10,7 @@ if (!class_exists('QLWAPP_Frontend')) {
10
 
11
  $frontend = include_once(QLWAPP_PLUGIN_DIR . 'assets/frontend/js/frontend.asset.php');
12
 
 
13
  wp_enqueue_style(QLWAPP_DOMAIN, plugins_url('/assets/frontend/css/frontend.css', QLWAPP_PLUGIN_FILE), null, QLWAPP_PLUGIN_VERSION, 'all');
14
  wp_enqueue_script(QLWAPP_DOMAIN, plugins_url('/assets/frontend/js/frontend.js', QLWAPP_PLUGIN_FILE), $frontend['dependencies'], $frontend['version'], true);
15
 
10
 
11
  $frontend = include_once(QLWAPP_PLUGIN_DIR . 'assets/frontend/js/frontend.asset.php');
12
 
13
+
14
  wp_enqueue_style(QLWAPP_DOMAIN, plugins_url('/assets/frontend/css/frontend.css', QLWAPP_PLUGIN_FILE), null, QLWAPP_PLUGIN_VERSION, 'all');
15
  wp_enqueue_script(QLWAPP_DOMAIN, plugins_url('/assets/frontend/js/frontend.js', QLWAPP_PLUGIN_FILE), $frontend['dependencies'], $frontend['version'], true);
16
 
includes/models/Box.php CHANGED
@@ -8,7 +8,9 @@ class QLWAPP_Box extends QLWAPP_Model {
8
 
9
  function get_args() {
10
  $args = array(
11
- 'enable' => 'no',
 
 
12
  'header' => '<h3>Hello!</h3><p>Click one of our representatives below to chat on WhatsApp or send us an email to <a href="mailto:' . get_bloginfo('admin_email') . '">' . get_bloginfo('admin_email') . '</a></p>',
13
  'footer' => '<p>Powered by <a target="_blank" href="' . QLWAPP_PURCHASE_URL . '">WhatsApp Chat</a>',
14
  'response' => esc_html__('Write a response', 'wp-whatsapp-chat')
@@ -21,6 +23,12 @@ class QLWAPP_Box extends QLWAPP_Model {
21
 
22
  if (isset($settings['header'])) {
23
  $settings['header'] = wp_kses_post($settings['header']);
 
 
 
 
 
 
24
  }
25
  if (isset($settings['footer'])) {
26
  $settings['footer'] = wp_kses_post($settings['footer']);
8
 
9
  function get_args() {
10
  $args = array(
11
+ 'enable' => 'yes',
12
+ 'auto_open' => 'no',
13
+ 'auto_delay_open' => 1000,
14
  'header' => '<h3>Hello!</h3><p>Click one of our representatives below to chat on WhatsApp or send us an email to <a href="mailto:' . get_bloginfo('admin_email') . '">' . get_bloginfo('admin_email') . '</a></p>',
15
  'footer' => '<p>Powered by <a target="_blank" href="' . QLWAPP_PURCHASE_URL . '">WhatsApp Chat</a>',
16
  'response' => esc_html__('Write a response', 'wp-whatsapp-chat')
23
 
24
  if (isset($settings['header'])) {
25
  $settings['header'] = wp_kses_post($settings['header']);
26
+ }
27
+ if (isset($settings['auto_open'])) {
28
+ $settings['auto_open'] = wp_kses_post($settings['auto_open']);
29
+ }
30
+ if (isset($settings['auto_delay_open'])) {
31
+ $settings['auto_delay_open'] = wp_kses_post($settings['auto_delay_open']);
32
  }
33
  if (isset($settings['footer'])) {
34
  $settings['footer'] = wp_kses_post($settings['footer']);
includes/models/Contact.php CHANGED
@@ -18,6 +18,7 @@ class QLWAPP_Contact extends QLWAPP_Model {
18
  // Defaults
19
  // -----------------------------------------------------------------
20
  'chat' => true,
 
21
  'avatar' => 'https://www.gravatar.com/avatar/00000000000000000000000000000000',
22
  'phone' => '542215677768',
23
  'firstname' => 'John',
@@ -92,6 +93,7 @@ class QLWAPP_Contact extends QLWAPP_Model {
92
  if (count($settings['contacts'])) {
93
  foreach ($settings['contacts'] as $id => $c) {
94
  $settings['contacts'][$id]['id'] = $id;
 
95
  $settings['contacts'][$id]['chat'] = (bool) $settings['contacts'][$id]['chat'];
96
  $settings['contacts'][$id]['avatar'] = sanitize_text_field($settings['contacts'][$id]['avatar']);
97
  $settings['contacts'][$id]['phone'] = sanitize_text_field($settings['contacts'][$id]['phone']);
18
  // Defaults
19
  // -----------------------------------------------------------------
20
  'chat' => true,
21
+ 'auto_open' => false,
22
  'avatar' => 'https://www.gravatar.com/avatar/00000000000000000000000000000000',
23
  'phone' => '542215677768',
24
  'firstname' => 'John',
93
  if (count($settings['contacts'])) {
94
  foreach ($settings['contacts'] as $id => $c) {
95
  $settings['contacts'][$id]['id'] = $id;
96
+ $settings['contacts'][$id]['auto_open'] = $settings['contacts'][$id]['auto_open'];
97
  $settings['contacts'][$id]['chat'] = (bool) $settings['contacts'][$id]['chat'];
98
  $settings['contacts'][$id]['avatar'] = sanitize_text_field($settings['contacts'][$id]['avatar']);
99
  $settings['contacts'][$id]['phone'] = sanitize_text_field($settings['contacts'][$id]['phone']);
includes/models/Suggestions.php CHANGED
@@ -1,19 +1,23 @@
1
  <?php
2
 
3
- require_once( ABSPATH . 'wp-admin/includes/class-wp-plugin-install-list-table.php' );
4
 
5
- class QLWAPP_Suggestions_List_Table extends WP_Plugin_Install_List_Table {
 
6
 
7
  public $promote = array(
8
- 'wp-tiktok-feed',
9
- 'insta-gallery',
10
- 'wp-menu-icons',
11
- 'quadmenu',
12
- 'woocommerce-checkout-manager',
13
- 'woocommerce-direct-checkout',
 
 
14
  );
15
 
16
- private function remove_plugins($plugins) {
 
17
 
18
  $promote = array();
19
 
@@ -28,7 +32,8 @@ class QLWAPP_Suggestions_List_Table extends WP_Plugin_Install_List_Table {
28
  return $promote;
29
  }
30
 
31
- public function self_admin_url($url, $path) {
 
32
 
33
  if (strpos($url, 'tab=plugin-information') !== false) {
34
  $url = network_admin_url($path);
@@ -37,7 +42,8 @@ class QLWAPP_Suggestions_List_Table extends WP_Plugin_Install_List_Table {
37
  return $url;
38
  }
39
 
40
- public function network_admin_url($url, $path) {
 
41
 
42
  if (strpos($url, 'plugins.php') !== false) {
43
  $url = self_admin_url($path);
@@ -46,25 +52,28 @@ class QLWAPP_Suggestions_List_Table extends WP_Plugin_Install_List_Table {
46
  return $url;
47
  }
48
 
49
- public function display_rows() {
 
50
  add_filter('self_admin_url', array($this, 'self_admin_url'), 10, 2);
51
  add_filter('network_admin_url', array($this, 'network_admin_url'), 10, 2);
52
  parent::display_rows();
53
  }
54
 
55
- public function is_connected() {
 
56
 
57
  global $wp_version;
58
 
59
  $http_args = array(
60
- 'timeout' => 15,
61
- 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url('/'),
62
  );
63
 
64
  return is_wp_error(wp_remote_get('http://api.wordpress.org/plugins/info/1.2/', $http_args));
65
  }
66
 
67
- public function get_plugins() {
 
68
 
69
  $tk = QLWAPP_PREFIX . '_suggestions_plugins';
70
 
@@ -73,9 +82,9 @@ class QLWAPP_Suggestions_List_Table extends WP_Plugin_Install_List_Table {
73
  if ($plugins === false) {
74
 
75
  $args = array(
76
- 'per_page' => 36,
77
- 'author' => 'quadlayers',
78
- 'locale' => get_user_locale(),
79
  );
80
 
81
  $api = plugins_api('query_plugins', $args);
@@ -91,9 +100,10 @@ class QLWAPP_Suggestions_List_Table extends WP_Plugin_Install_List_Table {
91
  return $plugins;
92
  }
93
 
94
- public function prepare_items() {
 
95
 
96
- include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
97
 
98
  global $tabs, $tab;
99
 
@@ -124,11 +134,10 @@ class QLWAPP_Suggestions_List_Table extends WP_Plugin_Install_List_Table {
124
  $nonmenu_tabs = apply_filters('install_plugins_nonmenu_tabs', $nonmenu_tabs);
125
 
126
  // If a non-valid menu tab has been selected, And it's not a non-menu action.
127
- if (empty($tab) || (!isset($tabs[$tab]) && !in_array($tab, (array) $nonmenu_tabs) )) {
128
  $tab = key($tabs);
129
  }
130
 
131
  $this->items = $this->get_plugins();
132
  }
133
-
134
  }
1
  <?php
2
 
3
+ require_once(ABSPATH . 'wp-admin/includes/class-wp-plugin-install-list-table.php');
4
 
5
+ class QLWAPP_Suggestions_List_Table extends WP_Plugin_Install_List_Table
6
+ {
7
 
8
  public $promote = array(
9
+ 'wp-tiktok-feed',
10
+ 'insta-gallery',
11
+ 'wp-menu-icons',
12
+ 'quadmenu',
13
+ 'woocommerce-checkout-manager',
14
+ 'woocommerce-direct-checkout',
15
+ 'perfect-woocommerce-brands',
16
+ 'autocomplete-woocommerce-orders',
17
  );
18
 
19
+ private function remove_plugins($plugins)
20
+ {
21
 
22
  $promote = array();
23
 
32
  return $promote;
33
  }
34
 
35
+ public function self_admin_url($url, $path)
36
+ {
37
 
38
  if (strpos($url, 'tab=plugin-information') !== false) {
39
  $url = network_admin_url($path);
42
  return $url;
43
  }
44
 
45
+ public function network_admin_url($url, $path)
46
+ {
47
 
48
  if (strpos($url, 'plugins.php') !== false) {
49
  $url = self_admin_url($path);
52
  return $url;
53
  }
54
 
55
+ public function display_rows()
56
+ {
57
  add_filter('self_admin_url', array($this, 'self_admin_url'), 10, 2);
58
  add_filter('network_admin_url', array($this, 'network_admin_url'), 10, 2);
59
  parent::display_rows();
60
  }
61
 
62
+ public function is_connected()
63
+ {
64
 
65
  global $wp_version;
66
 
67
  $http_args = array(
68
+ 'timeout' => 15,
69
+ 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url('/'),
70
  );
71
 
72
  return is_wp_error(wp_remote_get('http://api.wordpress.org/plugins/info/1.2/', $http_args));
73
  }
74
 
75
+ public function get_plugins()
76
+ {
77
 
78
  $tk = QLWAPP_PREFIX . '_suggestions_plugins';
79
 
82
  if ($plugins === false) {
83
 
84
  $args = array(
85
+ 'per_page' => 36,
86
+ 'author' => 'quadlayers',
87
+ 'locale' => get_user_locale(),
88
  );
89
 
90
  $api = plugins_api('query_plugins', $args);
100
  return $plugins;
101
  }
102
 
103
+ public function prepare_items()
104
+ {
105
 
106
+ include_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
107
 
108
  global $tabs, $tab;
109
 
134
  $nonmenu_tabs = apply_filters('install_plugins_nonmenu_tabs', $nonmenu_tabs);
135
 
136
  // If a non-valid menu tab has been selected, And it's not a non-menu action.
137
+ if (empty($tab) || (!isset($tabs[$tab]) && !in_array($tab, (array) $nonmenu_tabs))) {
138
  $tab = key($tabs);
139
  }
140
 
141
  $this->items = $this->get_plugins();
142
  }
 
143
  }
includes/view/backend/pages/box.php CHANGED
@@ -2,6 +2,22 @@
2
  <form id="qlwapp_box_form" method="post" action="options.php">
3
  <table class="form-table">
4
  <tbody>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  <tr>
6
  <th scope="row"><?php esc_html_e('Header', 'wp-whatsapp-chat'); ?></th>
7
  <td>
@@ -10,25 +26,26 @@
10
  </tr>
11
  <tr>
12
  <th scope="row"><?php esc_html_e('Footer', 'wp-whatsapp-chat'); ?></th>
13
- <td>
14
- <?php //wp_editor($box['footer'], 'qlwapp_box_footer', array('editor_height' => 50, 'textarea_name' => 'footer')); ?>
 
15
  <?php wp_editor($box['footer'], 'qlwapp_box_footer', array('editor_height' => 50, 'textarea_name' => 'footer', 'tinymce' => array('init_instance_callback' => 'function(editor) { editor.on("change", function(){jQuery(document).trigger("tinymce_change");}); }'))); ?>
16
  </td>
17
  </tr>
18
  <tr>
19
  <th scope="row"><?php esc_html_e('Response', 'wp-whatsapp-chat'); ?></th>
20
- <td>
21
- <input type="text" name="response" placeholder="<?php echo esc_html($box['response']); ?>" value="<?php echo esc_attr($box['response']); ?>" class="qlwapp-input"/>
22
- <p class="description hidden"><?php esc_html_e('Write a response text.', 'wp-whatsapp-chat'); ?></p>
23
- </td>
24
  </tr>
25
 
26
  </tbody>
27
  </table>
28
- <?php wp_nonce_field('qlwapp_save_box', 'qlwapp_box_form_nonce'); ?>
29
  <p class="submit">
30
  <?php submit_button(esc_html__('Save', 'wp-whatsapp-chat'), 'primary', 'submit', false); ?>
31
- <span class="settings-save-status">
32
  <span class="saved"><?php esc_html_e('Saved successfully!'); ?></span>
33
  <span class="spinner" style="float: none"></span>
34
  </span>
2
  <form id="qlwapp_box_form" method="post" action="options.php">
3
  <table class="form-table">
4
  <tbody>
5
+ <tr>
6
+ <th scope="row"><?php esc_html_e('Auto open', 'wp-whatsapp-chat'); ?></th>
7
+ <td>
8
+ <select name="auto_open" class="qlwapp-select2">
9
+ <option value="yes" <?php selected($box['auto_open'], 'yes'); ?>><?php esc_html_e('Enable auto open', 'wp-whatsapp-chat'); ?></option>
10
+ <option value="no" <?php selected($box['auto_open'], 'no'); ?>><?php esc_html_e('Disable auto open', 'wp-whatsapp-chat'); ?></option>
11
+ </select>
12
+ </td>
13
+ </tr>
14
+ <tr>
15
+ <th scope="row"><?php esc_html_e('Delay', 'wp-whatsapp-chat'); ?></th>
16
+ <td>
17
+ <input type="number" step="100" name="auto_delay_open" placeholder="<?php echo esc_html($box['auto_delay_open']); ?>" value="<?php echo esc_attr( $box['auto_delay_open']) ;?>" />
18
+ <p class="description"><?php esc_html_e('In miliseconds', 'wp-whatsapp-chat'); ?></p>
19
+ </td>
20
+ </tr>
21
  <tr>
22
  <th scope="row"><?php esc_html_e('Header', 'wp-whatsapp-chat'); ?></th>
23
  <td>
26
  </tr>
27
  <tr>
28
  <th scope="row"><?php esc_html_e('Footer', 'wp-whatsapp-chat'); ?></th>
29
+ <td>
30
+ <?php //wp_editor($box['footer'], 'qlwapp_box_footer', array('editor_height' => 50, 'textarea_name' => 'footer'));
31
+ ?>
32
  <?php wp_editor($box['footer'], 'qlwapp_box_footer', array('editor_height' => 50, 'textarea_name' => 'footer', 'tinymce' => array('init_instance_callback' => 'function(editor) { editor.on("change", function(){jQuery(document).trigger("tinymce_change");}); }'))); ?>
33
  </td>
34
  </tr>
35
  <tr>
36
  <th scope="row"><?php esc_html_e('Response', 'wp-whatsapp-chat'); ?></th>
37
+ <td>
38
+ <input type="text" name="response" placeholder="<?php echo esc_html($box['response']); ?>" value="<?php echo esc_attr($box['response']); ?>" class="qlwapp-input" />
39
+ <p class="description hidden"><?php esc_html_e('Write a response text.', 'wp-whatsapp-chat'); ?></p>
40
+ </td>
41
  </tr>
42
 
43
  </tbody>
44
  </table>
45
+ <?php wp_nonce_field('qlwapp_save_box', 'qlwapp_box_form_nonce'); ?>
46
  <p class="submit">
47
  <?php submit_button(esc_html__('Save', 'wp-whatsapp-chat'), 'primary', 'submit', false); ?>
48
+ <span class="settings-save-status">
49
  <span class="saved"><?php esc_html_e('Saved successfully!'); ?></span>
50
  <span class="spinner" style="float: none"></span>
51
  </span>
includes/view/backend/pages/modals/contact/panel-contact.php CHANGED
@@ -59,17 +59,19 @@
59
  </select>
60
  </p>
61
  </div>
62
- <p class="form-field">
63
- <label><?php esc_html_e('Available days', 'wp-whatsapp-chat'); ?></label>
64
- <select name="timedays[]" id="" multiple>
65
- <option value="0" <# if( data.timedays.includes('0')== true ) { #> selected="selected"<# } #>><?php esc_html_e('Sunday', 'wp-whatsapp-chat'); ?></option>
66
- <option value="1" <# if( data.timedays.includes('1')== true ) { #> selected="selected"<# } #>><?php esc_html_e('Monday', 'wp-whatsapp-chat'); ?></option>
67
- <option value="2" <# if( data.timedays.includes('2')== true ) { #> selected="selected"<# } #>><?php esc_html_e('Tuesday', 'wp-whatsapp-chat'); ?></option>
68
- <option value="3" <# if( data.timedays.includes('3')== true ) { #> selected="selected"<# } #>><?php esc_html_e('Wednesday', 'wp-whatsapp-chat'); ?></option>
69
- <option value="4" <# if( data.timedays.includes('4')== true ) { #> selected="selected"<# } #>><?php esc_html_e('Thursday', 'wp-whatsapp-chat'); ?></option>
70
- <option value="5" <# if( data.timedays.includes('5')== true ) { #> selected="selected"<# } #>><?php esc_html_e('Friday', 'wp-whatsapp-chat'); ?></option>
71
- <option value="6" <# if( data.timedays.includes('6')== true ) { #> selected="selected"<# } #>><?php esc_html_e('Saturday', 'wp-whatsapp-chat'); ?></option>
72
- </select>
73
- </p>
 
 
74
  <div id="subpanel-contact-chat"></div>
75
  </div>
59
  </select>
60
  </p>
61
  </div>
62
+ <div class="options_group">
63
+ <p class="form-field">
64
+ <label><?php esc_html_e('Available days', 'wp-whatsapp-chat'); ?></label>
65
+ <select name="timedays[]" id="" multiple>
66
+ <option value="0" <# if( data.timedays.includes('0')==true ) { #> selected="selected"<# } #>><?php esc_html_e('Sunday', 'wp-whatsapp-chat'); ?></option>
67
+ <option value="1" <# if( data.timedays.includes('1')==true ) { #> selected="selected"<# } #>><?php esc_html_e('Monday', 'wp-whatsapp-chat'); ?></option>
68
+ <option value="2" <# if( data.timedays.includes('2')==true ) { #> selected="selected"<# } #>><?php esc_html_e('Tuesday', 'wp-whatsapp-chat'); ?></option>
69
+ <option value="3" <# if( data.timedays.includes('3')==true ) { #> selected="selected"<# } #>><?php esc_html_e('Wednesday', 'wp-whatsapp-chat'); ?></option>
70
+ <option value="4" <# if( data.timedays.includes('4')==true ) { #> selected="selected"<# } #>><?php esc_html_e('Thursday', 'wp-whatsapp-chat'); ?></option>
71
+ <option value="5" <# if( data.timedays.includes('5')==true ) { #> selected="selected"<# } #>><?php esc_html_e('Friday', 'wp-whatsapp-chat'); ?></option>
72
+ <option value="6" <# if( data.timedays.includes('6')==true ) { #> selected="selected"<# } #>><?php esc_html_e('Saturday', 'wp-whatsapp-chat'); ?></option>
73
+ </select>
74
+ </p>
75
+ </div>
76
  <div id="subpanel-contact-chat"></div>
77
  </div>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://quadlayers.com/portfolio/whatsapp-chat/
4
  Tags: whatsapp, whatsapp chat, whatsapp business, whatsapp support, click to chat, whatsapp group, directly message whatsapp, floating whatsapp, whatsapp message, help desk
5
  Requires at least: 3.0
6
  Tested up to: 5.5.0
7
- Stable tag: 4.7.2
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
4
  Tags: whatsapp, whatsapp chat, whatsapp business, whatsapp support, click to chat, whatsapp group, directly message whatsapp, floating whatsapp, whatsapp message, help desk
5
  Requires at least: 3.0
6
  Tested up to: 5.5.0
7
+ Stable tag: 4.7.3
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
wp-whatsapp-chat.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: WP Social Chat
5
  * Description: Social Chat allows your visitors to contact you or your team through WhatsApp chat with a single click.
6
  * Plugin URI: https://quadlayers.com/portfolio/whatsapp-chat/
7
- * Version: 4.7.2
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
@@ -17,7 +17,7 @@ if (!defined('ABSPATH')) {
17
  }
18
 
19
  define('QLWAPP_PLUGIN_NAME', 'WP Social Chat');
20
- define('QLWAPP_PLUGIN_VERSION', '4.7.2');
21
  define('QLWAPP_PLUGIN_FILE', __FILE__);
22
  define('QLWAPP_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR);
23
  define('QLWAPP_PREFIX', 'qlwapp');
4
  * Plugin Name: WP Social Chat
5
  * Description: Social Chat allows your visitors to contact you or your team through WhatsApp chat with a single click.
6
  * Plugin URI: https://quadlayers.com/portfolio/whatsapp-chat/
7
+ * Version: 4.7.3
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
17
  }
18
 
19
  define('QLWAPP_PLUGIN_NAME', 'WP Social Chat');
20
+ define('QLWAPP_PLUGIN_VERSION', '4.7.3');
21
  define('QLWAPP_PLUGIN_FILE', __FILE__);
22
  define('QLWAPP_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR);
23
  define('QLWAPP_PREFIX', 'qlwapp');