WhatsApp Chat WP - Version 4.5.2

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

Code changes from version 4.5.1 to 4.5.2

assets/js/qlwapp-admin.js CHANGED
@@ -4,9 +4,9 @@
4
  // ---------------------------------------------------------------------------
5
  function disabled(value) {
6
  if (value) {
7
- $('input[type=submit]').attr('disabled', true);
8
  } else {
9
- $('input[type=submit]').attr('disabled', false);
10
  }
11
  }
12
 
4
  // ---------------------------------------------------------------------------
5
  function disabled(value) {
6
  if (value) {
7
+ $('#submit').attr('disabled', true);
8
  } else {
9
+ $('#submit').attr('disabled', false);
10
  }
11
  }
12
 
assets/js/qlwapp-admin.min.js CHANGED
@@ -1 +1,2 @@
1
- (function(b){function a(c){if(c){b("input[type=submit]").attr("disabled",true)}else{b("input[type=submit]").attr("disabled",false)}}a(true);b("form").change(function(c){a(false)});b(".button").click(function(){a(false)});b("button").click(function(){a(false)});b(".qlwapp-color-field").wpColorPicker({change:function(c,d){a(false)},});b(document).on("tinymce_change",function(c){a(false)});b(".qlwapp-select2").select2({allowClear:false,theme:"default",minimumResultsForSearch:-1});b(".qlwapp-select2-ajax").each(function(){var d=b(this),c=b(this).data("name");d.select2({allowClear:true,ajax:{url:ajaxurl,dataType:"json",data:function(e){return{name:c,per_page:10,q:e.term||0,selected:d.select2("val")||0,action:"qlwapp_get_posts",nonce:qlwapp.nonce.qlwapp_get_posts}},processResults:function(e){var f=[];if(e){b.each(e,function(g,h){f.push({id:h[0],text:h[1]})})}return{results:f}},cache:true},minimumInputLength:3})});b(".qlwapp-color-field").wpColorPicker();b(document).on("click",".upload_image_button",function(f){f.preventDefault();var c=wp.media.editor.send.attachment,d=b(this);wp.media.editor.send.attachment=function(e,g){b(d).parent().prev().attr("src",g.url);b(d).prev().val(g.url).trigger("change");wp.media.editor.send.attachment=c};wp.media.editor.open(d);return false});b(document).on("click",".remove_image_button",function(c){c.preventDefault();var d=b(this).parent().prev().attr("data-src");b(this).parent().prev().attr("src",d);b(this).prev().prev().val("").trigger("change");return false});b(document).on("qlwapp.save","form",function(i,h,f){var c=b(i.currentTarget),g=c.find(".settings-save-status .spinner"),d=c.find(".settings-save-status .saved");b.ajax({url:ajaxurl,data:{action:h,nonce:f,form_data:c.serialize()},dataType:"json",type:"POST",beforeSend:function(){a(true);g.addClass("is-active")},complete:function(){g.removeClass("is-active")},error:function(e){console.log(e)},success:function(e){d.addClass("is-active");if(e.success){setTimeout(function(){d.removeClass("is-active")},2000);console.log(e.data)}else{alert(e.data)}}});return false});b(document).on("submit","#qlwapp_button_form",function(f){f.preventDefault();var c=b(this),d=c.find("#qlwapp_button_form_nonce").val();c.trigger("qlwapp.save",["qlwapp_save_button",d])});b(document).on("submit","#qlwapp_box_form",function(f){f.preventDefault();var c=b(this),d=c.find("#qlwapp_box_form_nonce").val();c.trigger("qlwapp.save",["qlwapp_save_box",d])});b(document).on("submit","#qlwapp_display_form",function(f){f.preventDefault();var c=b(this),d=c.find("#qlwapp_display_form_nonce").val();c.trigger("qlwapp.save",["qlwapp_save_display",d])});b(document).on("submit","#qlwapp_scheme_form",function(f){f.preventDefault();var c=b(this),d=c.find("#qlwapp_scheme_form_nonce").val();c.trigger("qlwapp.save",["qlwapp_save_scheme",d])})})(jQuery);
 
