Click to Chat for WhatsApp Chat - Version 3.2.9

Version Description

  • Performance Improvement
  • Fix: WooCommerce Prefilled Message Muliple lines
  • Removed recommended tools page
Download this release

Release Info

Developer bhvreddy
Plugin Icon 128x128 Click to Chat for WhatsApp Chat
Version 3.2.9
Comparing to
See all releases

Code changes from version 3.2.7 to 3.2.9

Files changed (42) hide show
  1. click-to-chat.php +2 -2
  2. new/admin/admin.php +1 -6
  3. new/admin/admin_assets/js/329.admin.js +189 -0
  4. new/admin/admin_assets/js/admin.js +10 -10
  5. new/admin/admin_commons/admin-after-settings-page.php +3 -3
  6. new/admin/admin_commons/admin-desktop.php +3 -3
  7. new/admin/admin_commons/admin-mobile.php +3 -3
  8. new/admin/admin_commons/admin-show-hide.php +4 -4
  9. new/admin/admin_commons/admin-sidebar-content.php +19 -37
  10. new/admin/admin_commons/class-ht-ctc-metabox.php +2 -2
  11. new/admin/class-ht-ctc-admin-group-page.php +3 -3
  12. new/admin/class-ht-ctc-admin-main-page.php +21 -7
  13. new/admin/class-ht-ctc-admin-other-settings.php +41 -28
  14. new/admin/class-ht-ctc-admin-rtools.php +0 -142
  15. new/admin/class-ht-ctc-admin-scripts.php +10 -2
  16. new/admin/class-ht-ctc-admin-share-page.php +3 -3
  17. new/admin/class-ht-ctc-db.php +1 -0
  18. new/inc/assets/js/app.js +1 -1
  19. new/inc/assets/js/dev/app.dev.js +213 -171
  20. new/inc/assets/js/dev/app.test.js +79 -63
  21. new/inc/assets/js/dev/group.dev.js +9 -0
  22. new/inc/assets/js/dev/share.dev.js +9 -0
  23. new/inc/assets/js/group.js +1 -1
  24. new/inc/assets/js/share.js +1 -1
  25. new/inc/chat/class-ht-ctc-chat-shortcode.php +5 -3
  26. new/inc/chat/class-ht-ctc-chat.php +70 -29
  27. new/inc/commons/class-ht-ctc-hooks.php +8 -1
  28. new/inc/commons/class-ht-ctc-scripts.php +3 -0
  29. new/inc/group/class-ht-ctc-group-shortcode.php +3 -2
  30. new/inc/group/class-ht-ctc-group.php +2 -0
  31. new/inc/share/class-ht-ctc-share-shortcode.php +3 -2
  32. new/inc/share/class-ht-ctc-share.php +2 -0
  33. new/inc/styles-shortcode/sc-style-3_1.php +1 -1
  34. new/inc/styles-shortcode/sc-style-7.php +1 -1
  35. new/inc/styles-shortcode/sc-style-7_1.php +1 -1
  36. new/inc/styles-shortcode/sc-style-99.php +1 -1
  37. new/inc/styles/style-2.php +2 -2
  38. new/inc/styles/style-3.php +1 -1
  39. new/inc/styles/style-3_1.php +2 -2
  40. new/inc/styles/style-7.php +1 -1
  41. new/inc/styles/style-7_1.php +1 -1
  42. readme.txt +41 -24
click-to-chat.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Click to Chat
4
  Plugin URI: https://wordpress.org/plugins/click-to-chat-for-whatsapp/
5
  Description: Lets make your Web page visitors contact you through WhatsApp with a single click/tap
6
- Version: 3.2.7
7
  Author: HoliThemes
8
  Author URI: https://holithemes.com/plugins/click-to-chat/
9
  License: GPL2
