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

Version Description

Minor enchantments

Download this release

Release Info

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

Code changes from version 3.0.2 to 3.0.3

Files changed (3) hide show
  1. admin/class-admin-base.php +8 -40
  2. cht-icons.php +2 -2
  3. readme.txt +4 -1
admin/class-admin-base.php CHANGED
@@ -890,56 +890,24 @@ class CHT_Admin_Base
890
  if (current_user_can("manage_options")) {
891
  global $wpdb;
892
  $tableName = $wpdb->prefix.'chaty_contact_form_leads';
893
- $postData = filter_input_array(INPUT_POST);
894
- if (isset($postData['remove_chaty_leads'])) {
895
- if (wp_verify_nonce($postData['remove_chaty_leads'], "remove_chaty_leads")) {
896
- if (isset($postData['chaty_leads']) && !empty($postData['chaty_leads'])) {
897
- if (isset($postData['action']) && $postData['action'] == "delete_message") {
898
- if (is_array($postData['chaty_leads'])) {
899
- $chaty_leads = $postData['chaty_leads'];
900
- $chaty_leads = implode(",", $chaty_leads);
901
- } else {
902
- $chaty_leads = $postData['chaty_leads'];
903
- }
904
-
905
- if ($chaty_leads) {
906
- $delete = $wpdb->query("DELETE FROM {$tableName} WHERE id IN(".esc_sql($chaty_leads).")");
907
- $paged = isset($postData['paged']) && !empty($postData['paged']) && is_numeric($postData['paged']) && $postData['paged'] > 0 ? $postData['paged'] : 1;
908
- $search = isset($postData['search']) && !empty($postData['search']) ? $postData['search'] : "";
909
- $url = admin_url("admin.php?page=chaty-contact-form-feed");
910
- if (intval($paged) > 1) {
911
- $url .= "&paged=".$paged;
912
- }
913
-
914
- if (!empty($search)) {
915
- $url .= "&search=".$search;
916
- }
917
-
918
- wp_redirect($url);
919
- exit;
920
- }
921
- }//end if
922
- }//end if
923
- }//end if
924
- }//end if
925
 
926
  $postData = filter_input_array(INPUT_GET);
927
  if (isset($postData['remove_chaty_leads'])) {
928
  if (wp_verify_nonce($postData['remove_chaty_leads'], "remove_chaty_leads")) {
929
  if (isset($postData['chaty_leads']) && !empty($postData['chaty_leads'])) {
930
  if (isset($postData['action']) && $postData['action'] == "delete_message") {
931
- if (is_array($postData['chaty_leads'])) {
932
- $chaty_leads = $postData['chaty_leads'];
933
- $chaty_leads = implode(",", $chaty_leads);
934
- } else {
935
- $chaty_leads = $postData['chaty_leads'];
936
- }
937
 
938
  if (!empty($chaty_leads)) {
939
  if ($chaty_leads == "remove-all") {
940
- $delete = $wpdb->query("TRUNCATE TABLE {$tableName}");
941
  } else {
942
- $delete = $wpdb->query("DELETE FROM {$tableName} WHERE id IN(".esc_sql($chaty_leads).")");
 
 
 
 
 
943
  }
944
 
945
  $paged = isset($postData['paged']) && !empty($postData['paged']) && is_numeric($postData['paged']) && $postData['paged'] > 0 ? $postData['paged'] : 1;
890
  if (current_user_can("manage_options")) {
891
  global $wpdb;
892
  $tableName = $wpdb->prefix.'chaty_contact_form_leads';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
893
 
894
  $postData = filter_input_array(INPUT_GET);
895
  if (isset($postData['remove_chaty_leads'])) {
896
  if (wp_verify_nonce($postData['remove_chaty_leads'], "remove_chaty_leads")) {
897
  if (isset($postData['chaty_leads']) && !empty($postData['chaty_leads'])) {
898
  if (isset($postData['action']) && $postData['action'] == "delete_message") {
899
+ $chaty_leads = $postData['chaty_leads'];
 
 
 
 
 
900
 
901
  if (!empty($chaty_leads)) {
902
  if ($chaty_leads == "remove-all") {
903
+ $wpdb->query("TRUNCATE TABLE {$tableName}");
904
  } else {
905
+ if(!is_array($chaty_leads)) {
906
+ $chaty_leads = explode(",", $chaty_leads);
907
+ }
908
+ foreach($chaty_leads as $id) {
909
+ $wpdb->delete($tableName, ['id' => $id]);
910
+ }
911
  }
912
 
913
  $paged = isset($postData['paged']) && !empty($postData['paged']) && is_numeric($postData['paged']) && $postData['paged'] > 0 ? $postData['paged'] : 1;
cht-icons.php CHANGED
@@ -7,7 +7,7 @@
7
  Author URI: https://premio.io/downloads/chaty/
8
  Text Domain: chaty
9
  Domain Path: /languages
10
- Version: 3.0.2
11
  License: GPL2
12
  */
13
 
@@ -27,7 +27,7 @@ define('CHT_INC', CHT_DIR . '/includes');
27
  define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
28
  define('CHT_PLUGIN_URL', plugin_dir_url(__FILE__));
29
  define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
30
- define('CHT_VERSION', "3.0.2");
31
 
32
  if (!function_exists('wp_doing_ajax')) {
33
  function wp_doing_ajax()
7
  Author URI: https://premio.io/downloads/chaty/
8
  Text Domain: chaty
9
  Domain Path: /languages
10
+ Version: 3.0.3
11
  License: GPL2
12
  */
13
 
27
  define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
28
  define('CHT_PLUGIN_URL', plugin_dir_url(__FILE__));
29
  define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
30
+ define('CHT_VERSION', "3.0.3");
31
 
32
  if (!function_exists('wp_doing_ajax')) {
33
  function wp_doing_ajax()
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: galdub, tomeraharon, premio
3
  Tags: whatsapp, whatsapp chat, facebook messenger, click to chat, chat, chat button, call now button, messenger, whatsapp button, chat icon, contact button, click to call
4
  Requires at least: 3.1
5
  Tested up to: 6.1
6
- Stable tag: 3.0.2
7
  Plugin URI: https://premio.io/downloads/chaty/
8
 
9
  WhatsApp chat, Facebook Messenger, Telegram, TikTok, Viber, Email, Line, WeChat Phone call, SMS, and more with customizable WhatsApp chat widget & call buttons. Chat with your visitors on WhatsApp, Facebook Messenger, and other chat channels!
@@ -283,6 +283,9 @@ Yes! You can even decide what chat buttons will show up on each device (desktop/
283
 
284
  == Changelog ==
285
 
 
 
 
286
  = 3.0.2 =
287
  Chaty settings security enhancement
288
 
3
  Tags: whatsapp, whatsapp chat, facebook messenger, click to chat, chat, chat button, call now button, messenger, whatsapp button, chat icon, contact button, click to call
4
  Requires at least: 3.1
5
  Tested up to: 6.1
6
+ Stable tag: 3.0.3
7
  Plugin URI: https://premio.io/downloads/chaty/
8
 
9
  WhatsApp chat, Facebook Messenger, Telegram, TikTok, Viber, Email, Line, WeChat Phone call, SMS, and more with customizable WhatsApp chat widget & call buttons. Chat with your visitors on WhatsApp, Facebook Messenger, and other chat channels!
283
 
284
  == Changelog ==
285
 
286
+ = 3.0.3 =
287
+ Minor enchantments
288
+
289
  = 3.0.2 =
290
  Chaty settings security enhancement
291