1
+
2
+ (function(b){function a(c){if(c){b("#submit").attr("disabled",true)}else{b("#submit").attr("disabled",false)}}a(true);b("form").change(function(c){a(false)});b(".button").click(function(){a(false)});b("button").click(function(){a(false)});b(".qlwapp-color-field").wpColorPicker({change:function(c,d){a(false)},});b(document).on("tinymce_change",function(c){a(false)});b(".qlwapp-select2").select2({allowClear:false,theme:"default",minimumResultsForSearch:-1});b(".qlwapp-select2-ajax").each(function(){var d=b(this),c=b(this).data("name");d.select2({allowClear:true,ajax:{url:ajaxurl,dataType:"json",data:function(e){return{name:c,per_page:10,q:e.term||0,selected:d.select2("val")||0,action:"qlwapp_get_posts",nonce:qlwapp.nonce.qlwapp_get_posts}},processResults:function(e){var f=[];if(e){b.each(e,function(g,h){f.push({id:h[0],text:h[1]})})}return{results:f}},cache:true},minimumInputLength:3})});b(".qlwapp-color-field").wpColorPicker();b(document).on("click",".upload_image_button",function(f){f.preventDefault();var c=wp.media.editor.send.attachment,d=b(this);wp.media.editor.send.attachment=function(e,g){b(d).parent().prev().attr("src",g.url);b(d).prev().val(g.url).trigger("change");wp.media.editor.send.attachment=c};wp.media.editor.open(d);return false});b(document).on("click",".remove_image_button",function(c){c.preventDefault();var d=b(this).parent().prev().attr("data-src");b(this).parent().prev().attr("src",d);b(this).prev().prev().val("").trigger("change");return false});b(document).on("qlwapp.save","form",function(i,h,f){var c=b(i.currentTarget),g=c.find(".settings-save-status .spinner"),d=c.find(".settings-save-status .saved");b.ajax({url:ajaxurl,data:{action:h,nonce:f,form_data:c.serialize()},dataType:"json",type:"POST",beforeSend:function(){a(true);g.addClass("is-active")},complete:function(){g.removeClass("is-active")},error:function(e){console.log(e)},success:function(e){d.addClass("is-active");if(e.success){setTimeout(function(){d.removeClass("is-active")},2000);console.log(e.data)}else{alert(e.data)}}});return false});b(document).on("submit","#qlwapp_button_form",function(f){f.preventDefault();var c=b(this),d=c.find("#qlwapp_button_form_nonce").val();c.trigger("qlwapp.save",["qlwapp_save_button",d])});b(document).on("submit","#qlwapp_box_form",function(f){f.preventDefault();var c=b(this),d=c.find("#qlwapp_box_form_nonce").val();c.trigger("qlwapp.save",["qlwapp_save_box",d])});b(document).on("submit","#qlwapp_display_form",function(f){f.preventDefault();var c=b(this),d=c.find("#qlwapp_display_form_nonce").val();c.trigger("qlwapp.save",["qlwapp_save_display",d])});b(document).on("submit","#qlwapp_scheme_form",function(f){f.preventDefault();var c=b(this),d=c.find("#qlwapp_scheme_form_nonce").val();c.trigger("qlwapp.save",["qlwapp_save_scheme",d])})})(jQuery);
changelog.txt CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  = 4.5.0 =
2
  * Improvement. code refactorization with MVC
3
  * Improvement. new contact tab
1
+ = 4.5.2 =
2
+ * Fix. include full path
3
+
4
+ = 4.5.1 =
5
+ * Fix. small css issues
6
+
7
  = 4.5.0 =
8
  * Improvement. code refactorization with MVC
9
  * Improvement. new contact tab
includes/backend.php CHANGED
@@ -18,14 +18,14 @@ class QLWAPP_Admin {
18
  }
19
 
20
  function includes() {
21
- include_once 'controllers/WelcomeController.php';
22
- include_once 'controllers/ButtonController.php';
23
- include_once 'controllers/BoxController.php';
24
- include_once 'controllers/ContactController.php';
25
- include_once 'controllers/DisplayController.php';
26
- include_once 'controllers/SchemeController.php';
27
- include_once 'controllers/PremiumController.php';
28
- include_once 'controllers/SuggestionsController.php';
29
  }
30
 
31
  function add_css() {
18
  }
19
 
20
  function includes() {
21
+ include_once (QLWAPP_PLUGIN_DIR . 'includes/controllers/WelcomeController.php');
22
+ include_once (QLWAPP_PLUGIN_DIR . 'includes/controllers/ButtonController.php');
23
+ include_once (QLWAPP_PLUGIN_DIR . 'includes/controllers/BoxController.php');
24
+ include_once (QLWAPP_PLUGIN_DIR . 'includes/controllers/ContactController.php');
25
+ include_once (QLWAPP_PLUGIN_DIR . 'includes/controllers/DisplayController.php');
26
+ include_once (QLWAPP_PLUGIN_DIR . 'includes/controllers/SchemeController.php');
27
+ include_once (QLWAPP_PLUGIN_DIR . 'includes/controllers/PremiumController.php');
28
+ include_once (QLWAPP_PLUGIN_DIR . 'includes/controllers/SuggestionsController.php');
29
  }
30
 