@@ -17,7 +17,7 @@ if ( ! defined( 'WPINC' ) ) {
17
 
18
  // ctc - Version - update version at readme 'Stable tag'
19
  if ( ! defined( 'HT_CTC_VERSION' ) ) {
20
- define( 'HT_CTC_VERSION', '3.2.7' );
21
  }
22
 
23
  // define HT_CTC_PLUGIN_FILE
3
  Plugin Name: Click to Chat
4
  Plugin URI: https://wordpress.org/plugins/click-to-chat-for-whatsapp/
5
  Description: Lets make your Web page visitors contact you through WhatsApp with a single click/tap
6
+ Version: 3.2.9
7
  Author: HoliThemes
8
  Author URI: https://holithemes.com/plugins/click-to-chat/
9
  License: GPL2
17
 
18
  // ctc - Version - update version at readme 'Stable tag'
19
  if ( ! defined( 'HT_CTC_VERSION' ) ) {
20
+ define( 'HT_CTC_VERSION', '3.2.9' );
21
  }
22
 
23
  // define HT_CTC_PLUGIN_FILE
new/admin/admin.php CHANGED
@@ -45,9 +45,4 @@ include_once HT_CTC_PLUGIN_DIR .'new/admin/class-ht-ctc-admin-customize-styles.p
45
  include_once HT_CTC_PLUGIN_DIR .'new/admin/class-ht-ctc-admin-other-settings.php';
46
 
47
  // meta boxes - change values at page level
48
- include_once HT_CTC_PLUGIN_DIR .'new/admin/admin_commons/class-ht-ctc-metabox.php';
49
-
50
- // rtools
51
- if ( ! isset ( $ht_ctc_othersettings['hide_rtools'] ) ) {
52
- include_once HT_CTC_PLUGIN_DIR .'new/admin/class-ht-ctc-admin-rtools.php';
53
- }
45
  include_once HT_CTC_PLUGIN_DIR .'new/admin/class-ht-ctc-admin-other-settings.php';
46
 
47
  // meta boxes - change values at page level
48
+ include_once HT_CTC_PLUGIN_DIR .'new/admin/admin_commons/class-ht-ctc-metabox.php';
 
 
 
 
 
new/admin/admin_assets/js/329.admin.js ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Click to Chat v3.2.9
2
+ document.addEventListener('DOMContentLoaded', function() {
3
+
4
+ // M.AutoInit();
5
+
6
+ var elems = document.querySelectorAll('select');
7
+ M.FormSelect.init(elems, {});
8
+
9
+ var elems = document.querySelectorAll('.collapsible');
10
+ M.Collapsible.init(elems, {});
11
+
12
+ var elems = document.querySelectorAll('.modal');
13
+ M.Modal.init(elems, {});
14
+
15
+ var elems = document.querySelectorAll('.tooltipped');
16
+ M.Tooltip.init(elems, {});
17
+
18
+ });
19
+
20
+ (function($){
21
+
22
+ // ready
23
+ $(function(){
24
+
25
+ $('select').formSelect();
26
+ $('.collapsible').collapsible();
27
+ $('.modal').modal();
28
+ $('.tooltipped').tooltip();
29
+ $('.ht-ctc-color').wpColorPicker();
30
+
31
+ // show/hide settings
32
+ function ht_ctc_show_hide_options () {
33
+
34
+ // default display
35
+ var val = $('.select_show_or_hide').find(":selected").val();
36
+ if (val == 'show') {
37
+ $(".showbased").show();
38
+ } else if (val == 'hide') {
39
+ $(".hidebased").show();
40
+ }
41
+
42
+ // on change
43
+ $(".select_show_or_hide").on("change", function (e) {
44
+
45
+ var change_val = e.target.value;
46
+ $(".showbased").hide();
47
+ $(".hidebased").hide();
48
+
49
+ if (change_val == 'show') {
50
+ $(".showbased").show(500);
51
+ } else if (change_val == 'hide') {
52
+ $(".hidebased").show(500);
53
+ }
54
+ });
55
+
56
+ }
57
+ ht_ctc_show_hide_options();
58
+
59
+ // call to action
60
+ var cta_styles = ['.ht_ctc_s2', '.ht_ctc_s3', '.ht_ctc_s3_1', '.ht_ctc_s7'];
61
+ cta_styles.forEach(ht_ctc_admin_cta);
62
+
63
+ function ht_ctc_admin_cta(style) {
64
+ // default display
65
+ var val = $(style + ' .select_cta_type').find(":selected").val();
66
+ if (val == 'hide') {
67
+ $(style + " .cta_stick").hide();
68
+ }
69
+
70
+ // on change
71
+ $(style + " .select_cta_type").on("change", function (e) {
72
+ var change_val = e.target.value;
73
+ if (change_val == 'hide') {
74
+ $(style + " .cta_stick").hide(100);
75
+ } else {
76
+ $(style + " .cta_stick").show(200);
77
+ }
78
+ });
79
+ }
80
+
81
+ function ht_ctc_admin_animations() {
82
+ // default display
83
+ var val = $('.select_an_type').find(":selected").val();
84
+ if (val == 'no-animation') {
85
+ $(".an_delay").hide();
86
+ $(".an_itr").hide();
87
+ }
88
+
89
+ // on change
90
+ $(".select_an_type").on("change", function (e) {
91
+
92
+ var change_val = e.target.value;
93
+
94
+ if (change_val == 'no-animation') {
95
+ $(".an_delay").hide();
96
+ $(".an_itr").hide();
97
+ } else {
98
+ $(".an_delay").show(500);
99
+ $(".an_itr").show(500);
100
+ }
101
+ });
102
+ }
103
+ ht_ctc_admin_animations();
104
+
105
+ // on change - styles
106
+ $(".chat_select_style").on("change", function (e) {
107
+ $(".customize_styles_link").animate({ fontSize: '1.2em' }, "slow");
108
+ });
109
+
110
+ // Deskop, Mobile
111
+ if ($('#hideon_desktop').is(':checked')) {
112
+ $(".ht_ctc_admin_desktop").hide();
113
+ }
114
+
115
+ if ($('#hideon_mobile').is(':checked')) {
116
+ $(".ht_ctc_admin_mobile").hide();
117
+ }
118
+
119
+ $(".hidebasedondevice").on("change", function (e) {
120
+ if ($('#hideon_desktop').is(':checked')) {
121
+ $(".ht_ctc_admin_desktop").hide();
122
+ } else {
123
+ $(".ht_ctc_admin_desktop").show();
124
+ }
125
+
126
+ if ($('#hideon_mobile').is(':checked')) {
127
+ $(".ht_ctc_admin_mobile").hide();
128
+ } else {
129
+ $(".ht_ctc_admin_mobile").show();
130
+ }
131
+ });
132
+
133
+ // hide nothing or hide only on one device.
134
+ $(document).on('click', '.hidebasedondevice', function () {
135
+ $('.hidebasedondevice').not(this).prop('checked', false);
136
+ });
137
+
138
+ // WhatsApp number
139
+ function wn() {
140
+
141
+ var cc = $("#whatsapp_cc").val();
142
+ var num = $("#whatsapp_number").val();
143
+
144
+ $("#whatsapp_cc").on("change paste keyup", function (e) {
145
+ cc = $("#whatsapp_cc").val();
146
+ call();
147
+ });
148
+
149
+ $("#whatsapp_number").on("change paste keyup", function (e) {
150
+ num = $("#whatsapp_number").val();
151
+ call();
152
+ });
153
+
154
+ function call() {
155
+ $(".ht_ctc_wn").html(cc+''+num);
156
+ $("#ctc_whatsapp_number").val(cc+''+num);
157
+ }
158
+
159
+ }
160
+ wn();
161
+
162
+ // things based on screen size
163
+ function ss() {
164
+
165
+ var is_mobile = (typeof screen.width !== "undefined" && screen.width > 1024) ? "no" : "yes";
166
+
167
+ if ('yes' == is_mobile) {
168
+
169
+ // WhatsApp number tooltip position for mobile
170
+ // $("#whatsapp_cc").data('position', 'bottom');
171
+ $("#whatsapp_cc").attr('data-position', 'bottom');
172
+ $("#whatsapp_number").attr('data-position', 'bottom');
173
+ }
174
+ }
175
+ ss();
176
+
177
+ function other() {
178
+
179
+ // hover text on save_changes button
180
+ var text = $('#ctc_save_changes_hover_text').text();
181
+ $("#submit").attr('title', text);
182
+
183
+ }
184
+ other();
185
+
186
+ });
187
+
188
+
189
+ })(jQuery);
new/admin/admin_assets/js/admin.js CHANGED
@@ -1,4 +1,4 @@
1
- // Click to Chat
2
  document.addEventListener('DOMContentLoaded', function() {
3
 
4
  // M.AutoInit();
@@ -15,9 +15,6 @@ document.addEventListener('DOMContentLoaded', function() {
15
  var elems = document.querySelectorAll('.tooltipped');
16
  M.Tooltip.init(elems, {});
17
 
18
- // var elems = document.querySelectorAll('.tabs');
19
- // M.Tabs.getInstance(elems, {});
20
-
21
  });
22
 
23
  (function($){
@@ -29,7 +26,6 @@ $('select').formSelect();
29
  $('.collapsible').collapsible();
30
  $('.modal').modal();
31
  $('.tooltipped').tooltip();
32
-
33
  $('.ht-ctc-color').wpColorPicker();
34
 
35
  // show/hide settings
@@ -94,8 +90,6 @@ function ht_ctc_admin_animations() {
94
  $(".select_an_type").on("change", function (e) {
95
 
96
  var change_val = e.target.value;
97
- // $(".showbased").hide();
98
- // $(".hidebased").hide();
99
 
100
  if (change_val == 'no-animation') {
101
  $(".an_delay").hide();
@@ -147,9 +141,6 @@ function wn() {
147
  var cc = $("#whatsapp_cc").val();
148
  var num = $("#whatsapp_number").val();
149
 
150
- // $(".ht_ctc_wn").html(cc+num);
151
- // $("#ctc_whatsapp_number").val(cc+num);
152
-
153
  $("#whatsapp_cc").on("change paste keyup", function (e) {
154
  cc = $("#whatsapp_cc").val();
155
  call();
@@ -182,6 +173,15 @@ function ss() {
182
  }
183
  }
184
  ss();
 
 
 
 
 
 
 
 
 
185
 
186
  });
187
 
1
+ // Click to Chat v3.2.9
2
  document.addEventListener('DOMContentLoaded', function() {
3
 
4
  // M.AutoInit();
15
  var elems = document.querySelectorAll('.tooltipped');
16
  M.Tooltip.init(elems, {});
17
 
 
 
 
18
  });
19
 
20
  (function($){
26
  $('.collapsible').collapsible();
27
  $('.modal').modal();
28
  $('.tooltipped').tooltip();
 
29
  $('.ht-ctc-color').wpColorPicker();
30
 
31
  // show/hide settings
90
  $(".select_an_type").on("change", function (e) {
91
 
92
  var change_val = e.target.value;
 
 
93
 
94
  if (change_val == 'no-animation') {
95
  $(".an_delay").hide();
141
  var cc = $("#whatsapp_cc").val();
142
  var num = $("#whatsapp_number").val();
143
 
 
 
 
144
  $("#whatsapp_cc").on("change paste keyup", function (e) {
145
  cc = $("#whatsapp_cc").val();
146
  call();
173
  }
174
  }
175
  ss();
176
+
177
+ function other() {
178
+
179
+ // hover text on save_changes button
180
+ var text = $('#ctc_save_changes_hover_text').text();
181
+ $("#submit").attr('title', text);
182
+
183
+ }
184
+ other();
185
 
186
  });
187
 
new/admin/admin_commons/admin-after-settings-page.php CHANGED
@@ -19,9 +19,9 @@ if ( ! defined( 'ABSPATH' ) ) exit;
19
  <li>
20
  <div class="collapsible-header"><?php _e( 'Show/Hide on Selected pages, devices', 'click-to-chat-for-whatsapp' ); ?></div>
21
  <div class="collapsible-body">
22
- <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/show-only-on-selected-pages/"><?php _e( 'Show only on selected pages' ) ?></a></p>
23
- <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/hide-only-on-selected-pages/"><?php _e( 'Hide only on selected pages' ) ?></a></p>
24
- <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/show-hide-on-mobile-desktop/"><?php _e( 'Show/Hide on Mobile/Desktop' ) ?></a></p>
25
  </div>
26
  </li>
27
 
19
  <li>
20
  <div class="collapsible-header"><?php _e( 'Show/Hide on Selected pages, devices', 'click-to-chat-for-whatsapp' ); ?></div>
21
  <div class="collapsible-body">
22
+ <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/show-only-on-selected-pages/?utm_source=ctc&utm_medium=admin&utm_campaign=after-settings"><?php _e( 'Show only on selected pages' ) ?></a></p>
23
+ <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/hide-only-on-selected-pages/?utm_source=ctc&utm_medium=admin&utm_campaign=after-settings"><?php _e( 'Hide only on selected pages' ) ?></a></p>
24
+ <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/show-hide-on-mobile-desktop/?utm_source=ctc&utm_medium=admin&utm_campaign=after-settings"><?php _e( 'Show/Hide on Mobile/Desktop' ) ?></a></p>
25
  </div>
26
  </li>
27
 
new/admin/admin_commons/admin-desktop.php CHANGED
@@ -45,8 +45,8 @@ $side_2_value = ( isset( $options['side_2_value']) ) ? esc_attr( $options['side_
45
  <option value="8" <?php echo $style_desktop == 8 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-8', 'click-to-chat-for-whatsapp' ); ?></option>
46
  <option value="99" <?php echo $style_desktop == 99 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-99 (Add your own image / GIF)', 'click-to-chat-for-whatsapp' ); ?></option>
47
  </select>
48
- <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/list-of-styles/"><?php _e( 'List of styles', 'click-to-chat-for-whatsapp' ); ?></a> &emsp; | &emsp; <span><?php _e( 'Customize the styles', 'click-to-chat-for-whatsapp' ); ?> <a target="_blank" class="customize_styles_link" href="<?php echo admin_url( 'admin.php?page=click-to-chat-customize-styles' ); ?>">( Click to Chat -> Customize )</a></span> </p>
49
- <p class="description"><span class="check_select_styles" style="font-size: 0.7em;"><?php _e( 'If Styles for desktop, mobile not selected as expected', 'click-to-chat-for-whatsapp' ); ?> <a target="_blank" href="<?php echo admin_url( 'admin.php?page=click-to-chat-other-settings#styles_issue:~:text=Check,cache)' ); ?>"><?php _e( 'Check this', 'click-to-chat-for-whatsapp' ); ?></a>, - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/select-styles/"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a></span></p>
50
  </div>
51
  </div>
52
 
@@ -89,7 +89,7 @@ do_action('ht_ctc_ah_admin_desktop_after_select_sytle', $options, $dbrow );
89
  <label for="side_2_value"><?php _e( 'E.g. 50%', 'click-to-chat-for-whatsapp' ); ?></label>
90
  </div>
91
  </div>
92
- <p class="description ht_ctc_admin_desktop"><?php _e( 'Add css units as suffix - e.g. 10px, 50%', 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/position-to-place/">more info</a> </p>
93
 
94
  <br class="ht_ctc_admin_desktop">
95
  <hr class="ht_ctc_admin_desktop" style="max-width: 500px;">
45
  <option value="8" <?php echo $style_desktop == 8 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-8', 'click-to-chat-for-whatsapp' ); ?></option>
46
  <option value="99" <?php echo $style_desktop == 99 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-99 (Add your own image / GIF)', 'click-to-chat-for-whatsapp' ); ?></option>
47
  </select>
48
+ <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/list-of-styles/?utm_source=ctc&utm_medium=admin&utm_campaign=chat"><?php _e( 'List of styles', 'click-to-chat-for-whatsapp' ); ?></a> &emsp; | &emsp; <span><?php _e( 'Customize the styles', 'click-to-chat-for-whatsapp' ); ?> <a target="_blank" class="customize_styles_link" href="<?php echo admin_url( 'admin.php?page=click-to-chat-customize-styles' ); ?>">( Click to Chat -> Customize )</a></span> </p>
49
+ <p class="description"><span class="check_select_styles" style="font-size: 0.7em;"><?php _e( 'If Styles for desktop, mobile not selected as expected', 'click-to-chat-for-whatsapp' ); ?> <a target="_blank" href="<?php echo admin_url( 'admin.php?page=click-to-chat-other-settings#styles_issue:~:text=Check,cache)' ); ?>"><?php _e( 'Check this', 'click-to-chat-for-whatsapp' ); ?></a>, - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/select-styles/?utm_source=ctc&utm_medium=admin&utm_campaign=chat"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a></span></p>
50
  </div>
51
  </div>
52
 
89
  <label for="side_2_value"><?php _e( 'E.g. 50%', 'click-to-chat-for-whatsapp' ); ?></label>
90
  </div>
91
  </div>
92
+ <p class="description ht_ctc_admin_desktop"><?php _e( 'Add css units as suffix - e.g. 10px, 50%', 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/position-to-place/?utm_source=ctc&utm_medium=admin&utm_campaign=chat">more info</a> </p>
93
 
94
  <br class="ht_ctc_admin_desktop">
95
  <hr class="ht_ctc_admin_desktop" style="max-width: 500px;">
new/admin/admin_commons/admin-mobile.php CHANGED
@@ -42,8 +42,8 @@ $mobile_side_2_value = ( isset( $options['mobile_side_2_value'])) ? esc_attr( $o
42
  <option value="8" <?php echo $style_mobile == 8 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-8', 'click-to-chat-for-whatsapp' ); ?></option>
43
  <option value="99" <?php echo $style_mobile == 99 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-99 (Add your own image / GIF)', 'click-to-chat-for-whatsapp' ); ?></option>
44
  </select>
45
- <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/list-of-styles/"><?php _e( 'List of styles', 'click-to-chat-for-whatsapp' ); ?></a> &emsp; | &emsp; <span><?php _e( 'Customize the styles', 'click-to-chat-for-whatsapp' ); ?> <a target="_blank" class="customize_styles_link" href="<?php echo admin_url( 'admin.php?page=click-to-chat-customize-styles' ); ?>">( Click to Chat -> Customize )</a></span> </p>
46
- <p class="description"><span class="check_select_styles" style="font-size: 0.7em;">If Styles for desktop, mobile not selected as expected <a target="_blank" href="<?php echo admin_url( 'admin.php?page=click-to-chat-other-settings#styles_issue:~:text=Check,cache)' ); ?>">Check this</a>, - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/select-styles/">more info</a></span></p>
47
  </div>
48
  </div>
49
 
@@ -85,7 +85,7 @@ do_action('ht_ctc_ah_admin_mobile_after_select_sytle', $options, $dbrow );
85
  <label for="mobile_side_2_value"><?php _e( 'E.g. 50%', 'click-to-chat-for-whatsapp' ); ?></label>
86
  </div>
87
  </div>
88
- <p class="description ht_ctc_admin_mobile"><?php _e( 'Add css units as suffix - e.g. 10px, 50%', 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/position-to-place/"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> </p>
89
 
90
  <br class="ht_ctc_admin_mobile">
91
  <hr class="ht_ctc_admin_mobile" style="max-width: 500px;">
42
  <option value="8" <?php echo $style_mobile == 8 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-8', 'click-to-chat-for-whatsapp' ); ?></option>
43
  <option value="99" <?php echo $style_mobile == 99 ? 'SELECTED' : ''; ?> ><?php _e( 'Style-99 (Add your own image / GIF)', 'click-to-chat-for-whatsapp' ); ?></option>
44
  </select>
45
+ <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/list-of-styles/?utm_source=ctc&utm_medium=admin&utm_campaign=chat"><?php _e( 'List of styles', 'click-to-chat-for-whatsapp' ); ?></a> &emsp; | &emsp; <span><?php _e( 'Customize the styles', 'click-to-chat-for-whatsapp' ); ?> <a target="_blank" class="customize_styles_link" href="<?php echo admin_url( 'admin.php?page=click-to-chat-customize-styles' ); ?>">( Click to Chat -> Customize )</a></span> </p>
46
+ <p class="description"><span class="check_select_styles" style="font-size: 0.7em;">If Styles for desktop, mobile not selected as expected <a target="_blank" href="<?php echo admin_url( 'admin.php?page=click-to-chat-other-settings#styles_issue:~:text=Check,cache)' ); ?>">Check this</a>, - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/select-styles/?utm_source=ctc&utm_medium=admin&utm_campaign=chat">more info</a></span></p>
47
  </div>
48
  </div>
49
 
85
  <label for="mobile_side_2_value"><?php _e( 'E.g. 50%', 'click-to-chat-for-whatsapp' ); ?></label>
86
  </div>
87
  </div>
88
+ <p class="description ht_ctc_admin_mobile"><?php _e( 'Add css units as suffix - e.g. 10px, 50%', 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/position-to-place/?utm_source=ctc&utm_medium=admin&utm_campaign=chat"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> </p>
89
 
90
  <br class="ht_ctc_admin_mobile">
91
  <hr class="ht_ctc_admin_mobile" style="max-width: 500px;">
new/admin/admin_commons/admin-show-hide.php CHANGED
@@ -437,12 +437,12 @@ if ( 'chat' == $type ) {
437
  do_action('ht_ctc_ah_admin_after_showhide');
438
  ?>
439
 
440
- <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/show-hide-styles/"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> </p>
441
  <br>
442
  <p class="description"><?php _e( 'Usecases', 'click-to-chat-for-whatsapp' ); ?>:</p>
443
- <p class="description"> > <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/show-only-on-selected-pages/"><?php _e( 'Show only on selected pages', 'click-to-chat-for-whatsapp' ); ?></a><?php _e( ' (Single, Cart, Checkout page)', 'click-to-chat-for-whatsapp' ); ?></p>
444
- <p class="description"> > <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/hide-only-on-selected-pages/"><?php _e( 'Hide only on selected pages', 'click-to-chat-for-whatsapp' ); ?></a><?php _e( ' (Single, Cart, Checkout page)', 'click-to-chat-for-whatsapp' ); ?> </p>
445
- <p class="description"> > <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/show-hide-on-mobile-desktop/"><?php _e( 'Show/Hide on Mobile/Desktop', 'click-to-chat-for-whatsapp' ); ?></a></p>
446
 
447
 
448
  </div>
437
  do_action('ht_ctc_ah_admin_after_showhide');
438
  ?>
439
 
440
+ <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/show-hide-styles/?utm_source=ctc&utm_medium=admin&utm_campaign=chat"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> </p>
441
  <br>
442
  <p class="description"><?php _e( 'Usecases', 'click-to-chat-for-whatsapp' ); ?>:</p>
443
+ <p class="description"> > <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/show-only-on-selected-pages/?utm_source=ctc&utm_medium=admin&utm_campaign=chat"><?php _e( 'Show only on selected pages', 'click-to-chat-for-whatsapp' ); ?></a><?php _e( ' (Single, Cart, Checkout page)', 'click-to-chat-for-whatsapp' ); ?></p>
444
+ <p class="description"> > <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/hide-only-on-selected-pages/?utm_source=ctc&utm_medium=admin&utm_campaign=chat"><?php _e( 'Hide only on selected pages', 'click-to-chat-for-whatsapp' ); ?></a><?php _e( ' (Single, Cart, Checkout page)', 'click-to-chat-for-whatsapp' ); ?> </p>
445
+ <p class="description"> > <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/show-hide-on-mobile-desktop/?utm_source=ctc&utm_medium=admin&utm_campaign=chat"><?php _e( 'Show/Hide on Mobile/Desktop', 'click-to-chat-for-whatsapp' ); ?></a></p>
446
 
447
 
448
  </div>
new/admin/admin_commons/admin-sidebar-content.php CHANGED
@@ -13,43 +13,25 @@ $othersettings = get_option('ht_ctc_othersettings');
13
  <div class="sidebar-content">
14
 
15
  <div class="col s12 m8 l12 xl12">
16
-
17
- <?php
18
- // rtools
19
- if ( ! isset ( $othersettings['hide_rtools'] ) ) {
20
- ?>
21
-
22
- <div class="row">
23
- <ul class="collapsible popout">
24
- <li class="active">
25
-
26
-
27
- <ul class="collapsible popout">
28
- <li class="active">
29
- <div class="collapsible-header"><?php _e( 'Contact Us', 'click-to-chat-for-whatsapp' ); ?></div>
30
- <div class="collapsible-body">
31
- <p class="description"><?php _e( 'Please let us know if you have any suggestions or feedback!!', 'click-to-chat-for-whatsapp' ); ?> <br><br> <a href="http://api.whatsapp.com/send?phone=919494429789&text=<?php echo get_bloginfo('url'); ?>%0AHi%20HoliThemes,%0AI%20have%20a%20Suggestion/Feedback:" target="_blank"><?php _e( 'WhatsApp', 'click-to-chat-for-whatsapp' ); ?></a></p>
32
- <p class="description"><?php _e( 'Mail', 'click-to-chat-for-whatsapp' ); ?>:<a href="mailto: ctc@holithemes.com"> ctc@holithemes.com</a></p>
33
- </div>
34
- </li>
35
- </ul>
36
-
37
-
38
-
39
-
40
- <!-- <br> -->
41
- <!-- <p class="description" style="font-size: 0.7em; float: right;">Disclosure: contains affiliate links | <a target="_blank" href="<?php echo admin_url( 'admin.php?page=click-to-chat-other-settings#hide_rtools:~:text=Hide,Tools' ); ?>" style="color: unset;">Hide this</a></p> -->
42
- <!-- </div> -->
43
-
44
- </li>
45
- </ul>
46
- </div>
47
-
48
- <?php
49
- }
50
- ?>
51
-
52
  </div>
53
 
54
-
55
  </div>
13
  <div class="sidebar-content">
14
 
15
  <div class="col s12 m8 l12 xl12">
16
+ <div class="row">
17
+ <ul class="collapsible popout">
18
+ <li class="active">
19
+ <ul class="collapsible popout">
20
+ <li class="active">
21
+ <div class="collapsible-header"><?php _e( 'Contact Us', 'click-to-chat-for-whatsapp' ); ?></div>
22
+ <div class="collapsible-body">
23
+ <p class="description"><?php _e( 'Please let us know if you have any suggestions or feedback!!', 'click-to-chat-for-whatsapp' ); ?> <br><br> <a href="http://api.whatsapp.com/send?phone=919494429789&text=<?php echo get_bloginfo('url'); ?>%0AHi%20HoliThemes,%0AI%20have%20a%20Suggestion/Feedback:" target="_blank"><?php _e( 'WhatsApp', 'click-to-chat-for-whatsapp' ); ?></a></p>
24
+ <p class="description"><?php _e( 'Mail', 'click-to-chat-for-whatsapp' ); ?>:<a href="mailto: ctc@holithemes.com"> ctc@holithemes.com</a></p>
25
+ <p class="description">GitHub <a target="_blank" href="https://github.com/holithemes/ctc/discussions"> Discussions</a></p>
26
+ <?php
27
+ do_action('ht_ctc_ah_admin_sidebar_contact' );
28
+ ?>
29
+ </div>
30
+ </li>
31
+ </ul>
32
+ </li>
33
+ </ul>
34
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  </div>
36
 
 
37
  </div>
new/admin/admin_commons/class-ht-ctc-metabox.php CHANGED
@@ -44,7 +44,7 @@ class HT_CTC_MetaBox {
44
  $ht_ctc_pagelevel = get_post_meta( $current_post->ID, 'ht_ctc_pagelevel', true );
45
 
46
  ?>
47
- <p class="description">Change values at <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/change-values-at-page-level">Page level</a></p>
48
  <p class="description">Chat Settings:</p>
49
  <?php
50
 
@@ -72,7 +72,7 @@ class HT_CTC_MetaBox {
72
  <div class="row">
73
  <label for="number"><?php _e( 'WhatsApp Number', 'click-to-chat-for-whatsapp' ); ?></label><br>
74
  <input name="ht_ctc_pagelevel[number]" value="<?php echo $number ?>" id="number" type="text" placeholder="<?php echo $ph_number ?>">
75
- <p class="description"><a style="text-decoration: none" target="_blank" href="https://holithemes.com/plugins/click-to-chat/whatsapp-number/">WhatsApp Number</a> with country code</p>
76
  </div>
77
 
78
  <!-- call to action -->
44
  $ht_ctc_pagelevel = get_post_meta( $current_post->ID, 'ht_ctc_pagelevel', true );
45
 
46
  ?>
47
+ <p class="description">Change values at <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/?utm_source=ctc&utm_medium=meta&utm_campaign=chat">Page level</a></p>
48
  <p class="description">Chat Settings:</p>
49
  <?php
50
 
72
  <div class="row">
73
  <label for="number"><?php _e( 'WhatsApp Number', 'click-to-chat-for-whatsapp' ); ?></label><br>
74
  <input name="ht_ctc_pagelevel[number]" value="<?php echo $number ?>" id="number" type="text" placeholder="<?php echo $ph_number ?>">
75
+ <p class="description"><a style="text-decoration: none" target="_blank" href="https://holithemes.com/plugins/click-to-chat/whatsapp-number/?utm_source=ctc&utm_medium=meta&utm_campaign=chat">WhatsApp Number</a> with country code</p>
76
  </div>
77
 
78
  <!-- call to action -->
new/admin/class-ht-ctc-admin-group-page.php CHANGED
@@ -95,7 +95,7 @@ class HT_CTC_Admin_Group_Page {
95
  <div class="input-field col s12">
96
  <input name="ht_ctc_group[group_id]" value="<?php echo $value ?>" id="whatsapp_group_id" type="text" class="input-margin">
97
  <label for="whatsapp_group_id"><?php _e( 'WhatsApp Group ID', 'click-to-chat-for-whatsapp' ); ?>.</label>
98
- <p class="description"><?php _e( 'Enter WhatsApp Group ID. E.g. 9EHLsEsOeJk6AVtE8AvXiA', 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/find-whatsapp-group-id/"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> </p>
99
  </div>
100
  </div>
101
  <?php
@@ -110,7 +110,7 @@ class HT_CTC_Admin_Group_Page {
110
  <div class="input-field col s12">
111
  <input name="ht_ctc_group[call_to_action]" value="<?php echo $value ?>" id="call_to_action" type="text" class="input-margin">
112
  <label for="call_to_action"><?php _e( 'Call to Action', 'click-to-chat-for-whatsapp' ); ?></label>
113
- <p class="description"> <?php _e( 'Text that appears along with WhatsApp icon/button', 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/call-to-action/"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> </p>
114
  </div>
115
  </div>
116
  <?php
@@ -149,7 +149,7 @@ class HT_CTC_Admin_Group_Page {
149
 
150
  function group_shortcode_cb() {
151
  ?>
152
- <p class="description"><?php _e( 'Shortcodes for Group Chat', 'click-to-chat-for-whatsapp' ); ?>: [ht-ctc-group] - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/shortcodes-group">more info</a></p>
153
  <?php
154
  }
155
 
95
  <div class="input-field col s12">
96
  <input name="ht_ctc_group[group_id]" value="<?php echo $value ?>" id="whatsapp_group_id" type="text" class="input-margin">
97
  <label for="whatsapp_group_id"><?php _e( 'WhatsApp Group ID', 'click-to-chat-for-whatsapp' ); ?>.</label>
98
+ <p class="description"><?php _e( 'Enter WhatsApp Group ID. E.g. 9EHLsEsOeJk6AVtE8AvXiA', 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/find-whatsapp-group-id/?utm_source=ctc&utm_medium=admin&utm_campaign=group"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> </p>
99
  </div>
100
  </div>
101
  <?php
110
  <div class="input-field col s12">
111
  <input name="ht_ctc_group[call_to_action]" value="<?php echo $value ?>" id="call_to_action" type="text" class="input-margin">
112
  <label for="call_to_action"><?php _e( 'Call to Action', 'click-to-chat-for-whatsapp' ); ?></label>
113
+ <p class="description"> <?php _e( 'Text that appears along with WhatsApp icon/button', 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/call-to-action/?utm_source=ctc&utm_medium=admin&utm_campaign=group"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> </p>
114
  </div>
115
  </div>
116
  <?php
149
 
150
  function group_shortcode_cb() {
151
  ?>
152
+ <p class="description"><?php _e( 'Shortcodes for Group Chat', 'click-to-chat-for-whatsapp' ); ?>: [ht-ctc-group] - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/shortcodes-group/?utm_source=ctc&utm_medium=admin&utm_campaign=group">more info</a></p>
153
  <?php
154
  }
155
 
new/admin/class-ht-ctc-admin-main-page.php CHANGED
@@ -69,10 +69,6 @@ class HT_CTC_Admin_Main_Page {
69
 
70
  <!-- new row - After settings page -->
71
  <div class="row">
72
-
73
- <!-- after settings page -->
74
- <?php include_once HT_CTC_PLUGIN_DIR .'new/admin/admin_commons/admin-after-settings-page.php'; ?>
75
-
76
  </div>
77
 
78
  </div>
@@ -139,7 +135,7 @@ class HT_CTC_Admin_Main_Page {
139
  $cc = ( isset( $options['cc']) ) ? esc_attr( $options['cc'] ) : '';
140
  $num = ( isset( $options['num']) ) ? esc_attr( $options['num'] ) : '';
141
  $number = ( isset( $options['number']) ) ? esc_attr( $options['number'] ) : '';
142
- if ('' == $num) {
143
  $num = $number;
144
  }
145
  ?>
@@ -181,7 +177,7 @@ class HT_CTC_Admin_Main_Page {
181
  </div>
182
 
183
  <!-- full number - hidden field -->
184
- <input name="ht_ctc_chat_options[number]" hidden value="<?php echo $number ?>" id="ctc_whatsapp_number" type="text">
185
 
186
  </div>
187
  <p class="description"><?php _e( "WhatsApp or WhatsApp business number with country code", 'click-to-chat-for-whatsapp' ); ?> </p>
@@ -301,7 +297,25 @@ class HT_CTC_Admin_Main_Page {
301
  <p class="description"><a target="_blank" href="<?php echo admin_url( 'admin.php?page=click-to-chat-customize-styles' ); ?>">Customize Styles</a></p>
302
  <p class="description"><a target="_blank" href="<?php echo admin_url( 'admin.php?page=click-to-chat-other-settings' ); ?>">Other Settings</a></p>
303
  <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/shortcodes-chat">Shortcodes for Chat: </a>[ht-ctc-chat]</p>
 
 
304
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305
  }
306
 
307
 
@@ -359,7 +373,7 @@ class HT_CTC_Admin_Main_Page {
359
  foreach ($input as $key => $value) {
360
  if( isset( $input[$key] ) ) {
361
 
362
- if ( 'pre_filled' == $key ) {
363
  // $new_input[$key] = esc_textarea( $input[$key] );
364
  $new_input[$key] = sanitize_textarea_field( $input[$key] );
365
  } elseif ( 'side_1_value' == $key || 'side_2_value' == $key || 'mobile_side_1_value' == $key || 'mobile_side_2_value' == $key ) {
69
 
70
  <!-- new row - After settings page -->
71
  <div class="row">
 
 
 
 
72
  </div>
73
 
74
  </div>
135
  $cc = ( isset( $options['cc']) ) ? esc_attr( $options['cc'] ) : '';
136
  $num = ( isset( $options['num']) ) ? esc_attr( $options['num'] ) : '';
137
  $number = ( isset( $options['number']) ) ? esc_attr( $options['number'] ) : '';
138
+ if ('' == $num && '' == $cc ) {
139
  $num = $number;
140
  }
141
  ?>
177
  </div>
178
 
179
  <!-- full number - hidden field -->
180
+ <input name="ht_ctc_chat_options[number]" style="display: none;" hidden value="<?php echo $number ?>" id="ctc_whatsapp_number" type="text">
181
 
182
  </div>
183
  <p class="description"><?php _e( "WhatsApp or WhatsApp business number with country code", 'click-to-chat-for-whatsapp' ); ?> </p>
297
  <p class="description"><a target="_blank" href="<?php echo admin_url( 'admin.php?page=click-to-chat-customize-styles' ); ?>">Customize Styles</a></p>
298
  <p class="description"><a target="_blank" href="<?php echo admin_url( 'admin.php?page=click-to-chat-other-settings' ); ?>">Other Settings</a></p>
299
  <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/shortcodes-chat">Shortcodes for Chat: </a>[ht-ctc-chat]</p>
300
+ <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/faq">Frequently Asked Questions (FAQ)</a></p>
301
+
302
  <?php
303
+
304
+ $clear_cache_text = 'ctc_no_hover_text';
305
+
306
+ if ( function_exists('wp_cache_clear_cache') || function_exists('w3tc_pgcache_flush') || function_exists('wpfc_clear_all_cache') || function_exists('rocket_clean_domain') || function_exists('sg_cachepress_purge_cache') || function_exists('wpo_cache_flush') ) {
307
+ $clear_cache_text = "ctc_save_changes_hover_text";
308
+ }
309
+
310
+ if( class_exists('autoptimizeCache') || class_exists( 'WpeCommon' ) || class_exists( 'WpeCommon' ) || class_exists('LiteSpeed_Cache_API') || class_exists('Cache_Enabler') || class_exists('PagelyCachePurge') || class_exists('comet_cache') || class_exists('\Hummingbird\WP_Hummingbird') ) {
311
+ $clear_cache_text = "ctc_save_changes_hover_text";
312
+ }
313
+
314
+ ?>
315
+ <!-- hover content for submit button -->
316
+ <span style="display: none;" id="<?php echo $clear_cache_text ?>"><?php _e( 'Please clear the cache after save changes', 'click-to-chat-for-whatsapp' ); ?></span>
317
+ <?php
318
+
319
  }
320
 
321
 
373
  foreach ($input as $key => $value) {
374
  if( isset( $input[$key] ) ) {
375
 
376
+ if ( 'pre_filled' == $key || 'woo_pre_filled' == $key ) {
377
  // $new_input[$key] = esc_textarea( $input[$key] );
378
  $new_input[$key] = sanitize_textarea_field( $input[$key] );
379
  } elseif ( 'side_1_value' == $key || 'side_2_value' == $key || 'mobile_side_1_value' == $key || 'mobile_side_2_value' == $key ) {
new/admin/class-ht-ctc-admin-other-settings.php CHANGED
@@ -53,6 +53,15 @@ class HT_CTC_Admin_Other_Settings {
53
  </div> -->
54
  </div>
55
 
 
 
 
 
 
 
 
 
 
56
  </div>
57
 
58
  <?php
@@ -85,7 +94,7 @@ class HT_CTC_Admin_Other_Settings {
85
 
86
  ?>
87
  <ul class="collapsible" data-collapsible="accordion" id="ht_ctc_analytics">
88
- <li class="">
89
  <div class="collapsible-header"><?php _e( 'Google Analytics, Facebook Pixel', 'click-to-chat-for-whatsapp' ); ?></div>
90
  <div class="collapsible-body">
91
 
@@ -142,6 +151,36 @@ class HT_CTC_Admin_Other_Settings {
142
  <p class="description"><?php _e( 'If Facebook Pixel installed creates an Event there', 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/facebook-pixel/"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> </p>
143
  <br>
144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
 
146
  </div>
147
  </li>
@@ -299,30 +338,6 @@ class HT_CTC_Admin_Other_Settings {
299
  ?>
300
  <br>
301
 
302
- <?php
303
- // Hide/Remove rtools
304
- if ( isset( $options['hide_rtools'] ) ) {
305
- ?>
306
- <p id="rtools">
307
- <label>
308
- <input name="<?php echo $dbrow ?>[hide_rtools]" type="checkbox" value="1" <?php checked( $options['hide_rtools'], 1 ); ?> id="hide_rtools" />
309
- <span><?php _e( 'Hide Recommended Tools', 'click-to-chat-for-whatsapp' ); ?></span>
310
- </label>
311
- </p>
312
- <?php
313
- } else {
314
- ?>
315
- <p id="rtools">
316
- <label>
317
- <input name="<?php echo $dbrow ?>[hide_rtools]" type="checkbox" value="1" id="hide_rtools" />
318
- <span><?php _e( 'Hide Recommended Tools', 'click-to-chat-for-whatsapp' ); ?></span>
319
- </label>
320
- </p>
321
- <?php
322
- }
323
- ?>
324
- <br>
325
-
326
 
327
  <?php
328
  // hook
@@ -439,9 +454,7 @@ class HT_CTC_Admin_Other_Settings {
439
  <?php
440
  }
441
  ?>
442
- <p class="description">New feature: If any issue, uncheck this option and please contact us</p>
443
- <!-- todo: finish this after server migration -->
444
- <!-- <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/amp-compatibility/"><?php _e( 'AMP Compatibility', 'click-to-chat-for-whatsapp' ); ?></a></p> -->
445
  <br>
446
  <?php
447
  }
53
  </div> -->
54
  </div>
55
 
56
+ <!-- new row - After settings page -->
57
+ <div class="row">
58
+
59
+ <!-- after settings page -->
60
+ <?php include_once HT_CTC_PLUGIN_DIR .'new/admin/admin_commons/admin-after-settings-page.php'; ?>
61
+
62
+ </div>
63
+
64
+
65
  </div>
66
 
67
  <?php
94
 
95
  ?>
96
  <ul class="collapsible" data-collapsible="accordion" id="ht_ctc_analytics">
97
+ <li class="active">
98
  <div class="collapsible-header"><?php _e( 'Google Analytics, Facebook Pixel', 'click-to-chat-for-whatsapp' ); ?></div>
99
  <div class="collapsible-body">
100
 
151
  <p class="description"><?php _e( 'If Facebook Pixel installed creates an Event there', 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/facebook-pixel/"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> </p>
152
  <br>
153
 
154
+ <?php
155
+
156
+ // Google Ads gtag_report_conversion
157
+ if ( isset( $options['ga_ads'] ) ) {
158
+ ?>
159
+ <p>
160
+ <label>
161
+ <input name="<?php echo $dbrow ?>[ga_ads]" type="checkbox" value="1" <?php checked( $options['ga_ads'], 1 ); ?> id="ga_ads" />
162
+ <span><?php _e( 'Google Ads Conversion', 'click-to-chat-for-whatsapp' ); ?></span>
163
+ </label>
164
+ </p>
165
+ <?php
166
+ } else {
167
+ ?>
168
+ <p>
169
+ <label>
170
+ <input name="<?php echo $dbrow ?>[ga_ads]" type="checkbox" value="1" id="ga_ads" />
171
+ <span><?php _e( 'Google Ads Conversion', 'click-to-chat-for-whatsapp' ); ?></span>
172
+ </label>
173
+ </p>
174
+ <?php
175
+ }
176
+
177
+ // change function name
178
+ ?>
179
+ <!-- call gtag_report_conversion function when user clicks on WhatsApp icon/button -->
180
+ <p class="description"><?php _e( 'call gtag_report_conversion function, when user clicks', 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/google-ads-conversion/"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> </p>
181
+ <p class="description">Beta feature. ( please contact us for suggestions, improvements. )</p>
182
+ <br>
183
+
184
 
185
  </div>
186
  </li>
338
  ?>
339
  <br>
340
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341
 
342
  <?php
343
  // hook
454
  <?php
455
  }
456
  ?>
457
+ <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/amp-compatibility/"><?php _e( 'AMP Compatibility', 'click-to-chat-for-whatsapp' ); ?></a> New feature: If any issue, uncheck this option and please contact us</p>
 
 
458
  <br>
459
  <?php
460
  }
new/admin/class-ht-ctc-admin-rtools.php DELETED
@@ -1,142 +0,0 @@
1
- <?php
2
- /**
3
- * Other settings page - admin
4
- *
5
- * this main settings page contains ..
6
- *
7
- * Analytics, ..
8
- *
9
- * @package ctc
10
- * @subpackage admin
11
- * @since 3.0
12
- */
13
-
14
- if ( ! defined( 'ABSPATH' ) ) exit;
15
-
16
- if ( ! class_exists( 'HT_CTC_Admin_Rtools' ) ) :
17
-
18
- class HT_CTC_Admin_Rtools {
19
-
20
-
21
- public function menu() {
22
-
23
- add_submenu_page(
24
- 'click-to-chat',
25
- 'Recommended-Tools',
26
- 'Recommended Tools',
27
- 'manage_options',
28
- 'click-to-chat-rtools',
29
- array( $this, 'settings_page' )
30
- );
31
- }
32
-
33
-
34
- public function settings_page() {
35
-
36
- if ( ! current_user_can('manage_options') ) {
37
- return;
38
- }
39
-
40
- ?>
41
-
42
- <div class="wrap">
43
-
44
- <?php settings_errors(); ?>
45
-
46
- <div class="row">
47
- <div class="col s12 m12 xl8 options">
48
- <form action="options.php" method="post" class="">
49
- <?php settings_fields( 'ht_ctc_rtools_page_settings_fields' ); ?>
50
- <?php do_settings_sections( 'ht_ctc_rtools_page_settings_sections_do' ) ?>
51
- <!-- submit_button() -->
52
- </form>
53
- </div>
54
- <!-- <div class="col s12 m12 xl6 ht-ctc-admin-sidebar">
55
- </div> -->
56
- </div>
57
-
58
- </div>
59
-
60
- <?php
61
-
62
- }
63
-
64
-
65
-
66
- public function settings() {
67
-
68
- register_setting( 'ht_ctc_rtools_page_settings_fields', 'ht_ctc_othersettings' , array( $this, 'options_sanitize' ) );
69
-
70
- add_settings_section( 'ht_ctc_rtools_settings_sections_add', '', array( $this, 'main_settings_section_cb' ), 'ht_ctc_rtools_page_settings_sections_do' );
71
-
72
- // add_settings_field( 'ht_ctc_tools', '', array( $this, 'ht_ctc_tools_cb' ), 'ht_ctc_rtools_page_settings_sections_do', 'ht_ctc_rtools_settings_sections_add' );
73
-
74
- }
75
-
76
- function main_settings_section_cb() {
77
- ?>
78
-
79
- <div class="row">
80
- <div class="col s12">
81
- <h4>Recommended Tools</h4>
82
- </div>
83
- </div>
84
-
85
-
86
- <div class="row">
87
-
88
- <div class="col s12 m6 l4">
89
- <ul class="collection with-header">
90
- <li class="collection-header"><h5>WhatsApp API</h5></li>
91
- <li><a class="collection-item" target="_blank" href="https://landbot.grsm.io/ctc">Landbot</a></li>
92
- <li><a class="collection-item" target="_blank" href="https://freshchat.grsm.io/ctc">FreshChat</a></li>
93
- <li><a class="collection-item" target="_blank" href="https://trengo.com/en?ref=ht">Trengo</a></li>
94
- <li><a class="collection-item" target="_blank" href="https://www.wati.io?ref=ht">Wati</a></li>
95
- </ul>
96
- </div>
97
-
98
- <div class="col s12 m6 l4">
99
- <ul class="collection with-header">
100
- <li class="collection-header"><h5>Hosting</h5></li>
101
- <li><a class="collection-item" target="_blank" href="https://wordpress.com/pricing/?aff=7043">WordPress</a></li>
102
- <li><a class="collection-item" target="_blank" href="https://kinsta.com/?kaid=PNHFRBHEOEWF">Kinsta</a></li>
103
- <!-- <li><a class="collection-item" target="_blank" href=""></a></li> -->
104
- <li><a class="collection-item" target="_blank" href="https://www.bluehost.com/track/ht/">bluehost</a></li>
105
- </ul>
106
- </div>
107
-
108
- <div class="col s12 m6 l4">
109
- <ul class="collection with-header">
110
- <li class="collection-header"><h5>Themes</h5></li>
111
- <li><a class="collection-item" target="_blank" href="https://wpastra.com/?bsf=891">Astra</a></li>
112
- <li><a class="collection-item" target="_blank" href="https://www.elegantthemes.com/affiliates/idevaffiliate.php?id=46605">Divi</a></li>
113
- <!-- <li><a class="collection-item" target="_blank" href=""></a></li> -->
114
- <!-- <li><a class="collection-item" target="_blank" href=""></a></li> -->
115
- </ul>
116
- </div>
117
-
118
-
119
-
120
- </div>
121
-
122
- <p class="description" style="font-size: 0.7em; float: right;">Disclosure: contains affiliate links | <a target="_blank" href="<?php echo admin_url( 'admin.php?page=click-to-chat-other-settings#hide_rtools:~:text=Hide,Tools' ); ?>" style="">Hide this</a></p>
123
-
124
- <?php
125
- }
126
-
127
-
128
- // function ht_ctc_tools_cb() {
129
- // }
130
-
131
-
132
-
133
-
134
-
135
- }
136
-
137
- $ht_ctc_admin_rtools = new HT_CTC_Admin_Rtools();
138
-
139
- add_action('admin_menu', array($ht_ctc_admin_rtools, 'menu') );
140
- add_action('admin_init', array($ht_ctc_admin_rtools, 'settings') );
141
-
142
- endif; // END class_exists check
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
new/admin/class-ht-ctc-admin-scripts.php CHANGED
@@ -19,16 +19,24 @@ class HT_CTC_Admin_Scripts {
19
 
20
  // true/false
21
  $load_js_bottom = apply_filters( 'ht_ctc_fh_load_js_bottom', false );
 
 
 
22
 
23
  // hook ..
24
- if( 'toplevel_page_click-to-chat' == $hook || 'click-to-chat_page_click-to-chat-chat-feature' == $hook || 'click-to-chat_page_click-to-chat-group-feature' == $hook || 'click-to-chat_page_click-to-chat-share-feature' == $hook || 'click-to-chat_page_click-to-chat-customize-styles' == $hook || 'click-to-chat_page_click-to-chat-other-settings' == $hook || 'click-to-chat_page_click-to-chat-rtools' == $hook ) {
 
 
25
 
26
  wp_enqueue_style( 'wp-color-picker' );
27
  wp_enqueue_style('ctc_admin_md_css', plugins_url( 'new/admin/admin_assets/css/materialize.min.css', HT_CTC_PLUGIN_FILE ) , '', HT_CTC_VERSION );
28
  wp_enqueue_style('ctc_admin_css', plugins_url( 'new/admin/admin_assets/css/admin.css', HT_CTC_PLUGIN_FILE ) , '', HT_CTC_VERSION );
29
 
30
  wp_enqueue_script( 'ctc_admin_md_js', plugins_url( 'new/admin/admin_assets/js/materialize.min.js', HT_CTC_PLUGIN_FILE ), array( 'jquery' ), HT_CTC_VERSION, $load_js_bottom );
31
- wp_enqueue_script( 'ctc_admin_js', plugins_url( 'new/admin/admin_assets/js/admin.js', HT_CTC_PLUGIN_FILE ), array( 'jquery', 'wp-color-picker', 'ctc_admin_md_js' ), HT_CTC_VERSION, $load_js_bottom );
 
 
 
32
  } else {
33
  return;
34
  }
19
 
20
  // true/false
21
  $load_js_bottom = apply_filters( 'ht_ctc_fh_load_js_bottom', false );
22
+
23
+ // $admin_js = 'admin.js';
24
+ $admin_js = '329.admin.js';
25
 
26
  // hook ..
27
+ if( 'toplevel_page_click-to-chat' == $hook || 'click-to-chat_page_click-to-chat-chat-feature' == $hook || 'click-to-chat_page_click-to-chat-group-feature' == $hook || 'click-to-chat_page_click-to-chat-share-feature' == $hook || 'click-to-chat_page_click-to-chat-customize-styles' == $hook || 'click-to-chat_page_click-to-chat-other-settings' == $hook ) {
28
+
29
+ do_action('ht_ctc_ah_admin_scripts_start');
30
 
31
  wp_enqueue_style( 'wp-color-picker' );
32
  wp_enqueue_style('ctc_admin_md_css', plugins_url( 'new/admin/admin_assets/css/materialize.min.css', HT_CTC_PLUGIN_FILE ) , '', HT_CTC_VERSION );
33
  wp_enqueue_style('ctc_admin_css', plugins_url( 'new/admin/admin_assets/css/admin.css', HT_CTC_PLUGIN_FILE ) , '', HT_CTC_VERSION );
34
 
35
  wp_enqueue_script( 'ctc_admin_md_js', plugins_url( 'new/admin/admin_assets/js/materialize.min.js', HT_CTC_PLUGIN_FILE ), array( 'jquery' ), HT_CTC_VERSION, $load_js_bottom );
36
+ wp_enqueue_script( 'ctc_admin_js', plugins_url( "new/admin/admin_assets/js/$admin_js", HT_CTC_PLUGIN_FILE ), array( 'jquery', 'wp-color-picker', 'ctc_admin_md_js' ), HT_CTC_VERSION, $load_js_bottom );
37
+
38
+ do_action('ht_ctc_ah_admin_scripts_end');
39
+
40
  } else {
41
  return;
42
  }
new/admin/class-ht-ctc-admin-share-page.php CHANGED
@@ -96,7 +96,7 @@ class HT_CTC_Admin_Share_Page {
96
  <div class="input-field col s12">
97
  <input name="ht_ctc_share[share_text]" value="<?php echo $value ?>" id="whatsapp_share_text" type="text" class="input-margin">
98
  <label for="whatsapp_share_text"><?php _e( 'Share Text', 'click-to-chat-for-whatsapp' ); ?></label>
99
- <p class="description"><?php _e( "Placeholder {{url}} returns current webpage URL", 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/share-text/"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> ) </p>
100
  </div>
101
  </div>
102
  <?php
@@ -111,7 +111,7 @@ class HT_CTC_Admin_Share_Page {
111
  <div class="input-field col s12">
112
  <input name="ht_ctc_share[call_to_action]" value="<?php echo $value ?>" id="call_to_action" type="text" class="input-margin">
113
  <label for="call_to_action"><?php _e( 'Call to Action', 'click-to-chat-for-whatsapp' ); ?></label>
114
- <p class="description"><?php _e( 'Text that appears along with WhatsApp icon/button', 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/call-to-action/"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> </p>
115
  </div>
116
  </div>
117
  <?php
@@ -181,7 +181,7 @@ class HT_CTC_Admin_Share_Page {
181
 
182
  function share_shortcode_cb() {
183
  ?>
184
- <p class="description"><?php _e( 'Shortcodes for Share', 'click-to-chat-for-whatsapp' ); ?>: [ht-ctc-share] - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/shortcodes-share"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a></p>
185
  <?php
186
  }
187
 
96
  <div class="input-field col s12">
97
  <input name="ht_ctc_share[share_text]" value="<?php echo $value ?>" id="whatsapp_share_text" type="text" class="input-margin">
98
  <label for="whatsapp_share_text"><?php _e( 'Share Text', 'click-to-chat-for-whatsapp' ); ?></label>
99
+ <p class="description"><?php _e( "Placeholder {{url}} returns current webpage URL", 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/share-text/?utm_source=ctc&utm_medium=admin&utm_campaign=share"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> ) </p>
100
  </div>
101
  </div>
102
  <?php
111
  <div class="input-field col s12">
112
  <input name="ht_ctc_share[call_to_action]" value="<?php echo $value ?>" id="call_to_action" type="text" class="input-margin">
113
  <label for="call_to_action"><?php _e( 'Call to Action', 'click-to-chat-for-whatsapp' ); ?></label>
114
+ <p class="description"><?php _e( 'Text that appears along with WhatsApp icon/button', 'click-to-chat-for-whatsapp' ); ?> - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/call-to-action/?utm_source=ctc&utm_medium=admin&utm_campaign=share"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a> </p>
115
  </div>
116
  </div>
117
  <?php
181
 
182
  function share_shortcode_cb() {
183
  ?>
184
+ <p class="description"><?php _e( 'Shortcodes for Share', 'click-to-chat-for-whatsapp' ); ?>: [ht-ctc-share] - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/shortcodes-share/?utm_source=ctc&utm_medium=admin&utm_campaign=share"><?php _e( 'more info', 'click-to-chat-for-whatsapp' ); ?></a></p>
185
  <?php
186
  }
187
 
new/admin/class-ht-ctc-db.php CHANGED
@@ -80,6 +80,7 @@ class HT_CTC_DB {
80
  * enable_share enable_share
81
  * google_analytics
82
  * fb_pixel
 
83
  * delete options on plugin uninstall
84
  *
85
  */
80
  * enable_share enable_share
81
  * google_analytics
82
  * fb_pixel
83
+ * ga_ads
84
  * delete options on plugin uninstall
85
  *
86
  */
new/inc/assets/js/app.js CHANGED
@@ -1 +1 @@
1
- !function(h){h(function(){var t,e,a,n,o,i=window.location.href,c=void 0!==document.title?document.title:"",r=void 0!==screen.width&&1024<screen.width?"no":"yes";function d(e){try{var t=parseInt(e.getAttribute("data-show_effect"));h(e).show(t)}catch(t){e.style.display="block"}try{n=(a=e).getAttribute("data-an_type"),setTimeout(function(){a.classList.add("ht_ctc_animation",n)},120),h(".ht-ctc-chat").hover(function(){h(".ht-ctc-chat .ht-ctc-cta-hover").show(120)},function(){h(".ht-ctc-chat .ht-ctc-cta-hover").hide(100)})}catch(t){}var a,n}function s(t){var e=t.getAttribute("data-number"),a="Click to Chat for WhatsApp",n="chat: "+e,o=c+", "+i;"yes"==t.getAttribute("data-is_ga_enable")&&("undefined"!=typeof gtag?gtag("event",n,{event_category:a,event_label:o}):"undefined"!=typeof ga&&void 0!==ga.getAll?ga.getAll()[0].send("event",a,n,o):"undefined"!=typeof __gaTracker&&__gaTracker("send","event",a,n,o)),"undefined"!=typeof dataLayer&&dataLayer.push({event:"Click to Chat",event_category:a,event_label:o,event_action:n}),"yes"==t.getAttribute("data-is_fb_pixel")&&"undefined"!=typeof fbq&&fbq("trackCustom","Click to Chat by HoliThemes",{Category:"Click to Chat for WhatsApp",return_type:"chat",ID:e,Title:c,URL:i})}(o=document.querySelector(".ht-ctc-chat"))&&(t=o,"yes"==r?"show"==t.getAttribute("data-display_mobile")&&((n=document.querySelector(".ht_ctc_desktop_chat"))&&n.remove(),a=t.getAttribute("data-css"),e=t.getAttribute("data-position_mobile"),t.style.cssText=e+a,d(t)):"show"==t.getAttribute("data-display_desktop")&&((n=document.querySelector(".ht_ctc_mobile_chat"))&&n.remove(),a=t.getAttribute("data-css"),n=t.getAttribute("data-position"),t.style.cssText=n+a,d(t)),o.addEventListener("click",function(){!function(t){var e=t.getAttribute("data-number"),a=t.getAttribute("data-pre_filled");a=a.replace(/\[url]/gi,i),a=encodeURIComponent(a);var n,o=t.getAttribute("data-webandapi");if(""==e)return t.innerHTML=t.getAttribute("data-no_number");"webapi"==o?(n="yes"==r?"https://api.whatsapp.com/send":"https://web.whatsapp.com/send",window.open(n+"?phone="+e+"&text="+a,"_blank","noopener")):(n="https://wa.me/",window.open(n+e+"?text="+a,"_blank","noopener"))}(o),s(o)})),h(document).on("click",".ht-ctc-sc-chat",function(){var t,e=this.getAttribute("data-number"),a=(a=this.getAttribute("data-pre_filled")).replace(/\[url]/gi,i);a=encodeURIComponent(a),"webapi"==this.getAttribute("data-webandapi")?(t="yes"==r?"https://api.whatsapp.com/send":"https://web.whatsapp.com/send",window.open(t+"?phone="+e+"&text="+a,"_blank","noopener")):(t="https://wa.me/",window.open(t+e+"?text="+a,"_blank","noopener")),s(this)})})}(jQuery);
1
+ !function(h){h(function(){var t,a=window.location.href,o=void 0!==document.title?document.title:"",c=void 0!==screen.width&&1024<screen.width?"no":"yes",i="";if("undefined"!=typeof ht_ctc_chat_var)i=ht_ctc_chat_var,e();else{try{document.querySelector(".ht-ctc-chat")&&(t=h(".ht-ctc-chat").attr("data-settings"),i=JSON.parse(t))}catch(t){i={}}e()}function e(){var t;h(document).trigger("ht_ctc_ce_settings",[i]),(t=document.querySelector(".ht-ctc-chat"))&&(h(t).trigger("ht_ctc_ce_chat"),function(t){"yes"==i.schedule?h(document).trigger("ht_ctc_display",[i,n,t]):n(t)}(t),t.addEventListener("click",function(){!function(t){var e=i.number,n=i.pre_filled;if(n=n.replace(/\[url]/gi,a),n=encodeURIComponent(n),""==e)return t.innerHTML=t.getAttribute("data-no_number");"webapi"==i.webandapi&&"yes"!==c?window.open("https://web.whatsapp.com/send?phone="+e+"&text="+n,"_blank","noopener"):window.open("https://wa.me/"+e+"?text="+n,"_blank","noopener")}(t),s(t)})),h(document).on("click",".ht-ctc-sc-chat",function(){var t,e=this.getAttribute("data-number"),n=(n=this.getAttribute("data-pre_filled")).replace(/\[url]/gi,a);n=encodeURIComponent(n),"webapi"==this.getAttribute("data-webandapi")?(t="yes"==c?"https://api.whatsapp.com/send":"https://web.whatsapp.com/send",window.open(t+"?phone="+e+"&text="+n,"_blank","noopener")):(t="https://wa.me/",window.open(t+e+"?text="+n,"_blank","noopener")),s(this)})}function n(t){var e;"yes"==c?"show"==i.dis_m&&((e=document.querySelector(".ht_ctc_desktop_chat"))&&e.remove(),t.style.cssText=i.pos_m+i.css,r(t)):"show"==i.dis_d&&((e=document.querySelector(".ht_ctc_mobile_chat"))&&e.remove(),t.style.cssText=i.pos_d+i.css,r(t))}function r(e){try{h(e).show(parseInt(i.se))}catch(t){e.style.display="block"}var t;t=e,setTimeout(function(){t.classList.add("ht_ctc_animation",i.ani)},120),h(".ht-ctc-chat").hover(function(){h(".ht-ctc-chat .ht-ctc-cta-hover").show(120)},function(){h(".ht-ctc-chat .ht-ctc-cta-hover").hide(100)})}function s(t){h(document).trigger("ht_ctc_analytics");var e=i.number;t.classList.contains("ht-ctc-sc")&&(e=t.getAttribute("data-number"));var n="Click to Chat for WhatsApp",c="chat: "+e,t=o+", "+a;"yes"==i.ga&&("undefined"!=typeof gtag?gtag("event",c,{event_category:n,event_label:t}):"undefined"!=typeof ga&&void 0!==ga.getAll?ga.getAll()[0].send("event",n,c,t):"undefined"!=typeof __gaTracker&&__gaTracker("send","event",n,c,t)),"undefined"!=typeof dataLayer&&dataLayer.push({event:"Click to Chat",event_category:n,event_label:t,event_action:c}),"yes"==i.ads&&"undefined"!=typeof gtag_report_conversion&&gtag_report_conversion(),"yes"==i.fb&&"undefined"!=typeof fbq&&fbq("trackCustom","Click to Chat by HoliThemes",{Category:"Click to Chat for WhatsApp",return_type:"chat",ID:e,Title:o,URL:a})}})}(jQuery);
new/inc/assets/js/dev/app.dev.js CHANGED
@@ -1,219 +1,261 @@
1
  // Click to Chat
2
  (function ($) {
3
 
4
- var v = '3.2.5';
5
-
6
  // ready
7
  $(function () {
8
-
9
- var url = window.location.href;
10
- var post_title = (typeof document.title !== "undefined" ) ? document.title : '';
11
- // is_mobile yes/no, desktop > 1024
12
- var is_mobile = (typeof screen.width !== "undefined" && screen.width > 1024) ? "no" : "yes";
13
 
 
 
 
 
 
14
 
15
- function ht_ctc() {
16
- console.log('ht_ctc');
17
- var ht_ctc_chat = document.querySelector('.ht-ctc-chat');
18
- if (ht_ctc_chat) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
- // display
21
- display_chat(ht_ctc_chat);
22
 
23
- // click
24
- ht_ctc_chat.addEventListener('click', function () {
25
- console.log('click event listener');
26
 
27
- // link
28
- ht_ctc_link(ht_ctc_chat);
29
 
30
- // analytics
31
- ht_ctc_chat_analytics(ht_ctc_chat);
32
- });
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  }
35
 
36
- // shortcode - click
37
- // $('.ht-ctc-sc-chat').click(function () {
38
- $(document).on('click', '.ht-ctc-sc-chat', function () {
39
- console.log('shortcode click');
40
 
41
- var number = this.getAttribute('data-number');
42
- var pre_filled = this.getAttribute('data-pre_filled');
43
- pre_filled = pre_filled.replace(/\[url]/gi, url);
44
- pre_filled = encodeURIComponent(pre_filled);
45
- var webandapi = this.getAttribute('data-webandapi');
 
 
46
 
47
- // web/api.whatsapp or wa.me
48
- if ('webapi' == webandapi) {
49
- if (is_mobile == 'yes') {
50
- var base_link = 'https://api.whatsapp.com/send';
51
- } else {
52
- var base_link = 'https://web.whatsapp.com/send';
 
 
 
 
 
 
 
 
53
  }
54
- window.open(base_link + '?phone=' + number + '&text=' + pre_filled, '_blank', 'noopener');
55
  } else {
56
- // wa.me
57
- var base_link = 'https://wa.me/';
58
- window.open(base_link + number + '?text=' + pre_filled, '_blank', 'noopener');
 
 
 
 
 
 
59
  }
 
60
 
61
- // analytics
62
- ht_ctc_chat_analytics(this);
63
- });
 
 
 
 
 
 
 
64
 
 
 
65
 
66
- }
67
- ht_ctc();
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
- // display based on device
70
- function display_chat(p) {
71
- if (is_mobile == 'yes') {
72
- var display_mobile = p.getAttribute('data-display_mobile');
73
- if ( 'show' == display_mobile ) {
74
 
75
- // remove desktop style
76
- var rm = document.querySelector('.ht_ctc_desktop_chat');
77
- (rm) ? rm.remove() : '';
78
 
79
- var css = p.getAttribute('data-css');
80
- var position_mobile = p.getAttribute('data-position_mobile');
81
- p.style.cssText = position_mobile + css;
82
- display(p)
83
- }
84
- } else {
85
- var display_desktop = p.getAttribute('data-display_desktop');
86
- if ( 'show' == display_desktop ) {
87
 
88
- // remove mobile style
89
- var rm = document.querySelector('.ht_ctc_mobile_chat');
90
- (rm) ? rm.remove() : '';
91
 
92
- var css = p.getAttribute('data-css');
93
- var position = p.getAttribute('data-position');
94
- p.style.cssText = position + css;
95
- display(p)
96
  }
97
- }
98
- }
99
-
100
- function display(p) {
101
- // p.style.removeProperty('display');
102
- // var x = p.style.getPropertyValue("display");
103
- // p.style.display = "block";
104
- try {
105
- var dt = parseInt(p.getAttribute('data-show_effect'));
106
- $(p).show(dt);
107
- } catch (e) {
108
- p.style.display = "block";
109
- }
110
 
111
- try {
112
- ht_ctc_things(p);
113
- } catch (e) {}
114
-
115
- }
116
-
117
- function ht_ctc_things(p) {
118
- console.log('animations');
119
- // animations
120
- var animateclass = p.getAttribute('data-an_type')
121
- setTimeout(function () {
122
- p.classList.add('ht_ctc_animation', animateclass);
123
- }, 120);
124
-
125
- // cta hover effects
126
- $(".ht-ctc-chat").hover(function () {
127
- $('.ht-ctc-chat .ht-ctc-cta-hover').show(120);
128
- }, function () {
129
- $('.ht-ctc-chat .ht-ctc-cta-hover').hide(100);
130
- });
131
- }
132
-
133
- // analytics
134
- function ht_ctc_chat_analytics(values) {
135
- console.log('analytics');
136
-
137
- var id = values.getAttribute('data-number');
138
-
139
- // Google Analytics
140
- var ga_category = 'Click to Chat for WhatsApp';
141
- var ga_action = 'chat: ' + id;
142
- var ga_label = post_title + ', ' + url;
143
- // if ga_enabled
144
- if ( 'yes' == values.getAttribute('data-is_ga_enable') ) {
145
- if (typeof gtag !== "undefined") {
146
- console.log('gtag');
147
- gtag('event', ga_action, {
148
  'event_category': ga_category,
149
  'event_label': ga_label,
 
150
  });
151
- } else if (typeof ga !== "undefined" && typeof ga.getAll !== "undefined") {
152
- console.log('ga');
153
- var tracker = ga.getAll();
154
- tracker[0].send("event", ga_category, ga_action, ga_label);
155
- // ga('send', 'event', ga_category, ga_action, ga_label);
156
- } else if (typeof __gaTracker !== "undefined") {
157
- __gaTracker('send', 'event', ga_category, ga_action, ga_label);
158
  }
159
- }
160
 
161
- // dataLayer
162
- if (typeof dataLayer !== "undefined") {
163
- console.log('dataLayer');
164
- dataLayer.push({
165
- 'event': 'Click to Chat',
166
- 'event_category': ga_category,
167
- 'event_label': ga_label,
168
- 'event_action': ga_action
169
- });
170
- }
171
 
172
- // FB Pixel
173
- if ( 'yes' == values.getAttribute('data-is_fb_pixel') ) {
174
- console.log('fb pixel');
175
- if (typeof fbq !== "undefined") {
176
- fbq('trackCustom', 'Click to Chat by HoliThemes', {
177
- 'Category': 'Click to Chat for WhatsApp',
178
- 'return_type': 'chat',
179
- 'ID': id,
180
- 'Title': post_title,
181
- 'URL': url
182
- });
 
183
  }
184
- }
185
 
186
- }
187
 
188
- // link - chat
189
- function ht_ctc_link(values) {
190
 
191
- var number = values.getAttribute('data-number');
192
- var pre_filled = values.getAttribute('data-pre_filled');
193
- pre_filled = pre_filled.replace(/\[url]/gi, url);
194
- pre_filled = encodeURIComponent(pre_filled);
195
- var webandapi = values.getAttribute('data-webandapi');
196
 
197
- if ( '' == number ) {
198
- values.innerHTML = values.getAttribute('data-no_number');
199
- return;
200
- }
201
 
202
- // web/api.whatsapp or wa.me
203
- if ( 'webapi' == webandapi ) {
204
- if (is_mobile == 'yes') {
205
- var base_link = 'https://api.whatsapp.com/send';
206
  } else {
207
- var base_link = 'https://web.whatsapp.com/send';
 
208
  }
209
- window.open(base_link + '?phone=' + number + '&text=' + pre_filled, '_blank', 'noopener');
210
- } else {
211
- // wa.me
212
- var base_link = 'https://wa.me/';
213
- window.open(base_link + number + '?text=' + pre_filled, '_blank', 'noopener');
214
  }
215
 
216
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
 
218
  });
219
 
1
  // Click to Chat
2
  (function ($) {
3
 
 
 
4
  // ready
5
  $(function () {
 
 
 
 
 
6
 
7
+ // variables
8
+ var url = window.location.href;
9
+ var post_title = (typeof document.title !== "undefined" ) ? document.title : '';
10
+ // is_mobile yes/no, desktop > 1024
11
+ var is_mobile = (typeof screen.width !== "undefined" && screen.width > 1024) ? "no" : "yes";
12
 
13
+ var ctc = '';
14
+ if ( typeof ht_ctc_chat_var !== "undefined" ) {
15
+ ctc = ht_ctc_chat_var;
16
+ start();
17
+ } else {
18
+ try {
19
+ if ( document.querySelector('.ht-ctc-chat') ) {
20
+ var settings = $('.ht-ctc-chat').attr('data-settings');
21
+ ctc = JSON.parse(settings);
22
+ }
23
+ } catch (e) {
24
+ ctc = {};
25
+ }
26
+ start();
27
+ }
28
+
29
+ // start
30
+ function start() {
31
+
32
+ console.log(ctc);
33
+ $(document).trigger('ht_ctc_ce_settings', [ctc] );
34
 
35
+ // fixed position
36
+ ht_ctc();
37
 
38
+ // shortcode
39
+ shortcode();
 
40
 
41
+ }
 
42
 
 
 
 
43
 
44
+ // fixed position
45
+ function ht_ctc() {
46
+ console.log('ht_ctc');
47
+ var ht_ctc_chat = document.querySelector('.ht-ctc-chat');
48
+ if (ht_ctc_chat) {
49
+
50
+ $(ht_ctc_chat).trigger('ht_ctc_ce_chat');
51
+ // display
52
+ display_settings(ht_ctc_chat);
53
+ // click
54
+ ht_ctc_chat.addEventListener('click', function () {
55
+ // link
56
+ ht_ctc_link(ht_ctc_chat);
57
+ // analytics
58
+ ht_ctc_chat_analytics(ht_ctc_chat);
59
+ });
60
+ }
61
  }
62
 
63
+ // display settings - Fixed position style
64
+ function display_settings(ht_ctc_chat) {
 
 
65
 
66
+ if ('yes' == ctc.schedule) {
67
+ console.log('scheduled');
68
+ $(document).trigger('ht_ctc_display', [ctc, display_chat, ht_ctc_chat ]);
69
+ } else {
70
+ console.log('display directly');
71
+ display_chat(ht_ctc_chat);
72
+ }
73
 
74
+ }
75
+
76
+ // display based on device
77
+ function display_chat(p) {
78
+
79
+ if (is_mobile == 'yes') {
80
+ if ( 'show' == ctc.dis_m ) {
81
+
82
+ // remove desktop style
83
+ var rm = document.querySelector('.ht_ctc_desktop_chat');
84
+ (rm) ? rm.remove() : '';
85
+
86
+ p.style.cssText = ctc.pos_m + ctc.css;
87
+ display(p)
88
  }
 
89
  } else {
90
+ if ( 'show' == ctc.dis_d ) {
91
+
92
+ // remove mobile style
93
+ var rm = document.querySelector('.ht_ctc_mobile_chat');
94
+ (rm) ? rm.remove() : '';
95
+
96
+ p.style.cssText = ctc.pos_d + ctc.css;
97
+ display(p)
98
+ }
99
  }
100
+ }
101
 
102
+ function display(p) {
103
+ // p.style.removeProperty('display');
104
+ // var x = p.style.getPropertyValue("display");
105
+ // p.style.display = "block";
106
+ try {
107
+ $(p).show(parseInt(ctc.se));
108
+ console.log(dt);
109
+ } catch (e) {
110
+ p.style.display = "block";
111
+ }
112
 
113
+ ht_ctc_things(p);
114
+ }
115
 
116
+ // animiation, cta hover effect
117
+ function ht_ctc_things(p) {
118
+ console.log('animations '+ ctc.ani);
119
+ // animations
120
+ setTimeout(function () {
121
+ p.classList.add('ht_ctc_animation', ctc.ani);
122
+ }, 120);
123
+
124
+ // cta hover effects
125
+ $(".ht-ctc-chat").hover(function () {
126
+ $('.ht-ctc-chat .ht-ctc-cta-hover').show(120);
127
+ }, function () {
128
+ $('.ht-ctc-chat .ht-ctc-cta-hover').hide(100);
129
+ });
130
+ }
131
 
132
+ // analytics
133
+ function ht_ctc_chat_analytics(values) {
 
 
 
134
 
135
+ console.log('analytics');
 
 
136
 
137
+ $(document).trigger('ht_ctc_analytics');
 
 
 
 
 
 
 
138
 
139
+ // global number (fixed, user created elememt)
140
+ var id = ctc.number;
 
141
 
142
+ // if its shortcode
143
+ if (values.classList.contains('ht-ctc-sc')) {
144
+ // shortcode number
145
+ id = values.getAttribute('data-number');
146
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
147
 
148
+ // Google Analytics
149
+ var ga_category = 'Click to Chat for WhatsApp';
150
+ var ga_action = 'chat: ' + id;
151
+ var ga_label = post_title + ', ' + url;
152
+ // if ga_enabled
153
+ if ( 'yes' == ctc.ga ) {
154
+ if (typeof gtag !== "undefined") {
155
+ console.log('gtag');
156
+ gtag('event', ga_action, {
157
+ 'event_category': ga_category,
158
+ 'event_label': ga_label,
159
+ });
160
+ } else if (typeof ga !== "undefined" && typeof ga.getAll !== "undefined") {
161
+ console.log('ga');
162
+ var tracker = ga.getAll();
163
+ tracker[0].send("event", ga_category, ga_action, ga_label);
164
+ // ga('send', 'event', ga_category, ga_action, ga_label);
165
+ } else if (typeof __gaTracker !== "undefined") {
166
+ __gaTracker('send', 'event', ga_category, ga_action, ga_label);
167
+ }
168
+ }
169
+
170
+ // dataLayer
171
+ if (typeof dataLayer !== "undefined") {
172
+ console.log('dataLayer');
173
+ dataLayer.push({
174
+ 'event': 'Click to Chat',
 
 
 
 
 
 
 
 
 
 
175
  'event_category': ga_category,
176
  'event_label': ga_label,
177
+ 'event_action': ga_action
178
  });
 
 
 
 
 
 
 
179
  }
 
180
 
181
+ // google ads - call conversation code
182
+ if ('yes' == ctc.ads ) {
183
+ console.log('google ads enabled');
184
+ if (typeof gtag_report_conversion !== "undefined") {
185
+ console.log('calling gtag_report_conversion');
186
+ gtag_report_conversion();
187
+ }
188
+ }
 
 
189
 
190
+ // FB Pixel
191
+ if ( 'yes' == ctc.fb ) {
192
+ console.log('fb pixel');
193
+ if (typeof fbq !== "undefined") {
194
+ fbq('trackCustom', 'Click to Chat by HoliThemes', {
195
+ 'Category': 'Click to Chat for WhatsApp',
196
+ 'return_type': 'chat',
197
+ 'ID': id,
198
+ 'Title': post_title,
199
+ 'URL': url
200
+ });
201
+ }
202
  }
 
203
 
204
+ }
205
 
206
+ // link - chat
207
+ function ht_ctc_link(values) {
208
 
209
+ var number = ctc.number;
210
+ var pre_filled = ctc.pre_filled;
211
+ pre_filled = pre_filled.replace(/\[url]/gi, url);
212
+ pre_filled = encodeURIComponent(pre_filled);
 
213
 
214
+ if ( '' == number ) {
215
+ values.innerHTML = values.getAttribute('data-no_number');
216
+ return;
217
+ }
218
 
219
+ // web/api.whatsapp or wa.me
220
+ if ( 'webapi' == ctc.webandapi && is_mobile !== 'yes' ) {
221
+ // web.whatsapp - if web api is enabled and is not mobile
222
+ window.open('https://web.whatsapp.com/send' + '?phone=' + number + '&text=' + pre_filled, '_blank', 'noopener');
223
  } else {
224
+ // wa.me
225
+ window.open('https://wa.me/' + number + '?text=' + pre_filled, '_blank', 'noopener');
226
  }
227
+
 
 
 
 
228
  }
229
 
230
+ // shortcode
231
+ function shortcode() {
232
+ // shortcode - click
233
+ $(document).on('click', '.ht-ctc-sc-chat', function () {
234
+
235
+ var number = this.getAttribute('data-number');
236
+ var pre_filled = this.getAttribute('data-pre_filled');
237
+ pre_filled = pre_filled.replace(/\[url]/gi, url);
238
+ pre_filled = encodeURIComponent(pre_filled);
239
+ var webandapi = this.getAttribute('data-webandapi');
240
+
241
+ // web/api.whatsapp or wa.me
242
+ if ('webapi' == webandapi) {
243
+ if (is_mobile == 'yes') {
244
+ var base_link = 'https://api.whatsapp.com/send';
245
+ } else {
246
+ var base_link = 'https://web.whatsapp.com/send';
247
+ }
248
+ window.open(base_link + '?phone=' + number + '&text=' + pre_filled, '_blank', 'noopener');
249
+ } else {
250
+ // wa.me
251
+ var base_link = 'https://wa.me/';
252
+ window.open(base_link + number + '?text=' + pre_filled, '_blank', 'noopener');
253
+ }
254
+
255
+ // analytics
256
+ ht_ctc_chat_analytics(this);
257
+ });
258
+ }
259
 
260
  });
261
 
new/inc/assets/js/dev/app.test.js CHANGED
@@ -1,81 +1,97 @@
1
  !function(h) {
2
  h(function() {
3
- var t, e, a, n, o, i = window.location.href, c = void 0 !== document.title ? document.title : "", r = void 0 !== screen.width && 1024 < screen.width ? "no" : "yes";
4
- function d(e) {
 
 
 
5
  try {
6
- var t = parseInt(e.getAttribute("data-show_effect"));
7
- h(e).show(t)
8
  } catch (t) {
9
- e.style.display = "block"
10
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  try {
12
- n = (a = e).getAttribute("data-an_type"),
13
- setTimeout(function() {
14
- a.classList.add("ht_ctc_animation", n)
15
- }, 120),
16
- h(".ht-ctc-chat").hover(function() {
17
- h(".ht-ctc-chat .ht-ctc-cta-hover").show(120)
18
- }, function() {
19
- h(".ht-ctc-chat .ht-ctc-cta-hover").hide(100)
20
- })
21
- } catch (t) {}
22
- var a, n
 
 
 
23
  }
24
  function s(t) {
25
- var e = t.getAttribute("data-number")
26
- , a = "Click to Chat for WhatsApp"
27
- , n = "chat: " + e
28
- , o = c + ", " + i;
29
- "yes" == t.getAttribute("data-is_ga_enable") && ("undefined" != typeof gtag ? gtag("event", n, {
30
- event_category: a,
31
- event_label: o
32
- }) : "undefined" != typeof ga && void 0 !== ga.getAll ? ga.getAll()[0].send("event", a, n, o) : "undefined" != typeof __gaTracker && __gaTracker("send", "event", a, n, o)),
 
 
33
  "undefined" != typeof dataLayer && dataLayer.push({
34
  event: "Click to Chat",
35
- event_category: a,
36
- event_label: o,
37
- event_action: n
38
  }),
39
- "yes" == t.getAttribute("data-is_fb_pixel") && "undefined" != typeof fbq && fbq("trackCustom", "Click to Chat by HoliThemes", {
 
40
  Category: "Click to Chat for WhatsApp",
41
  return_type: "chat",
42
  ID: e,
43
- Title: c,
44
- URL: i
45
  })
46
  }
47
- (o = document.querySelector(".ht-ctc-chat")) && (t = o,
48
- "yes" == r ? "show" == t.getAttribute("data-display_mobile") && ((n = document.querySelector(".ht_ctc_desktop_chat")) && n.remove(),
49
- a = t.getAttribute("data-css"),
50
- e = t.getAttribute("data-position_mobile"),
51
- t.style.cssText = e + a,
52
- d(t)) : "show" == t.getAttribute("data-display_desktop") && ((n = document.querySelector(".ht_ctc_mobile_chat")) && n.remove(),
53
- a = t.getAttribute("data-css"),
54
- n = t.getAttribute("data-position"),
55
- t.style.cssText = n + a,
56
- d(t)),
57
- o.addEventListener("click", function() {
58
- !function(t) {
59
- var e = t.getAttribute("data-number")
60
- , a = t.getAttribute("data-pre_filled");
61
- a = a.replace(/\[url]/gi, i),
62
- a = encodeURIComponent(a);
63
- var n, o = t.getAttribute("data-webandapi");
64
- if ("" == e)
65
- return t.innerHTML = t.getAttribute("data-no_number");
66
- "webapi" == o ? (n = "yes" == r ? "https://api.whatsapp.com/send" : "https://web.whatsapp.com/send",
67
- window.open(n + "?phone=" + e + "&text=" + a, "_blank", "noopener")) : (n = "https://wa.me/",
68
- window.open(n + e + "?text=" + a, "_blank", "noopener"))
69
- }(o),
70
- s(o)
71
- })),
72
- h(document).on("click", ".ht-ctc-sc-chat", function() {
73
- var t, e = this.getAttribute("data-number"), a = (a = this.getAttribute("data-pre_filled")).replace(/\[url]/gi, i);
74
- a = encodeURIComponent(a),
75
- "webapi" == this.getAttribute("data-webandapi") ? (t = "yes" == r ? "https://api.whatsapp.com/send" : "https://web.whatsapp.com/send",
76
- window.open(t + "?phone=" + e + "&text=" + a, "_blank", "noopener")) : (t = "https://wa.me/",
77
- window.open(t + e + "?text=" + a, "_blank", "noopener")),
78
- s(this)
79
- })
80
  })
81
  }(jQuery);
1
  !function(h) {
2
  h(function() {
3
+ var t, a = window.location.href, o = void 0 !== document.title ? document.title : "", i = void 0 !== screen.width && 1024 < screen.width ? "no" : "yes", r = "";
4
+ if ("undefined" != typeof ht_ctc_chat_var)
5
+ r = ht_ctc_chat_var,
6
+ e();
7
+ else {
8
  try {
9
+ document.querySelector(".ht-ctc-chat") && (t = h(".ht-ctc-chat").attr("data-settings"),
10
+ r = JSON.parse(t))
11
  } catch (t) {
12
+ r = {}
13
  }
14
+ e()
15
+ }
16
+ function e() {
17
+ var t;
18
+ h(document).trigger("ht_ctc_ce_settings", [r]),
19
+ (t = document.querySelector(".ht-ctc-chat")) && (h(t).trigger("ht_ctc_ce_chat"),
20
+ function(t) {
21
+ "yes" == r.schedule ? h(document).trigger("ht_ctc_display", [r, n, t]) : n(t)
22
+ }(t),
23
+ t.addEventListener("click", function() {
24
+ !function(t) {
25
+ var e, n = r.number, c = r.pre_filled;
26
+ if (c = c.replace(/\[url]/gi, a),
27
+ c = encodeURIComponent(c),
28
+ "" == n)
29
+ return t.innerHTML = t.getAttribute("data-no_number");
30
+ "webapi" == r.webandapi ? (e = "yes" == i ? "https://api.whatsapp.com/send" : "https://web.whatsapp.com/send",
31
+ window.open(e + "?phone=" + n + "&text=" + c, "_blank", "noopener")) : (e = "https://wa.me/",
32
+ window.open(e + n + "?text=" + c, "_blank", "noopener"))
33
+ }(t),
34
+ s(t)
35
+ })),
36
+ h(document).on("click", ".ht-ctc-sc-chat", function() {
37
+ var t, e = this.getAttribute("data-number"), n = (n = this.getAttribute("data-pre_filled")).replace(/\[url]/gi, a);
38
+ n = encodeURIComponent(n),
39
+ "webapi" == this.getAttribute("data-webandapi") ? (t = "yes" == i ? "https://api.whatsapp.com/send" : "https://web.whatsapp.com/send",
40
+ window.open(t + "?phone=" + e + "&text=" + n, "_blank", "noopener")) : (t = "https://wa.me/",
41
+ window.open(t + e + "?text=" + n, "_blank", "noopener")),
42
+ s(this)
43
+ })
44
+ }
45
+ function n(t) {
46
+ var e;
47
+ "yes" == i ? "show" == r.dis_m && ((e = document.querySelector(".ht_ctc_desktop_chat")) && e.remove(),
48
+ t.style.cssText = r.pos_m + r.css,
49
+ c(t)) : "show" == r.dis_d && ((e = document.querySelector(".ht_ctc_mobile_chat")) && e.remove(),
50
+ t.style.cssText = r.pos_d + r.css,
51
+ c(t))
52
+ }
53
+ function c(e) {
54
  try {
55
+ h(e).show(parseInt(r.se))
56
+ } catch (t) {
57
+ e.style.display = "block"
58
+ }
59
+ var t;
60
+ t = e,
61
+ setTimeout(function() {
62
+ t.classList.add("ht_ctc_animation", r.ani)
63
+ }, 120),
64
+ h(".ht-ctc-chat").hover(function() {
65
+ h(".ht-ctc-chat .ht-ctc-cta-hover").show(120)
66
+ }, function() {
67
+ h(".ht-ctc-chat .ht-ctc-cta-hover").hide(100)
68
+ })
69
  }
70
  function s(t) {
71
+ h(document).trigger("ht_ctc_analytics");
72
+ var e = r.number;
73
+ t.classList.contains("ht-ctc-sc") && (e = t.getAttribute("data-number"));
74
+ var n = "Click to Chat for WhatsApp"
75
+ , c = "chat: " + e
76
+ , t = o + ", " + a;
77
+ "yes" == r.ga && ("undefined" != typeof gtag ? gtag("event", c, {
78
+ event_category: n,
79
+ event_label: t
80
+ }) : "undefined" != typeof ga && void 0 !== ga.getAll ? ga.getAll()[0].send("event", n, c, t) : "undefined" != typeof __gaTracker && __gaTracker("send", "event", n, c, t)),
81
  "undefined" != typeof dataLayer && dataLayer.push({
82
  event: "Click to Chat",
83
+ event_category: n,
84
+ event_label: t,
85
+ event_action: c
86
  }),
87
+ "yes" == r.ads && "undefined" != typeof gtag_report_conversion && gtag_report_conversion(),
88
+ "yes" == r.fb && "undefined" != typeof fbq && fbq("trackCustom", "Click to Chat by HoliThemes", {
89
  Category: "Click to Chat for WhatsApp",
90
  return_type: "chat",
91
  ID: e,
92
+ Title: o,
93
+ URL: a
94
  })
95
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  })
97
  }(jQuery);
new/inc/assets/js/dev/group.dev.js CHANGED
@@ -144,6 +144,15 @@ function group_analytics(values) {
144
  });
145
  }
146
 
 
 
 
 
 
 
 
 
 
147
  // FB Pixel
148
  if ('yes' == values.getAttribute('data-is_fb_pixel')) {
149
  console.log('fb pixel');
144
  });
145
  }
146
 
147
+ // google ads - call conversation code
148
+ if ('yes' == values.getAttribute('data-ga_ads')) {
149
+ console.log('google ads enabled');
150
+ if (typeof gtag_report_conversion !== "undefined") {
151
+ console.log('calling gtag_report_conversion');
152
+ gtag_report_conversion();
153
+ }
154
+ }
155
+
156
  // FB Pixel
157
  if ('yes' == values.getAttribute('data-is_fb_pixel')) {
158
  console.log('fb pixel');
new/inc/assets/js/dev/share.dev.js CHANGED
@@ -143,6 +143,15 @@ function share_analytics(values) {
143
  });
144
  }
145
 
 
 
 
 
 
 
 
 
 
146
  // FB Pixel
147
  if ( 'yes' == values.getAttribute('data-is_fb_pixel') ) {
148
  console.log('fb pixel');
143
  });
144
  }
145
 
146
+ // google ads - call conversation code
147
+ if ('yes' == values.getAttribute('data-ga_ads')) {
148
+ console.log('google ads enabled');
149
+ if (typeof gtag_report_conversion !== "undefined") {
150
+ console.log('calling gtag_report_conversion');
151
+ gtag_report_conversion();
152
+ }
153
+ }
154
+
155
  // FB Pixel
156
  if ( 'yes' == values.getAttribute('data-is_fb_pixel') ) {
157
  console.log('fb pixel');
new/inc/assets/js/group.js CHANGED
@@ -1 +1 @@
1
- !function(s){s(function(){var t,e,a,o,n,i=window.location.href,c=void 0!==screen.width&&1024<screen.width?"no":"yes",r=void 0!==document.title?document.title:"";function d(e){try{var t=parseInt(e.getAttribute("data-show_effect"));s(e).show(t)}catch(t){e.style.display="block"}var a=e.getAttribute("data-an_type");setTimeout(function(){e.classList.add("ht_ctc_animation",a)},120),s(".ht-ctc-group").hover(function(){s(".ht-ctc-group .ht-ctc-cta-hover").show(220)},function(){s(".ht-ctc-group .ht-ctc-cta-hover").hide(100)})}function u(t){var e=t.getAttribute("data-group_id"),a="Click to Chat for WhatsApp",o="group: "+e,n=r+", "+i;"yes"==t.getAttribute("data-is_ga_enable")&&("undefined"!=typeof gtag?gtag("event",o,{event_category:a,event_label:n}):"undefined"!=typeof ga&&void 0!==ga.getAll?ga.getAll()[0].send("event",a,o,n):"undefined"!=typeof __gaTracker&&__gaTracker("send","event",a,o,n)),"undefined"!=typeof dataLayer&&dataLayer.push({event:"Click to Chat",event_category:a,event_label:n,event_action:o}),"yes"==t.getAttribute("data-is_fb_pixel")&&"undefined"!=typeof fbq&&fbq("trackCustom","Click to Chat by HoliThemes",{Category:"Click to Chat for WhatsApp",return_type:"group",ID:e,Title:r,URL:i})}(n=document.querySelector(".ht-ctc-group"))&&(t=n,"yes"==c?"show"==t.getAttribute("data-display_mobile")&&((o=document.querySelector(".ht_ctc_desktop_group"))&&o.remove(),a=t.getAttribute("data-css"),e=t.getAttribute("data-position_mobile"),t.style.cssText=e+a,d(t)):"show"==t.getAttribute("data-display_desktop")&&((o=document.querySelector(".ht_ctc_mobile_group"))&&o.remove(),a=t.getAttribute("data-css"),o=t.getAttribute("data-position"),t.style.cssText=o+a,d(t)),n.addEventListener("click",function(){var t=n.getAttribute("data-group_id");window.open("https://chat.whatsapp.com/"+t,"_blank","noopener"),u(n)})),s(document).on("click",".ht-ctc-sc-group",function(){data_link=this.getAttribute("data-ctc-link"),data_link=encodeURI(data_link),window.open(data_link,"_blank","noopener"),u(this)})})}(jQuery);
1
+ !function(s){s(function(){var t,e,a,o,n,i=window.location.href,c=void 0!==screen.width&&1024<screen.width?"no":"yes",r=void 0!==document.title?document.title:"";function d(e){try{var t=parseInt(e.getAttribute("data-show_effect"));s(e).show(t)}catch(t){e.style.display="block"}var a=e.getAttribute("data-an_type");setTimeout(function(){e.classList.add("ht_ctc_animation",a)},120),s(".ht-ctc-group").hover(function(){s(".ht-ctc-group .ht-ctc-cta-hover").show(220)},function(){s(".ht-ctc-group .ht-ctc-cta-hover").hide(100)})}function u(t){var e=t.getAttribute("data-group_id"),a="Click to Chat for WhatsApp",o="group: "+e,n=r+", "+i;"yes"==t.getAttribute("data-is_ga_enable")&&("undefined"!=typeof gtag?gtag("event",o,{event_category:a,event_label:n}):"undefined"!=typeof ga&&void 0!==ga.getAll?ga.getAll()[0].send("event",a,o,n):"undefined"!=typeof __gaTracker&&__gaTracker("send","event",a,o,n)),"undefined"!=typeof dataLayer&&dataLayer.push({event:"Click to Chat",event_category:a,event_label:n,event_action:o}),"yes"==t.getAttribute("data-ga_ads")&&"undefined"!=typeof gtag_report_conversion&&gtag_report_conversion(),"yes"==t.getAttribute("data-is_fb_pixel")&&"undefined"!=typeof fbq&&fbq("trackCustom","Click to Chat by HoliThemes",{Category:"Click to Chat for WhatsApp",return_type:"group",ID:e,Title:r,URL:i})}(n=document.querySelector(".ht-ctc-group"))&&(t=n,"yes"==c?"show"==t.getAttribute("data-display_mobile")&&((o=document.querySelector(".ht_ctc_desktop_group"))&&o.remove(),a=t.getAttribute("data-css"),e=t.getAttribute("data-position_mobile"),t.style.cssText=e+a,d(t)):"show"==t.getAttribute("data-display_desktop")&&((o=document.querySelector(".ht_ctc_mobile_group"))&&o.remove(),a=t.getAttribute("data-css"),o=t.getAttribute("data-position"),t.style.cssText=o+a,d(t)),n.addEventListener("click",function(){var t=n.getAttribute("data-group_id");window.open("https://chat.whatsapp.com/"+t,"_blank","noopener"),u(n)})),s(document).on("click",".ht-ctc-sc-group",function(){data_link=this.getAttribute("data-ctc-link"),data_link=encodeURI(data_link),window.open(data_link,"_blank","noopener"),u(this)})})}(jQuery);
new/inc/assets/js/share.js CHANGED
@@ -1 +1 @@
1
- !function(h){h(function(){var t,e,a,n,i,o=window.location.href,c=void 0!==screen.width&&1024<screen.width?"no":"yes",r=void 0!==document.title?document.title:"";function s(e){try{var t=parseInt(e.getAttribute("data-show_effect"));h(e).show(t)}catch(t){e.style.display="block"}var a,n;n=(a=e).getAttribute("data-an_type"),setTimeout(function(){a.classList.add("ht_ctc_animation",n)},120),h(".ht-ctc-share").hover(function(){h(".ht-ctc-share .ht-ctc-cta-hover").show(220)},function(){h(".ht-ctc-share .ht-ctc-cta-hover").hide(100)})}function d(t){var e=t.getAttribute("data-share_text"),a="Click to Chat for WhatsApp",n="share: "+e,i=r+", "+o;"yes"==t.getAttribute("data-is_ga_enable")&&("undefined"!=typeof gtag?gtag("event",n,{event_category:a,event_label:i}):"undefined"!=typeof ga&&void 0!==ga.getAll?ga.getAll()[0].send("event",a,n,i):"undefined"!=typeof __gaTracker&&__gaTracker("send","event",a,n,i)),"undefined"!=typeof dataLayer&&dataLayer.push({event:"Click to Chat",event_category:a,event_label:i,event_action:n}),"yes"==t.getAttribute("data-is_fb_pixel")&&"undefined"!=typeof fbq&&fbq("trackCustom","Click to Chat by HoliThemes",{Category:"Click to Chat for WhatsApp",return_type:"share",ID:e,Title:r,URL:o})}(i=document.querySelector(".ht-ctc-share"))&&(t=i,"yes"==c?"show"==t.getAttribute("data-display_mobile")&&((n=document.querySelector(".ht_ctc_desktop_share"))&&n.remove(),a=t.getAttribute("data-css"),e=t.getAttribute("data-position_mobile"),t.style.cssText=e+a,s(t)):"show"==t.getAttribute("data-display_desktop")&&((n=document.querySelector(".ht_ctc_mobile_share"))&&n.remove(),a=t.getAttribute("data-css"),n=t.getAttribute("data-position"),t.style.cssText=n+a,s(t)),i.addEventListener("click",function(){var t;(function(t){var e=t.getAttribute("data-share_text");t="https://"+(t="webapi"==t.getAttribute("data-webandapi")?"yes"==c?"api":"web":"api")+".whatsapp.com/send",window.open(t+"?text="+e,"_blank","noopener")})(t=i),d(t)})),h(document).on("click",".ht-ctc-sc-share",function(){data_link=this.getAttribute("data-ctc-link"),data_link=encodeURI(data_link),window.open(data_link,"_blank","noopener"),d(this)})})}(jQuery);
1
+ !function(h){h(function(){var t,e,a,n,i,o=window.location.href,c=void 0!==screen.width&&1024<screen.width?"no":"yes",r=void 0!==document.title?document.title:"";function s(e){try{var t=parseInt(e.getAttribute("data-show_effect"));h(e).show(t)}catch(t){e.style.display="block"}var a,n;n=(a=e).getAttribute("data-an_type"),setTimeout(function(){a.classList.add("ht_ctc_animation",n)},120),h(".ht-ctc-share").hover(function(){h(".ht-ctc-share .ht-ctc-cta-hover").show(220)},function(){h(".ht-ctc-share .ht-ctc-cta-hover").hide(100)})}function d(t){var e=t.getAttribute("data-share_text"),a="Click to Chat for WhatsApp",n="share: "+e,i=r+", "+o;"yes"==t.getAttribute("data-is_ga_enable")&&("undefined"!=typeof gtag?gtag("event",n,{event_category:a,event_label:i}):"undefined"!=typeof ga&&void 0!==ga.getAll?ga.getAll()[0].send("event",a,n,i):"undefined"!=typeof __gaTracker&&__gaTracker("send","event",a,n,i)),"undefined"!=typeof dataLayer&&dataLayer.push({event:"Click to Chat",event_category:a,event_label:i,event_action:n}),"yes"==t.getAttribute("data-ga_ads")&&"undefined"!=typeof gtag_report_conversion&&gtag_report_conversion(),"yes"==t.getAttribute("data-is_fb_pixel")&&"undefined"!=typeof fbq&&fbq("trackCustom","Click to Chat by HoliThemes",{Category:"Click to Chat for WhatsApp",return_type:"share",ID:e,Title:r,URL:o})}(i=document.querySelector(".ht-ctc-share"))&&(t=i,"yes"==c?"show"==t.getAttribute("data-display_mobile")&&((n=document.querySelector(".ht_ctc_desktop_share"))&&n.remove(),a=t.getAttribute("data-css"),e=t.getAttribute("data-position_mobile"),t.style.cssText=e+a,s(t)):"show"==t.getAttribute("data-display_desktop")&&((n=document.querySelector(".ht_ctc_mobile_share"))&&n.remove(),a=t.getAttribute("data-css"),n=t.getAttribute("data-position"),t.style.cssText=n+a,s(t)),i.addEventListener("click",function(){var t;(function(t){var e=t.getAttribute("data-share_text");t="https://"+(t="webapi"==t.getAttribute("data-webandapi")?"yes"==c?"api":"web":"api")+".whatsapp.com/send",window.open(t+"?text="+e,"_blank","noopener")})(t=i),d(t)})),h(document).on("click",".ht-ctc-sc-share",function(){data_link=this.getAttribute("data-ctc-link"),data_link=encodeURI(data_link),window.open(data_link,"_blank","noopener"),d(this)})})}(jQuery);
new/inc/chat/class-ht-ctc-chat-shortcode.php CHANGED
@@ -24,7 +24,8 @@ class HT_CTC_Chat_Shortcode {
24
  $options = get_option( 'ht_ctc_chat_options' );
25
  $ht_ctc_os = array();
26
 
27
- $number_db = esc_attr( $options['number'] );
 
28
  $call_to_action_db = esc_attr( $options['call_to_action'] );
29
  $pre_filled_db = esc_attr( $options['pre_filled'] );
30
 
@@ -196,6 +197,7 @@ class HT_CTC_Chat_Shortcode {
196
  // analytics
197
  $ht_ctc_os['is_ga_enable'] = 'yes';
198
  $ht_ctc_os['is_fb_pixel'] = 'yes';
 
199
  $ht_ctc_os['data-attributes'] = '';
200
 
201
  // Hooks
@@ -208,13 +210,13 @@ class HT_CTC_Chat_Shortcode {
208
  $sc_path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles-shortcode/sc-style-' . $style. '.php';
209
 
210
  if ( is_file( $sc_path ) ) {
211
- $o .= '<div data-webandapi="'.$webandapi.'" data-number="'.$number.'" data-pre_filled="'.$pre_filled.'" data-return_type="'.$return_type.'" data-style="'.$style.'" data-is_ga_enable="'.$ht_ctc_os['is_ga_enable'].'" data-is_fb_pixel="'.$ht_ctc_os['is_fb_pixel'].'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
212
  include $sc_path;
213
  $o .= '</div>';
214
  } else {
215
  // if style is not in the list..
216
  $img_link = plugins_url("./new/inc/assets/img/whatsapp-logo.svg", HT_CTC_PLUGIN_FILE );
217
- $o .= '<div data-webandapi="'.$webandapi.'" data-number="'.$number.'" data-pre_filled="'.$pre_filled.'" data-return_type="'.$return_type.'" data-is_ga_enable="'.$ht_ctc_os['is_ga_enable'].'" data-is_fb_pixel="'.$ht_ctc_os['is_fb_pixel'].'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
218
  $o .= '<img class="img-icon-sc sc_item pointer style-3-sc" src="'.$img_link.'" alt="'.$call_to_action.'" style="height: 50px; '.$css.' " >';
219
  $o .= '</div>';
220
  }
24
  $options = get_option( 'ht_ctc_chat_options' );
25
  $ht_ctc_os = array();
26
 
27
+ $number_db = (isset($options['number'])) ? esc_attr($options['number']) : '';
28
+
29
  $call_to_action_db = esc_attr( $options['call_to_action'] );
30
  $pre_filled_db = esc_attr( $options['pre_filled'] );
31
 
197
  // analytics
198
  $ht_ctc_os['is_ga_enable'] = 'yes';
199
  $ht_ctc_os['is_fb_pixel'] = 'yes';
200
+ $ht_ctc_os['ga_ads'] = 'no';
201
  $ht_ctc_os['data-attributes'] = '';
202
 
203
  // Hooks
210
  $sc_path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles-shortcode/sc-style-' . $style. '.php';
211
 
212
  if ( is_file( $sc_path ) ) {
213
+ $o .= '<div data-webandapi="'.$webandapi.'" data-number="'.$number.'" data-pre_filled="'.$pre_filled.'" data-return_type="'.$return_type.'" data-style="'.$style.'" data-is_ga_enable="'.$ht_ctc_os['is_ga_enable'].'" data-is_fb_pixel="'.$ht_ctc_os['is_fb_pixel'].'" data-ga_ads="'.$ht_ctc_os['ga_ads'].'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
214
  include $sc_path;
215
  $o .= '</div>';
216
  } else {
217
  // if style is not in the list..
218
  $img_link = plugins_url("./new/inc/assets/img/whatsapp-logo.svg", HT_CTC_PLUGIN_FILE );
219
+ $o .= '<div data-webandapi="'.$webandapi.'" data-number="'.$number.'" data-pre_filled="'.$pre_filled.'" data-return_type="'.$return_type.'" data-is_ga_enable="'.$ht_ctc_os['is_ga_enable'].'" data-is_fb_pixel="'.$ht_ctc_os['is_fb_pixel'].'" data-ga_ads="'.$ht_ctc_os['ga_ads'].'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
220
  $o .= '<img class="img-icon-sc sc_item pointer style-3-sc" src="'.$img_link.'" alt="'.$call_to_action.'" style="height: 50px; '.$css.' " >';
221
  $o .= '</div>';
222
  }
new/inc/chat/class-ht-ctc-chat.php CHANGED
@@ -19,21 +19,19 @@ class HT_CTC_Chat {
19
 
20
  // If db values are not correct
21
  if ( !is_array($options) || !isset($options['number']) ) {
22
-
23
  // in debug mode
24
  if ( isset($othersettings['debug_mode']) ) {
25
  ?>
26
  <script>console.log('please check plugin settings and save changes')</script>
27
  <?php
28
  }
29
-
30
  return;
31
  }
32
 
33
-
34
 
35
  $ht_ctc_chat = array();
36
  $ht_ctc_os = array();
 
37
 
38
  $page_id = get_the_ID();
39
  $page_url = get_permalink();
@@ -42,23 +40,6 @@ class HT_CTC_Chat {
42
  // page level
43
  $ht_ctc_pagelevel = get_post_meta( $page_id, 'ht_ctc_pagelevel', true );
44
 
45
- /**
46
- * show/hide
47
- *
48
- * $page_display - page level settings - show/hide/ null
49
- * $display - global settings
50
- */
51
- $page_display = (isset($ht_ctc_pagelevel['show_hide'])) ? esc_attr($ht_ctc_pagelevel['show_hide']) : '';
52
-
53
- if ( 'show' !== $page_display ) {
54
- include HT_CTC_PLUGIN_DIR .'new/inc/commons/show-hide.php';
55
- // 'no' == $display - hided from global settings
56
- // 'hide' == $page_display - hided at page level settings
57
- if ( 'no' == $display || 'hide' == $page_display ) {
58
- return;
59
- }
60
- }
61
-
62
 
63
  // is mobile
64
  $is_mobile = ht_ctc()->device_type->is_mobile();
@@ -72,17 +53,19 @@ class HT_CTC_Chat {
72
  $ht_ctc_chat['position'] = $position;
73
  $ht_ctc_chat['position_mobile'] = $position_mobile;
74
 
75
-
76
- $ht_ctc_chat['number'] = (isset($ht_ctc_pagelevel['number'])) ? esc_attr($ht_ctc_pagelevel['number']) : esc_attr( $options['number'] );
77
- $ht_ctc_chat['number'] = apply_filters( 'wpml_translate_single_string', $ht_ctc_chat['number'], 'Click to Chat for WhatsApp', 'number' );
78
 
79
  // safe side action .. if number not saved in new method
80
- if ( '' == $ht_ctc_chat['number'] ) {
81
  $cc = (isset($options['cc'])) ? esc_attr($options['cc']) : '';
82
  $num = (isset($options['num'])) ? esc_attr($options['num']) : '';
83
- $ht_ctc_chat['number'] = $cc.$num;
84
  }
85
 
 
 
 
86
  // call to action
87
  $ht_ctc_chat['call_to_action'] = (isset($ht_ctc_pagelevel['call_to_action'])) ? esc_attr($ht_ctc_pagelevel['call_to_action']) : __( esc_attr( $options['call_to_action'] ) , 'click-to-chat-for-whatsapp' );
88
  $ht_ctc_chat['call_to_action'] = apply_filters( 'wpml_translate_single_string', $ht_ctc_chat['call_to_action'], 'Click to Chat for WhatsApp', 'call_to_action' );
@@ -106,22 +89,24 @@ class HT_CTC_Chat {
106
  $admin_link = "<a href='$admin_url'>WhatsApp number</a>";
107
 
108
  if ( '' == $ht_ctc_chat['number'] ) {
109
- $no_number = "<p style='background-color: #ffffff; margin:0; border: 1px solid #fbfbfb; padding:7px; border-radius:4px; box-shadow: 5px 10px 8px #888888;'>No WhatsApp Number Found!</p>";
110
  if ( current_user_can('administrator') ) {
111
- $no_number = "<p style='background-color: #ffffff; margin:0; border: 1px solid #fbfbfb; padding:11px; border-radius:4px; box-shadow: 5px 10px 8px #888888;'>No WhatsApp Number Found!<br><small style='color: red;'>Admin Notice:<br></small><small>Add $admin_link at pluign Settings<br>If already added, <strong>clear the Cache</strong> and try.<br>If still an issue, please contact plugin developers</small></p>";
112
-
113
  }
114
  }
115
 
116
  // class names
117
  $ht_ctc_chat['class_names'] = "ht-ctc ht-ctc-chat ctc-analytics ";
118
  $ht_ctc_chat['id'] = "ht-ctc-chat ";
 
 
119
 
120
  $ht_ctc_chat['css'] = "display: none; cursor: pointer; z-index: 99999999;";
121
 
122
  // analytics
123
  $ht_ctc_os['is_ga_enable'] = 'yes';
124
  $ht_ctc_os['is_fb_pixel'] = 'yes';
 
125
  $ht_ctc_os['data-attributes'] = '';
126
  // show effect
127
  $ht_ctc_os['show_effect'] = '';
@@ -129,6 +114,7 @@ class HT_CTC_Chat {
129
  // hooks
130
  $ht_ctc_chat = apply_filters( 'ht_ctc_fh_chat', $ht_ctc_chat );
131
  $ht_ctc_os = apply_filters( 'ht_ctc_fh_os', $ht_ctc_os );
 
132
 
133
  // pre-filled - have to run after filter hook.
134
  $ht_ctc_chat['pre_filled'] = str_replace( array('{{url}}', '{url}', '{{title}}', '{title}', '{{site}}', '{site}' ), array( $page_url, $page_url, $post_title, $post_title, HT_CTC_BLOG_NAME, HT_CTC_BLOG_NAME ), $ht_ctc_chat['pre_filled'] );
@@ -194,19 +180,73 @@ class HT_CTC_Chat {
194
  }
195
  }
196
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
 
198
 
 
199
  if ( is_file( $path ) ) {
200
  do_action('ht_ctc_ah_before_fixed_position');
201
  ?>
202
  <div class="<?php echo $ht_ctc_chat['class_names'] ?>" id="<?php echo $ht_ctc_chat['id'] ?>"
203
  style="<?php echo $display_css ?> <?php echo $default_position ?>"
204
- data-return_type="<?php echo $type ?>"
205
  data-style="<?php echo $ht_ctc_chat['style'] ?>"
206
  data-number="<?php echo $ht_ctc_chat['number'] ?>"
207
  data-pre_filled="<?php echo $ht_ctc_chat['pre_filled'] ?>"
208
  data-is_ga_enable="<?php echo $ht_ctc_os['is_ga_enable'] ?>"
209
  data-is_fb_pixel="<?php echo $ht_ctc_os['is_fb_pixel'] ?>"
 
210
  data-webandapi="<?php echo $ht_ctc_chat['webandapi'] ?>"
211
  data-display_mobile="<?php echo $ht_ctc_chat['display_mobile'] ?>"
212
  data-display_desktop="<?php echo $ht_ctc_chat['display_desktop'] ?>"
@@ -215,6 +255,7 @@ class HT_CTC_Chat {
215
  data-position_mobile="<?php echo $ht_ctc_chat['position_mobile'] ?>"
216
  data-show_effect="<?php echo $ht_ctc_os['show_effect'] ?>"
217
  data-no_number="<?php echo $no_number ?>"
 
218
  <?php echo $ht_ctc_os['data-attributes'] ?>
219
  <?php echo $on ?>
220
  >
19
 
20
  // If db values are not correct
21
  if ( !is_array($options) || !isset($options['number']) ) {
 
22
  // in debug mode
23
  if ( isset($othersettings['debug_mode']) ) {
24
  ?>
25
  <script>console.log('please check plugin settings and save changes')</script>
26
  <?php
27
  }
 
28
  return;
29
  }
30
 
 
31
 
32
  $ht_ctc_chat = array();
33
  $ht_ctc_os = array();
34
+ $ht_ctc_settings = array();
35
 
36
  $page_id = get_the_ID();
37
  $page_url = get_permalink();
40
  // page level
41
  $ht_ctc_pagelevel = get_post_meta( $page_id, 'ht_ctc_pagelevel', true );
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
  // is mobile
45
  $is_mobile = ht_ctc()->device_type->is_mobile();
53
  $ht_ctc_chat['position'] = $position;
54
  $ht_ctc_chat['position_mobile'] = $position_mobile;
55
 
56
+ // number
57
+ $number = (isset($options['number'])) ? esc_attr($options['number']) : '';
 
58
 
59
  // safe side action .. if number not saved in new method
60
+ if ( '' == $number ) {
61
  $cc = (isset($options['cc'])) ? esc_attr($options['cc']) : '';
62
  $num = (isset($options['num'])) ? esc_attr($options['num']) : '';
63
+ $number = $cc.$num;
64
  }
65
 
66
+ $ht_ctc_chat['number'] = (isset($ht_ctc_pagelevel['number'])) ? esc_attr($ht_ctc_pagelevel['number']) : $number;
67
+ $ht_ctc_chat['number'] = apply_filters( 'wpml_translate_single_string', $ht_ctc_chat['number'], 'Click to Chat for WhatsApp', 'number' );
68
+
69
  // call to action
70
  $ht_ctc_chat['call_to_action'] = (isset($ht_ctc_pagelevel['call_to_action'])) ? esc_attr($ht_ctc_pagelevel['call_to_action']) : __( esc_attr( $options['call_to_action'] ) , 'click-to-chat-for-whatsapp' );
71
  $ht_ctc_chat['call_to_action'] = apply_filters( 'wpml_translate_single_string', $ht_ctc_chat['call_to_action'], 'Click to Chat for WhatsApp', 'call_to_action' );
89
  $admin_link = "<a href='$admin_url'>WhatsApp number</a>";
90
 
91
  if ( '' == $ht_ctc_chat['number'] ) {
92
+ $no_number = "<p style='background-color:#ffffff; margin:0; border:1px solid #fbfbfb; padding:7px; border-radius:4px; box-shadow:5px 10px 8px #888888;'>No WhatsApp Number Found!</p>";
93
  if ( current_user_can('administrator') ) {
94
+ $no_number = "<p style='background-color:#ffffff; margin:0; border:1px solid #fbfbfb; padding:11px; border-radius:4px; box-shadow:5px 10px 8px #888888;'>No WhatsApp Number Found!<br><small style='color:red;'>Admin Notice:<br></small><small>Add $admin_link at pluign Settings<br>If already added, <strong>clear the Cache</strong> and try.<br>If still an issue, please contact plugin developers</small></p>";
 
95
  }
96
  }
97
 
98
  // class names
99
  $ht_ctc_chat['class_names'] = "ht-ctc ht-ctc-chat ctc-analytics ";
100
  $ht_ctc_chat['id'] = "ht-ctc-chat ";
101
+ // schedule
102
+ $ht_ctc_chat['schedule'] = 'no';
103
 
104
  $ht_ctc_chat['css'] = "display: none; cursor: pointer; z-index: 99999999;";
105
 
106
  // analytics
107
  $ht_ctc_os['is_ga_enable'] = 'yes';
108
  $ht_ctc_os['is_fb_pixel'] = 'yes';
109
+ $ht_ctc_os['ga_ads'] = 'no';
110
  $ht_ctc_os['data-attributes'] = '';
111
  // show effect
112
  $ht_ctc_os['show_effect'] = '';
114
  // hooks
115
  $ht_ctc_chat = apply_filters( 'ht_ctc_fh_chat', $ht_ctc_chat );
116
  $ht_ctc_os = apply_filters( 'ht_ctc_fh_os', $ht_ctc_os );
117
+ $ht_ctc_settings = apply_filters( 'ht_ctc_fh_settings', $ht_ctc_settings );
118
 
119
  // pre-filled - have to run after filter hook.
120
  $ht_ctc_chat['pre_filled'] = str_replace( array('{{url}}', '{url}', '{{title}}', '{title}', '{{site}}', '{site}' ), array( $page_url, $page_url, $post_title, $post_title, HT_CTC_BLOG_NAME, HT_CTC_BLOG_NAME ), $ht_ctc_chat['pre_filled'] );
180
  }
181
  }
182
 
183
+
184
+ /**
185
+ * ctc
186
+ *
187
+ * v - plugin version
188
+ */
189
+ $ctc = array(
190
+
191
+ 'number' => $ht_ctc_chat['number'],
192
+ 'pre_filled' => $ht_ctc_chat['pre_filled'],
193
+ 'dis_m' => $ht_ctc_chat['display_mobile'],
194
+ 'dis_d' => $ht_ctc_chat['display_desktop'],
195
+ 'css' => $ht_ctc_chat['css'],
196
+ 'pos_d' => $ht_ctc_chat['position'],
197
+ 'pos_m' => $ht_ctc_chat['position_mobile'],
198
+ 'webandapi' => $ht_ctc_chat['webandapi'],
199
+
200
+ 'schedule' => $ht_ctc_chat['schedule'],
201
+
202
+ 'ga' => $ht_ctc_os['is_ga_enable'],
203
+ 'fb' => $ht_ctc_os['is_fb_pixel'],
204
+ 'ads' => $ht_ctc_os['ga_ads'],
205
+ 'se' => $ht_ctc_os['show_effect'],
206
+ 'ani' => $ht_ctc_os['an_type'],
207
+
208
+ 'v' => $ht_ctc_os['v'],
209
+ );
210
+
211
+ $ctc = apply_filters( 'ht_ctc_fh_ctc', $ctc );
212
+
213
+ // data-attribute - data-settings
214
+ $ht_ctc_settings = htmlspecialchars(json_encode($ctc), ENT_QUOTES, 'UTF-8');
215
+ // localize script - ht_ctc_chat_var
216
+ wp_localize_script( 'ht_ctc_app_js', 'ht_ctc_chat_var', $ctc );
217
+
218
+
219
+ /**
220
+ * show/hide
221
+ *
222
+ * $page_display - page level settings - show/hide/ null
223
+ * $display - global display settings - changes at - show-hide.php
224
+ */
225
+ $display = '';
226
+ $page_display = (isset($ht_ctc_pagelevel['show_hide'])) ? esc_attr($ht_ctc_pagelevel['show_hide']) : '';
227
+
228
+ if ( 'show' !== $page_display ) {
229
+ include HT_CTC_PLUGIN_DIR .'new/inc/commons/show-hide.php';
230
+ // 'no' == $display - hided from global settings
231
+ // 'hide' == $page_display - hided at page level settings
232
+ if ( 'no' == $display || 'hide' == $page_display ) {
233
+ return;
234
+ }
235
+ }
236
 
237
 
238
+ // load style
239
  if ( is_file( $path ) ) {
240
  do_action('ht_ctc_ah_before_fixed_position');
241
  ?>
242
  <div class="<?php echo $ht_ctc_chat['class_names'] ?>" id="<?php echo $ht_ctc_chat['id'] ?>"
243
  style="<?php echo $display_css ?> <?php echo $default_position ?>"
 
244
  data-style="<?php echo $ht_ctc_chat['style'] ?>"
245
  data-number="<?php echo $ht_ctc_chat['number'] ?>"
246
  data-pre_filled="<?php echo $ht_ctc_chat['pre_filled'] ?>"
247
  data-is_ga_enable="<?php echo $ht_ctc_os['is_ga_enable'] ?>"
248
  data-is_fb_pixel="<?php echo $ht_ctc_os['is_fb_pixel'] ?>"
249
+ data-ga_ads="<?php echo $ht_ctc_os['ga_ads'] ?>"
250
  data-webandapi="<?php echo $ht_ctc_chat['webandapi'] ?>"
251
  data-display_mobile="<?php echo $ht_ctc_chat['display_mobile'] ?>"
252
  data-display_desktop="<?php echo $ht_ctc_chat['display_desktop'] ?>"
255
  data-position_mobile="<?php echo $ht_ctc_chat['position_mobile'] ?>"
256
  data-show_effect="<?php echo $ht_ctc_os['show_effect'] ?>"
257
  data-no_number="<?php echo $no_number ?>"
258
+ data-settings="<?php echo $ht_ctc_settings ?>"
259
  <?php echo $ht_ctc_os['data-attributes'] ?>
260
  <?php echo $on ?>
261
  >
new/inc/commons/class-ht-ctc-hooks.php CHANGED
@@ -103,16 +103,23 @@ class HT_CTC_Hooks {
103
  $ht_ctc_os['show_effect'] = (isset($othersettings['show_effect'])) ? esc_attr($othersettings['show_effect']) : '';
104
  $ht_ctc_os['is_ga_enable'] = (isset( $othersettings['google_analytics'] )) ? 'yes' : 'no';
105
  $ht_ctc_os['is_fb_pixel'] = (isset( $othersettings['fb_pixel'] )) ? 'yes' : 'no';
 
 
 
 
 
106
 
107
  // show effect ? if 'From Corner' - then return time (from center - this->css_styles() handles)
108
  if ( 'From Corner' == $ht_ctc_os['show_effect'] ) {
109
  $ht_ctc_os['show_effect'] = 120;
110
- }
111
 
112
  // Animations
 
113
  $an_type = ( isset( $othersettings['an_type']) ) ? esc_attr( $othersettings['an_type'] ) : 'no-animation';
114
  if ( 'no-animation' !== $an_type ) {
115
  $ht_ctc_os['data-attributes'] .= "data-an_type='ht_ctc_an_$an_type' ";
 
116
  }
117
 
118
  return $ht_ctc_os;
103
  $ht_ctc_os['show_effect'] = (isset($othersettings['show_effect'])) ? esc_attr($othersettings['show_effect']) : '';
104
  $ht_ctc_os['is_ga_enable'] = (isset( $othersettings['google_analytics'] )) ? 'yes' : 'no';
105
  $ht_ctc_os['is_fb_pixel'] = (isset( $othersettings['fb_pixel'] )) ? 'yes' : 'no';
106
+ $ht_ctc_os['ga_ads'] = (isset( $othersettings['ga_ads'] )) ? 'yes' : 'no';
107
+
108
+ // version number
109
+ $ht_ctc_os['v'] = HT_CTC_VERSION;
110
+
111
 
112
  // show effect ? if 'From Corner' - then return time (from center - this->css_styles() handles)
113
  if ( 'From Corner' == $ht_ctc_os['show_effect'] ) {
114
  $ht_ctc_os['show_effect'] = 120;
115
+ }
116
 
117
  // Animations
118
+ $ht_ctc_os['an_type'] = "no-animations";
119
  $an_type = ( isset( $othersettings['an_type']) ) ? esc_attr( $othersettings['an_type'] ) : 'no-animation';
120
  if ( 'no-animation' !== $an_type ) {
121
  $ht_ctc_os['data-attributes'] .= "data-an_type='ht_ctc_an_$an_type' ";
122
+ $ht_ctc_os['an_type'] = "ht_ctc_an_$an_type";
123
  }
124
 
125
  return $ht_ctc_os;
new/inc/commons/class-ht-ctc-scripts.php CHANGED
@@ -37,6 +37,8 @@ class HT_CTC_Scripts {
37
  $share_js = 'dev/share.dev.js';
38
  }
39
 
 
 
40
  // app.js for all (chat)
41
  wp_enqueue_script( 'ht_ctc_app_js', plugins_url( "new/inc/assets/js/$js", HT_CTC_PLUGIN_FILE ), array ( 'jquery' ), HT_CTC_VERSION, $load_app_js_bottom );
42
 
@@ -51,6 +53,7 @@ class HT_CTC_Scripts {
51
  wp_enqueue_script( 'ht_ctc_share_js', plugins_url( "new/inc/assets/js/$share_js", HT_CTC_PLUGIN_FILE ), array ( 'jquery', 'ht_ctc_app_js' ), HT_CTC_VERSION, $load_app_js_bottom );
52
  }
53
 
 
54
 
55
  }
56
 
37
  $share_js = 'dev/share.dev.js';
38
  }
39
 
40
+ do_action('ht_ctc_ah_scripts_start');
41
+
42
  // app.js for all (chat)
43
  wp_enqueue_script( 'ht_ctc_app_js', plugins_url( "new/inc/assets/js/$js", HT_CTC_PLUGIN_FILE ), array ( 'jquery' ), HT_CTC_VERSION, $load_app_js_bottom );
44
 
53
  wp_enqueue_script( 'ht_ctc_share_js', plugins_url( "new/inc/assets/js/$share_js", HT_CTC_PLUGIN_FILE ), array ( 'jquery', 'ht_ctc_app_js' ), HT_CTC_VERSION, $load_app_js_bottom );
54
  }
55
 
56
+ do_action('ht_ctc_ah_scripts_end');
57
 
58
  }
59
 
new/inc/group/class-ht-ctc-group-shortcode.php CHANGED
@@ -142,6 +142,7 @@ class HT_CTC_Group_Shortcode {
142
  // analytics
143
  $ht_ctc_os['is_ga_enable'] = 'yes';
144
  $ht_ctc_os['is_fb_pixel'] = 'yes';
 
145
  $ht_ctc_os['data-attributes'] = '';
146
 
147
  // Hooks
@@ -154,13 +155,13 @@ class HT_CTC_Group_Shortcode {
154
  $sc_path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles-shortcode/sc-style-' . $style. '.php';
155
 
156
  if ( is_file( $sc_path ) ) {
157
- $o .= '<div data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-group_id="'.$group_id.'" data-is_ga_enable="'.$ht_ctc_os['is_ga_enable'].'" data-is_fb_pixel="'.$ht_ctc_os['is_fb_pixel'].'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
158
  include $sc_path;
159
  $o .= '</div>';
160
  } else {
161
  // if style is not in the list..
162
  $img_link = plugins_url("./new/inc/assets/img/whatsapp-logo.svg", HT_CTC_PLUGIN_FILE );
163
- $o .= '<div data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-is_ga_enable="'.$ht_ctc_os['is_ga_enable'].'" data-is_fb_pixel="'.$ht_ctc_os['is_fb_pixel'].'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
164
  $o .= '<img class="img-icon-sc sc_item pointer style-3-sc" src="'.$img_link.'" alt="'.$call_to_action.'" style="height: 50px; '.$css.' " >';
165
  $o .= '</div>';
166
  }
142
  // analytics
143
  $ht_ctc_os['is_ga_enable'] = 'yes';
144
  $ht_ctc_os['is_fb_pixel'] = 'yes';
145
+ $ht_ctc_os['ga_ads'] = 'no';
146
  $ht_ctc_os['data-attributes'] = '';
147
 
148
  // Hooks
155
  $sc_path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles-shortcode/sc-style-' . $style. '.php';
156
 
157
  if ( is_file( $sc_path ) ) {
158
+ $o .= '<div data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-group_id="'.$group_id.'" data-is_ga_enable="'.$ht_ctc_os['is_ga_enable'].'" data-is_fb_pixel="'.$ht_ctc_os['is_fb_pixel'].'" data-ga_ads="'.$ht_ctc_os['ga_ads'].'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
159
  include $sc_path;
160
  $o .= '</div>';
161
  } else {
162
  // if style is not in the list..
163
  $img_link = plugins_url("./new/inc/assets/img/whatsapp-logo.svg", HT_CTC_PLUGIN_FILE );
164
+ $o .= '<div data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-is_ga_enable="'.$ht_ctc_os['is_ga_enable'].'" data-is_fb_pixel="'.$ht_ctc_os['is_fb_pixel'].'" data-ga_ads="'.$ht_ctc_os['ga_ads'].'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
165
  $o .= '<img class="img-icon-sc sc_item pointer style-3-sc" src="'.$img_link.'" alt="'.$call_to_action.'" style="height: 50px; '.$css.' " >';
166
  $o .= '</div>';
167
  }
new/inc/group/class-ht-ctc-group.php CHANGED
@@ -84,6 +84,7 @@ class HT_CTC_Group {
84
  // analytics
85
  $ht_ctc_os['is_ga_enable'] = 'yes';
86
  $ht_ctc_os['is_fb_pixel'] = 'yes';
 
87
  $ht_ctc_os['data-attributes'] = '';
88
  // show effect
89
  $ht_ctc_os['show_effect'] = '';
@@ -129,6 +130,7 @@ class HT_CTC_Group {
129
  data-group_id="<?php echo $ht_ctc_group['group_id'] ?>"
130
  data-is_ga_enable="<?php echo $ht_ctc_os['is_ga_enable'] ?>"
131
  data-is_fb_pixel="<?php echo $ht_ctc_os['is_fb_pixel'] ?>"
 
132
  data-display_mobile="<?php echo $ht_ctc_group['display_mobile'] ?>"
133
  data-display_desktop="<?php echo $ht_ctc_group['display_desktop'] ?>"
134
  data-css="<?php echo $ht_ctc_group['css'] ?>"
84
  // analytics
85
  $ht_ctc_os['is_ga_enable'] = 'yes';
86
  $ht_ctc_os['is_fb_pixel'] = 'yes';
87
+ $ht_ctc_os['ga_ads'] = 'no';
88
  $ht_ctc_os['data-attributes'] = '';
89
  // show effect
90
  $ht_ctc_os['show_effect'] = '';
130
  data-group_id="<?php echo $ht_ctc_group['group_id'] ?>"
131
  data-is_ga_enable="<?php echo $ht_ctc_os['is_ga_enable'] ?>"
132
  data-is_fb_pixel="<?php echo $ht_ctc_os['is_fb_pixel'] ?>"
133
+ data-ga_ads="<?php echo $ht_ctc_os['ga_ads'] ?>"
134
  data-display_mobile="<?php echo $ht_ctc_group['display_mobile'] ?>"
135
  data-display_desktop="<?php echo $ht_ctc_group['display_desktop'] ?>"
136
  data-css="<?php echo $ht_ctc_group['css'] ?>"
new/inc/share/class-ht-ctc-share-shortcode.php CHANGED
@@ -163,6 +163,7 @@ class HT_CTC_Share_Shortcode {
163
  // analytics
164
  $ht_ctc_os['is_ga_enable'] = 'yes';
165
  $ht_ctc_os['is_fb_pixel'] = 'yes';
 
166
  $ht_ctc_os['data-attributes'] = '';
167
 
168
  // Hooks
@@ -175,13 +176,13 @@ class HT_CTC_Share_Shortcode {
175
  $sc_path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles-shortcode/sc-style-' . $style. '.php';
176
 
177
  if ( is_file( $sc_path ) ) {
178
- $o .= '<div data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-share_text="'.$share_text.'" data-is_ga_enable="'.$ht_ctc_os['is_ga_enable'].'" data-is_fb_pixel="'.$ht_ctc_os['is_fb_pixel'].'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
179
  include $sc_path;
180
  $o .= '</div>';
181
  } else {
182
  // if style is not in the list..
183
  $img_link = plugins_url("./new/inc/assets/img/whatsapp-logo.svg", HT_CTC_PLUGIN_FILE );
184
- $o .= '<div data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-is_ga_enable="'.$ht_ctc_os['is_ga_enable'].'" data-is_fb_pixel="'.$ht_ctc_os['is_fb_pixel'].'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
185
  $o .= '<img class="img-icon-sc sc_item pointer style-3-sc" src="'.$img_link.'" alt="'.$call_to_action.'" style="height: 50px; '.$css.' " >';
186
  $o .= '</div>';
187
  }
163
  // analytics
164
  $ht_ctc_os['is_ga_enable'] = 'yes';
165
  $ht_ctc_os['is_fb_pixel'] = 'yes';
166
+ $ht_ctc_os['ga_ads'] = 'no';
167
  $ht_ctc_os['data-attributes'] = '';
168
 
169
  // Hooks
176
  $sc_path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles-shortcode/sc-style-' . $style. '.php';
177
 
178
  if ( is_file( $sc_path ) ) {
179
+ $o .= '<div data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-share_text="'.$share_text.'" data-is_ga_enable="'.$ht_ctc_os['is_ga_enable'].'" data-is_fb_pixel="'.$ht_ctc_os['is_fb_pixel'].'" data-ga_ads="'.$ht_ctc_os['ga_ads'].'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
180
  include $sc_path;
181
  $o .= '</div>';
182
  } else {
183
  // if style is not in the list..
184
  $img_link = plugins_url("./new/inc/assets/img/whatsapp-logo.svg", HT_CTC_PLUGIN_FILE );
185
+ $o .= '<div data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-is_ga_enable="'.$ht_ctc_os['is_ga_enable'].'" data-is_fb_pixel="'.$ht_ctc_os['is_fb_pixel'].'" data-ga_ads="'.$ht_ctc_os['ga_ads'].'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
186
  $o .= '<img class="img-icon-sc sc_item pointer style-3-sc" src="'.$img_link.'" alt="'.$call_to_action.'" style="height: 50px; '.$css.' " >';
187
  $o .= '</div>';
188
  }
new/inc/share/class-ht-ctc-share.php CHANGED
@@ -99,6 +99,7 @@ class HT_CTC_Share {
99
  // analytics
100
  $ht_ctc_os['is_ga_enable'] = 'yes';
101
  $ht_ctc_os['is_fb_pixel'] = 'yes';
 
102
  $ht_ctc_os['data-attributes'] = '';
103
  // show effect
104
  $ht_ctc_os['show_effect'] = '';
@@ -144,6 +145,7 @@ class HT_CTC_Share {
144
  data-share_text="<?php echo $ht_ctc_share['share_text'] ?>"
145
  data-is_ga_enable="<?php echo $ht_ctc_os['is_ga_enable'] ?>"
146
  data-is_fb_pixel="<?php echo $ht_ctc_os['is_fb_pixel'] ?>"
 
147
  data-webandapi="<?php echo $ht_ctc_share['webandapi'] ?>"
148
  data-display_mobile="<?php echo $ht_ctc_share['display_mobile'] ?>"
149
  data-display_desktop="<?php echo $ht_ctc_share['display_desktop'] ?>"
99
  // analytics
100
  $ht_ctc_os['is_ga_enable'] = 'yes';
101
  $ht_ctc_os['is_fb_pixel'] = 'yes';
102
+ $ht_ctc_os['ga_ads'] = 'no';
103
  $ht_ctc_os['data-attributes'] = '';
104
  // show effect
105
  $ht_ctc_os['show_effect'] = '';
145
  data-share_text="<?php echo $ht_ctc_share['share_text'] ?>"
146
  data-is_ga_enable="<?php echo $ht_ctc_os['is_ga_enable'] ?>"
147
  data-is_fb_pixel="<?php echo $ht_ctc_os['is_fb_pixel'] ?>"
148
+ data-ga_ads="<?php echo $ht_ctc_os['ga_ads'] ?>"
149
  data-webandapi="<?php echo $ht_ctc_share['webandapi'] ?>"
150
  data-display_mobile="<?php echo $ht_ctc_share['display_mobile'] ?>"
151
  data-display_desktop="<?php echo $ht_ctc_share['display_desktop'] ?>"
new/inc/styles-shortcode/sc-style-3_1.php CHANGED
@@ -52,7 +52,7 @@ $o .= '</style>';
52
 
53
  $s3_extend = '';
54
  $s3_extend .= '
55
- <div title="'.$call_to_action.'" class="ht_ctc_padding" style="'.$s3_extend_css.' display:inline-block;">
56
  '.$style_3_extend_svg.'
57
  </div>
58
  ';
52
 
53
  $s3_extend = '';
54
  $s3_extend .= '
55
+ <div title="'.$call_to_action.'" class="ctc-analytics ht_ctc_padding" style="'.$s3_extend_css.' display:inline-block;">
56
  '.$style_3_extend_svg.'
57
  </div>
58
  ';
new/inc/styles-shortcode/sc-style-7.php CHANGED
@@ -63,7 +63,7 @@ $o .= '.ht-ctc-sc.sc-style-7:hover .ctc_s_7_icon_padding{background-color:'.$s7_
63
  $o .= '</style>';
64
 
65
  $o .= '
66
- <div '.$title.' class="ctc_s_7" style="'.$s7_n1_styles.'">
67
  <p class="ctc_s_7_cta ctc-analytics '.$s7_cta_class.'" style="'.$s7_cta_css.'">'.$call_to_action.'</p>
68
  <div class="ctc_s_7_icon_padding ctc-analytics " style="'.$s7_icon_css.'">
69
  '.$style_7_svg.'
63
  $o .= '</style>';
64
 
65
  $o .= '
66
+ <div '.$title.' class="ctc_s_7 ctc-analytics" style="'.$s7_n1_styles.'">
67
  <p class="ctc_s_7_cta ctc-analytics '.$s7_cta_class.'" style="'.$s7_cta_css.'">'.$call_to_action.'</p>
68
  <div class="ctc_s_7_icon_padding ctc-analytics " style="'.$s7_icon_css.'">
69
  '.$style_7_svg.'
new/inc/styles-shortcode/sc-style-7_1.php CHANGED
@@ -53,7 +53,7 @@ $o .= '.ht-ctc-sc.sc-style-7_1:hover .ctc_s_7_1{background-color:'.$s7_bgcolor_h
53
  $o .= '</style>';
54
 
55
  $o .= '
56
- <div class="ctc_s_7_1" style="'.$s7_n1_styles.'">
57
  <p class="ctc_s_7_1_cta ctc-analytics '.$s7_cta_class.'" style="'.$s7_cta_css.'">'.$call_to_action.'</p>
58
  <div class="ctc_s_7_icon_padding ctc-analytics " style="'.$s7_icon_padding_css.'">
59
  '.$style_7_1_svg.'
53
  $o .= '</style>';
54
 
55
  $o .= '
56
+ <div class="ctc_s_7_1 ctc-analytics" style="'.$s7_n1_styles.'">
57
  <p class="ctc_s_7_1_cta ctc-analytics '.$s7_cta_class.'" style="'.$s7_cta_css.'">'.$call_to_action.'</p>
58
  <div class="ctc_s_7_icon_padding ctc-analytics " style="'.$s7_icon_padding_css.'">
59
  '.$style_7_1_svg.'
new/inc/styles-shortcode/sc-style-99.php CHANGED
@@ -51,5 +51,5 @@ if ( '' == $s99_own_image ) {
51
 
52
 
53
  $o .= '
54
- <img class="own-img" title="'.$call_to_action.'" id="style-99" src="'.$s99_own_image.'" style="'.$s99_img_css.'" alt="'.$call_to_action.'">
55
  ';
51
 
52
 
53
  $o .= '
54
+ <img class="own-img ctc-analytics" title="'.$call_to_action.'" id="style-99" src="'.$s99_own_image.'" style="'.$s99_img_css.'" alt="'.$call_to_action.'">
55
  ';
new/inc/styles/style-2.php CHANGED
@@ -57,7 +57,7 @@ $ht_ctc_svg_css = "pointer-events:none; display:block; height:$img_size; width:$
57
 
58
  include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
59
  ?>
60
- <div <?php echo $title ?> style="<?php echo $s2_css; ?>">
61
- <p class="<?php echo $s2_cta_class ?>" style="<?php echo $s2_cta_css ?>"><?php echo $call_to_action; ?></p>
62
  <?php echo ht_ctc_style_2_svg( $img_size, $type, $ht_ctc_svg_css ); ?>
63
  </div>
57
 
58
  include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
59
  ?>
60
+ <div <?php echo $title ?> style="<?php echo $s2_css; ?>" class="ctc-analytics">
61
+ <p class="ctc-analytics <?php echo $s2_cta_class ?>" style="<?php echo $s2_cta_css ?>"><?php echo $call_to_action; ?></p>
62
  <?php echo ht_ctc_style_2_svg( $img_size, $type, $ht_ctc_svg_css ); ?>
63
  </div>
new/inc/styles/style-3.php CHANGED
@@ -60,6 +60,6 @@ include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
60
 
61
  ?>
62
  <div <?php echo $title ?> style="<?php echo $s3_css ?>">
63
- <p class="<?php echo $s3_cta_class ?>" style="<?php echo $s3_cta_css ?>"><?php echo $call_to_action; ?></p>
64
  <?php echo ht_ctc_style_3_svg( $img_size, $type, $ht_ctc_svg_css ); ?>
65
  </div>
60
 
61
  ?>
62
  <div <?php echo $title ?> style="<?php echo $s3_css ?>">
63
+ <p class="ctc-analytics <?php echo $s3_cta_class ?>" style="<?php echo $s3_cta_css ?>"><?php echo $call_to_action; ?></p>
64
  <?php echo ht_ctc_style_3_svg( $img_size, $type, $ht_ctc_svg_css ); ?>
65
  </div>
new/inc/styles/style-3_1.php CHANGED
@@ -84,8 +84,8 @@ $others = array(
84
  </style>
85
 
86
  <div <?php echo $title ?> style="<?php echo $s3_1_css ?>">
87
- <p class="<?php echo $s3_1_cta_class ?>" style="<?php echo $s3_1_cta_css ?>"><?php echo $call_to_action ?></p>
88
- <div class="ht_ctc_padding" style="<?php echo $s3_1_extend_css ?>">
89
  <?php echo ht_ctc_style_3_1_svg( $img_size, $type, $ht_ctc_svg_css, $others ); ?>
90
  </div>
91
  </div>
84
  </style>
85
 
86
  <div <?php echo $title ?> style="<?php echo $s3_1_css ?>">
87
+ <p class="ctc-analytics <?php echo $s3_1_cta_class ?>" style="<?php echo $s3_1_cta_css ?>"><?php echo $call_to_action ?></p>
88
+ <div class="ctc-analytics ht_ctc_padding" style="<?php echo $s3_1_extend_css ?>">
89
  <?php echo ht_ctc_style_3_1_svg( $img_size, $type, $ht_ctc_svg_css, $others ); ?>
90
  </div>
91
  </div>
new/inc/styles/style-7.php CHANGED
@@ -75,7 +75,7 @@ include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
75
  <?php echo $s7_hover_icon_styles ?>
76
  </style>
77
 
78
- <div <?php echo $title ?> class="ctc_s_7" style="<?php echo $s7_n1_styles; ?>">
79
  <p class="ctc_s_7_cta ctc-analytics <?php echo $s7_cta_class ?>" style="<?php echo $s7_cta_css ?>"><?php echo $call_to_action; ?></p>
80
  <div class="ctc_s_7_icon_padding ctc-analytics " style="<?php echo $s7_icon_css ?>">
81
  <?php echo ht_ctc_singlecolor( $s7_svg_attrs ); ?>
75
  <?php echo $s7_hover_icon_styles ?>
76
  </style>
77
 
78
+ <div <?php echo $title ?> class="ctc_s_7 ctc-analytics" style="<?php echo $s7_n1_styles; ?>">
79
  <p class="ctc_s_7_cta ctc-analytics <?php echo $s7_cta_class ?>" style="<?php echo $s7_cta_css ?>"><?php echo $call_to_action; ?></p>
80
  <div class="ctc_s_7_icon_padding ctc-analytics " style="<?php echo $s7_icon_css ?>">
81
  <?php echo ht_ctc_singlecolor( $s7_svg_attrs ); ?>
new/inc/styles/style-7_1.php CHANGED
@@ -94,7 +94,7 @@ include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
94
  <?php echo $s7_hover_styles ?>
95
  </style>
96
 
97
- <div class="ctc_s_7_1" style="<?php echo $s7_n1_styles; ?>">
98
  <p class="ctc_s_7_1_cta ctc-analytics <?php echo $s7_cta_class ?>" style="<?php echo $s7_cta_css ?>"><?php echo $call_to_action; ?></p>
99
  <div class="ctc_s_7_icon_padding ctc-analytics " style="<?php echo $s7_icon_padding_css ?>">
100
  <?php echo ht_ctc_singlecolor( $s7_svg_attrs ); ?>
94
  <?php echo $s7_hover_styles ?>
95
  </style>
96
 
97
+ <div class="ctc_s_7_1 ctc-analytics" style="<?php echo $s7_n1_styles; ?>">
98
  <p class="ctc_s_7_1_cta ctc-analytics <?php echo $s7_cta_class ?>" style="<?php echo $s7_cta_css ?>"><?php echo $call_to_action; ?></p>
99
  <div class="ctc_s_7_icon_padding ctc-analytics " style="<?php echo $s7_icon_padding_css ?>">
100
  <?php echo ht_ctc_singlecolor( $s7_svg_attrs ); ?>
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Click to Chat ===
2
  Requires at least: 4.6
3
- Tested up to: 5.6.2
4
  Requires PHP: 5.6
5
  Contributors: holithemes
6
- Stable tag: 3.2.7
7
  Tags: whatsapp, whatsapp business, click to chat, whatsapp chat, whatsapp support, whatsapp group, whatsapp message, social chat, whatsapp wordpress, whatsapp floating button, whatsapp icon, holithemes
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -60,7 +60,7 @@ Variables to change values dynamically
60
 
61
  With these variables, we can understand from which page the user started WhatsApp chat.
62
 
63
- [Pre-filled Message](https://holithemes.com/plugins/click-to-chat/pre-filled-message/)
64
 
65
  = 🎁 WooCommerce =
66
 
@@ -79,15 +79,17 @@ Additional, variables for WooCommerce to change values dynamically
79
 
80
  (while editing the post, at the right side bar 'Click to Chat' metabox)
81
 
82
- [Page level settings](https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/)
83
 
84
  = 📈 Analytics =
85
 
86
  Creates an Event when the user clicks on the WhatsApp Icon/button.
87
 
88
- [Google Analytics](https://holithemes.com/plugins/click-to-chat/google-analytics/)
89
 
90
- [Facebook Pixel](https://holithemes.com/plugins/click-to-chat/facebook-pixel/)
 
 
91
 
92
  = 🌈 Eight Styles + own Image =
93
 
@@ -103,9 +105,9 @@ Creates an Event when the user clicks on the WhatsApp Icon/button.
103
  1. **Style-8:** Button with text, icon
104
  1. **Style-99:** Own Image / GIF / Animated image
105
 
106
- [list of Styles](https://holithemes.com/plugins/click-to-chat/list-of-styles/)
107
 
108
- ✏️ [Styles are customizable](https://holithemes.com/plugins/click-to-chat/customize-styles/)
109
 
110
  = 🔆 Localization =
111
 
@@ -117,7 +119,7 @@ Easy to setup different values for each language
117
  * Call to Action
118
  * Pre-filled message
119
 
120
- Setup for [WPML](https://holithemes.com/plugins/click-to-chat/translate-click-to-chat-settings-using-wpml-plugin/), [Polylang](https://holithemes.com/plugins/click-to-chat/translate-click-to-chat-settings-using-polylang-plugin/)
121
 
122
  = 🚀 Performance =
123
 
@@ -125,7 +127,7 @@ Rich in features but the frontend of the site content is very light weight.
125
 
126
  We highly concentrate on performance.
127
 
128
- = 👓 Show/Hide =
129
 
130
  Show or Hide styles based on Post type, Post ID, Category, Device Type(Mobile, Desktop).
131
 
@@ -143,7 +145,7 @@ To change the WhatsApp number use 'number' attribute
143
 
144
  [ht-ctc-chat number=915123456789]
145
 
146
- [Shortcodes for Chat](https://holithemes.com/plugins/click-to-chat/shortcodes-chat/)
147
 
148
 
149
  == Group ==
@@ -152,13 +154,13 @@ Enable Group chat feature and add WhatsApp Group id in the plugin setting page.
152
 
153
  Make it easy for your customers to join your Whatsapp Group.
154
 
155
- [Group](https://holithemes.com/plugins/click-to-chat/group-chat-feature/)
156
 
157
  == Share ==
158
 
159
  Let users share your website with their WhatsApp contacts and get more leads.
160
 
161
- [Share](https://holithemes.com/plugins/click-to-chat/share-feature/)
162
 
163
  = Help Translate The Plugin =
164
 
@@ -217,7 +219,7 @@ country code +1
217
  number: 6123456789
218
  ** WhatsApp number: 16123456789 **
219
 
220
- [https://holithemes.com/plugins/click-to-chat/whatsapp-number/](https://holithemes.com/plugins/click-to-chat/whatsapp-number/)
221
 
222
 
223
  = Pre-filled Message =
@@ -299,7 +301,7 @@ right: 10px
299
 
300
  Plugin supports all CSS units as suffix. (px, %, rem,...)
301
 
302
- [position to place](https://holithemes.com/plugins/click-to-chat/position-to-place/)
303
 
304
  = Localization - WPML, Polylang =
305
 
@@ -323,7 +325,7 @@ E.g.
323
 
324
  [ht-ctc-chat number=915123456789]
325
 
326
- [Shortcodes for Chat](https://holithemes.com/plugins/click-to-chat/shortcodes-chat/)
327
 
328
  = GDPR =
329
 
@@ -331,19 +333,19 @@ E.g.
331
 
332
  = Show/Hide on Selected pages/devices =
333
 
334
- [Show only on selected pages](https://holithemes.com/plugins/click-to-chat/show-only-on-selected-pages/)
335
 
336
- [Hide only on selected pages](https://holithemes.com/plugins/click-to-chat/hide-only-on-selected-pages/)
337
 
338
- [Show/Hide on Mobile/Desktop](https://holithemes.com/plugins/click-to-chat/show-hide-on-mobile-desktop/)
339
 
340
  = WhatsApp Group Invite/chat =
341
 
342
- [Enable Group Feature](https://holithemes.com/plugins/click-to-chat/enable-group-feature/) Add [WhatsApp group id](https://holithemes.com/plugins/click-to-chat/find-whatsapp-group-id/) at plugin settings page. and let user join in WhatsApp Group.
343
 
344
  = WhatsApp Share =
345
 
346
- [Enable Share feature](https://holithemes.com/plugins/click-to-chat/enable-share-feature/) and let users share your website easily.
347
 
348
  Add variables to change values dynamically
349
  {url} -> Web page URL
@@ -354,6 +356,10 @@ Share Text - E.g.
354
 
355
  > Checkout this Awesome page {title}, {url}
356
 
 
 
 
 
357
  = 🔧 Basic Troubleshooting =
358
 
359
  * Clear cache
@@ -366,11 +372,13 @@ For any queries, please contact us.
366
 
367
  For any issues with the plugin / suggestions:
368
 
369
- * please create a [new topic](https://wordpress.org/support/plugin/click-to-chat-for-whatsapp/)
370
 
371
- * 📧 ctc@holithemes.com
372
 
373
- * [WhatsApp us](http://api.whatsapp.com/send?phone=919494429789&text=Hi%20HoliThemes,%20I%20have%20a%20question:)
 
 
374
 
375
  = ⭐️ Give Support =
376
 
@@ -397,6 +405,15 @@ After Activate the plugin, add WhatsApp Number at plugin settings.
397
 
398
  == Changelog ==
399
 
 
 
 
 
 
 
 
 
 
400
  = 3.2.7 =
401
  * Enhancement: WhatsApp Number field. (country code and Number)
402
  * Enhancement: Change Settings at page level. (Click to Chat - Meta box)
1
  === Click to Chat ===
2
  Requires at least: 4.6
3
+ Tested up to: 5.7
4
  Requires PHP: 5.6
5
  Contributors: holithemes
6
+ Stable tag: 3.2.9
7
  Tags: whatsapp, whatsapp business, click to chat, whatsapp chat, whatsapp support, whatsapp group, whatsapp message, social chat, whatsapp wordpress, whatsapp floating button, whatsapp icon, holithemes
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
60
 
61
  With these variables, we can understand from which page the user started WhatsApp chat.
62
 
63
+ [Pre-filled Message](https://holithemes.com/plugins/click-to-chat/pre-filled-message/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
64
 
65
  = 🎁 WooCommerce =
66
 
79
 
80
  (while editing the post, at the right side bar 'Click to Chat' metabox)
81
 
82
+ [Page level settings](https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
83
 
84
  = 📈 Analytics =
85
 
86
  Creates an Event when the user clicks on the WhatsApp Icon/button.
87
 
88
+ [Google Analytics](https://holithemes.com/plugins/click-to-chat/google-analytics/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
89
 
90
+ [Facebook Pixel](https://holithemes.com/plugins/click-to-chat/facebook-pixel/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
91
+
92
+ [Google Ads Conversations](https://holithemes.com/plugins/click-to-chat/google-ads-conversion/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
93
 
94
  = 🌈 Eight Styles + own Image =
95
 
105
  1. **Style-8:** Button with text, icon
106
  1. **Style-99:** Own Image / GIF / Animated image
107
 
108
+ [list of Styles](https://holithemes.com/plugins/click-to-chat/list-of-styles/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
109
 
110
+ ✏️ [Styles are customizable](https://holithemes.com/plugins/click-to-chat/customize-styles/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
111
 
112
  = 🔆 Localization =
113
 
119
  * Call to Action
120
  * Pre-filled message
121
 
122
+ Setup for [WPML](https://holithemes.com/plugins/click-to-chat/translate-click-to-chat-settings-using-wpml-plugin/?utm_source=wp&utm_medium=readme&utm_campaign=ht), [Polylang](https://holithemes.com/plugins/click-to-chat/translate-click-to-chat-settings-using-polylang-plugin/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
123
 
124
  = 🚀 Performance =
125
 
127
 
128
  We highly concentrate on performance.
129
 
130
+ = 👓 Display Settings =
131
 
132
  Show or Hide styles based on Post type, Post ID, Category, Device Type(Mobile, Desktop).
133
 
145
 
146
  [ht-ctc-chat number=915123456789]
147
 
148
+ [Shortcodes for Chat](https://holithemes.com/plugins/click-to-chat/shortcodes-chat/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
149
 
150
 
151
  == Group ==
154
 
155
  Make it easy for your customers to join your Whatsapp Group.
156
 
157
+ [Group](https://holithemes.com/plugins/click-to-chat/group-chat-feature/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
158
 
159
  == Share ==
160
 
161
  Let users share your website with their WhatsApp contacts and get more leads.
162
 
163
+ [Share](https://holithemes.com/plugins/click-to-chat/share-feature/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
164
 
165
  = Help Translate The Plugin =
166
 
219
  number: 6123456789
220
  ** WhatsApp number: 16123456789 **
221
 
222
+ [https://holithemes.com/plugins/click-to-chat/whatsapp-number/?utm_source=wp&utm_medium=readme-faq&utm_campaign=ht](WhatsApp Number)
223
 
224
 
225
  = Pre-filled Message =
301
 
302
  Plugin supports all CSS units as suffix. (px, %, rem,...)
303
 
304
+ [position to place](https://holithemes.com/plugins/click-to-chat/position-to-place/?utm_source=wp&utm_medium=readme-faq&utm_campaign=ht)
305
 
306
  = Localization - WPML, Polylang =
307
 
325
 
326
  [ht-ctc-chat number=915123456789]
327
 
328
+ [Shortcodes for Chat](https://holithemes.com/plugins/click-to-chat/shortcodes-chat/?utm_source=wp&utm_medium=readme-faq&utm_campaign=ht)
329
 
330
  = GDPR =
331
 
333
 
334
  = Show/Hide on Selected pages/devices =
335
 
336
+ [Show only on selected pages](https://holithemes.com/plugins/click-to-chat/show-only-on-selected-pages/?utm_source=wp&utm_medium=readme-faq&utm_campaign=ht)
337
 
338
+ [Hide only on selected pages](https://holithemes.com/plugins/click-to-chat/hide-only-on-selected-pages/?utm_source=wp&utm_medium=readme-faq&utm_campaign=ht)
339
 
340
+ [Show/Hide on Mobile/Desktop](https://holithemes.com/plugins/click-to-chat/show-hide-on-mobile-desktop/?utm_source=wp&utm_medium=readme-faq&utm_campaign=ht)
341
 
342
  = WhatsApp Group Invite/chat =
343
 
344
+ [Enable Group Feature](https://holithemes.com/plugins/click-to-chat/enable-group-feature/?utm_source=wp&utm_medium=readme-faq&utm_campaign=ht) Add [WhatsApp group id](https://holithemes.com/plugins/click-to-chat/find-whatsapp-group-id/?utm_source=wp&utm_medium=readme-faq&utm_campaign=ht) at plugin settings page. and let user join in WhatsApp Group.
345
 
346
  = WhatsApp Share =
347
 
348
+ [Enable Share feature](https://holithemes.com/plugins/click-to-chat/enable-share-feature/?utm_source=wp&utm_medium=readme-faq&utm_campaign=ht) and let users share your website easily.
349
 
350
  Add variables to change values dynamically
351
  {url} -> Web page URL
356
 
357
  > Checkout this Awesome page {title}, {url}
358
 
359
+ = AMP Compatibility =
360
+
361
+ Click to Chat is Compatible with (AMP)[https://wordpress.org/plugins/amp/] plugin. AMP wont load plugins JavaScript file, limited functionality available.
362
+
363
  = 🔧 Basic Troubleshooting =
364
 
365
  * Clear cache
372
 
373
  For any issues with the plugin / suggestions:
374
 
375
+ * 📧 [ctc@holithemes.com](mailto: ctc@holithemes.com)
376
 
377
+ * [WhatsApp](http://api.whatsapp.com/send?phone=919494429789&text=Hi%20HoliThemes,%20I%20have%20a%20question:)
378
 
379
+ * WordPress Support forum for Click to Chat - please create a [new topic](https://wordpress.org/support/plugin/click-to-chat-for-whatsapp/)
380
+
381
+ * [GitHub Discussions](https://github.com/holithemes/ctc/discussions)
382
 
383
  = ⭐️ Give Support =
384
 
405
 
406
  == Changelog ==
407
 
408
+ = 3.2.9 =
409
+ * Performance Improvement
410
+ * Fix: WooCommerce Prefilled Message Muliple lines
411
+ * Removed recommended tools page
412
+
413
+ = 3.2.8 =
414
+ * Google Ads - If enabled, calls gtag_report_conversion.
415
+ * Enhancement: User Interface
416
+
417
  = 3.2.7 =
418
  * Enhancement: WhatsApp Number field. (country code and Number)
419
  * Enhancement: Change Settings at page level. (Click to Chat - Meta box)