31
  function add_css() {
includes/controllers/SchemeController.php CHANGED
@@ -17,8 +17,8 @@ class QLWAPP_Scheme_Controller extends QLWAPP_Controller {
17
  global $submenu;
18
  $scheme_model = new QLWAPP_Scheme();
19
  $scheme = $scheme_model->get();
20
- include (QLWAPP_PLUGIN_DIR . '/includes/view/backend/pages/parts/header.php');
21
- include (QLWAPP_PLUGIN_DIR . '/includes/view/backend/pages/scheme.php');
22
  }
23
 
24
  function init() {
17
  global $submenu;
18
  $scheme_model = new QLWAPP_Scheme();
19
  $scheme = $scheme_model->get();
20
+ include (QLWAPP_PLUGIN_DIR . 'includes/view/backend/pages/parts/header.php');
21
+ include (QLWAPP_PLUGIN_DIR . 'includes/view/backend/pages/scheme.php');
22
  }
23
 
24
  function init() {
includes/controllers/SuggestionsController.php CHANGED
@@ -13,8 +13,8 @@ class QLWAPP_Suggestions_Controller {
13
  include_once(QLWAPP_PLUGIN_DIR . 'includes/models/Suggestions.php');
14
  $wp_list_table = new QLWAPP_Suggestions_List_Table();
15
  $wp_list_table->prepare_items();
16
- include (QLWAPP_PLUGIN_DIR . '/includes/view/backend/pages/parts/header.php');
17
- include (QLWAPP_PLUGIN_DIR . '/includes/view/backend/pages/suggestions.php');
18
  }
19
 
20
  // fix for activateUrl on install now button
13
  include_once(QLWAPP_PLUGIN_DIR . 'includes/models/Suggestions.php');
14
  $wp_list_table = new QLWAPP_Suggestions_List_Table();
15
  $wp_list_table->prepare_items();
16
+ include (QLWAPP_PLUGIN_DIR . 'includes/view/backend/pages/parts/header.php');
17
+ include (QLWAPP_PLUGIN_DIR . 'includes/view/backend/pages/suggestions.php');
18
  }
19
 
20
  // fix for activateUrl on install now button
includes/controllers/WelcomeController.php CHANGED
@@ -12,8 +12,8 @@ class QLWAPP_Welcome_Controller {
12
 
13
  function add_panel() {
14
  global $submenu;
15
- include (QLWAPP_PLUGIN_DIR . '/includes/view/backend/pages/parts/header.php');
16
- include (QLWAPP_PLUGIN_DIR . '/includes/view/backend/pages/welcome.php');
17
  }
18
 
19
  function init() {
12
 
13
  function add_panel() {
14
  global $submenu;
15
+ include (QLWAPP_PLUGIN_DIR . 'includes/view/backend/pages/parts/header.php');
16
+ include (QLWAPP_PLUGIN_DIR . 'includes/view/backend/pages/welcome.php');
17
  }
18
 
19
  function init() {
includes/models/Box.php CHANGED
@@ -1,36 +1,36 @@
1
  <?php
2
 
3
- include_once 'QLWAPP_Model.php';
4
 
5
  class QLWAPP_Box extends QLWAPP_Model {
6
 
7
- protected $table = 'box';
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')
15
  // ,'contactstimeout' => 'no'
16
- );
17
- return $args;
18
- }
19
 
20
- function sanitize($settings) {
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']);
27
- }
28
- return $settings;
29
  }
30
-
31
- function save($box_data = NULL) {
32
- // return $this->sanitize($box_data);
33
- return parent::save_data($this->table, $this->sanitize($box_data));
34
  }
 
 
 
 
 
 
 
35
 
36
  }
1
  <?php
2
 
3
+ include_once (QLWAPP_PLUGIN_DIR . 'includes/models/QLWAPP_Model.php');
4
 
5
  class QLWAPP_Box extends QLWAPP_Model {
6
 
7
+ protected $table = 'box';
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')
15
  // ,'contactstimeout' => 'no'
16
+ );
17
+ return $args;
18
+ }
19
 
20
+ function sanitize($settings) {
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']);
 
 
27
  }
28
+ return $settings;
29
+ }
30
+
31
+ function save($box_data = NULL) {
32
+ // return $this->sanitize($box_data);
33
+ return parent::save_data($this->table, $this->sanitize($box_data));
34
+ }
35
 
36
  }
includes/models/Button.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- include_once 'QLWAPP_Model.php';
4
 
5
  class QLWAPP_Button extends QLWAPP_Model {
6
 
1
  <?php
2
 
3
+ include_once (QLWAPP_PLUGIN_DIR . 'includes/models/QLWAPP_Model.php');
4
 
5
  class QLWAPP_Button extends QLWAPP_Model {
6
 
includes/models/Scheme.php CHANGED
@@ -1,27 +1,26 @@
1
  <?php
2
 
3
- include_once 'QLWAPP_Model.php';
4
 
5
  class QLWAPP_Scheme extends QLWAPP_Model {
6
 
7
- protected $table = 'scheme';
8
 
9
- function get_args() {
10
 
11
- $args = array(
12
- 'brand' => '',
13
- 'text' => '',
14
- 'link' => '',
15
- 'message' => '',
16
- 'label' => '',
17
- 'name' => '',
18
- );
19
- return $args;
20
- }
21
 
22
- function save($scheme = NULL) {
23
- return parent::save_data($this->table, $scheme);
24
- }
25
-
26
 
27
  }
1
  <?php
2
 
3
+ include_once (QLWAPP_PLUGIN_DIR . 'includes/models/QLWAPP_Model.php');
4
 
5
  class QLWAPP_Scheme extends QLWAPP_Model {
6
 
7
+ protected $table = 'scheme';
8
 
9
+ function get_args() {
10
 
11
+ $args = array(
12
+ 'brand' => '',
13
+ 'text' => '',
14
+ 'link' => '',
15
+ 'message' => '',
16
+ 'label' => '',
17
+ 'name' => '',
18
+ );
19
+ return $args;
20
+ }
21
 
22
+ function save($scheme = NULL) {
23
+ return parent::save_data($this->table, $scheme);
24
+ }
 
25
 
26
  }
includes/qlwapp.php CHANGED
@@ -5,10 +5,10 @@ class QLWAPP {
5
  protected static $instance;
6
 
7
  function includes() {
8
- include_once('notices.php');
9
- include_once('settings.php');
10
- include_once('frontend.php');
11
- include_once('backend.php');
12
  }
13
 
14
  public static function is_min() {
5
  protected static $instance;
6
 
7
  function includes() {
8
+ include_once(QLWAPP_PLUGIN_DIR . 'includes/notices.php');
9
+ include_once(QLWAPP_PLUGIN_DIR . 'includes/settings.php');
10
+ include_once(QLWAPP_PLUGIN_DIR . 'includes/frontend.php');
11
+ include_once(QLWAPP_PLUGIN_DIR . 'includes/backend.php');
12
  }
13
 
14
  public static function is_min() {
includes/view/backend/pages/modals/contact-modal.php CHANGED
@@ -111,7 +111,7 @@
111
  <div class="media-toolbar">
112
  <div class="media-toolbar-secondary"></div>
113
  <div class="media-toolbar-primary search-form">
114
- <button type="submit" class="media-modal-submit button button-primary media-button button-large" disabled="disabled"><?php esc_html_e('Save'); ?></button>
115
  <button type="button" class="media-modal-close button button-secondary media-button button-large" style="
116
  height: auto;
117
  float: none;
111
  <div class="media-toolbar">
112
  <div class="media-toolbar-secondary"></div>
113
  <div class="media-toolbar-primary search-form">
114
+ <button type="submit" id="submit" class="media-modal-submit button button-primary media-button button-large" disabled="disabled"><?php esc_html_e('Save'); ?></button>
115
  <button type="button" class="media-modal-close button button-secondary media-button button-large" style="
116
  height: auto;
117
  float: none;
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.5.0
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.5.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
wp-whatsapp-chat.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: WhatsApp Chat
5
  * Plugin URI: https://quadlayers.com/portfolio/wordpress-whatsapp-chat/
6
  * Description: WhatsApp Chat allows your visitors to contact you or your team through WhatsApp chat with a single click.
7
- * Version: 4.5.1
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPL-2.0+
@@ -19,7 +19,7 @@ if (!defined('QLWAPP_PLUGIN_NAME')) {
19
  define('QLWAPP_PLUGIN_NAME', 'WhatsApp Chat');
20
  }
21
  if (!defined('QLWAPP_PLUGIN_VERSION')) {
22
- define('QLWAPP_PLUGIN_VERSION', '4.5.1');
23
  }
24
  if (!defined('QLWAPP_PLUGIN_FILE')) {
25
  define('QLWAPP_PLUGIN_FILE', __FILE__);
4
  * Plugin Name: WhatsApp Chat
5
  * Plugin URI: https://quadlayers.com/portfolio/wordpress-whatsapp-chat/
6
  * Description: WhatsApp Chat allows your visitors to contact you or your team through WhatsApp chat with a single click.
7
+ * Version: 4.5.2
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPL-2.0+
19
  define('QLWAPP_PLUGIN_NAME', 'WhatsApp Chat');
20
  }
21
  if (!defined('QLWAPP_PLUGIN_VERSION')) {
22
+ define('QLWAPP_PLUGIN_VERSION', '4.5.2');
23
  }
24
  if (!defined('QLWAPP_PLUGIN_FILE')) {
25
  define('QLWAPP_PLUGIN_FILE', __FILE__);