Click to Chat for WhatsApp Chat - Version 3.6

Version Description

  • Enchantment: settings pages
Download this release

Release Info

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

Code changes from version 3.5.3 to 3.6

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.5.3
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.5.3' );
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.6
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.6' );
21
  }
22
 
23
  // define HT_CTC_PLUGIN_FILE
new/admin/admin_assets/css/admin.css CHANGED
@@ -45,6 +45,14 @@
45
  padding: 2px 11px;
46
  }
47
 
 
 
 
 
 
 
 
 
48
  .description.ht_ctc_pro_description {
49
  /* border-left: 5px solid yellowgreen; */
50
  border-left: 5px solid lightseagreen;
45
  padding: 2px 11px;
46
  }
47
 
48
+ .click-to-chat_page_click-to-chat-greetings .link-target #wp-link-target {
49
+ opacity: 1 !important;
50
+ }
51
+
52
+ .wp-editor-wrap {
53
+ padding-left: 0.75rem;
54
+ }
55
+
56
  .description.ht_ctc_pro_description {
57
  /* border-left: 5px solid yellowgreen; */
58
  border-left: 5px solid lightseagreen;
new/admin/admin_commons/admin-sidebar-content.php CHANGED
@@ -18,7 +18,9 @@ $othersettings = get_option('ht_ctc_othersettings');
18
  <li class="active">
19
  <div class="collapsible-header"><?php _e( 'Contact Us', 'click-to-chat-for-whatsapp' ); ?></div>
20
  <div class="collapsible-body">
21
- <p class="description"><?php _e( 'For any queries, suggestions', 'click-to-chat-for-whatsapp' ); ?>. <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/support/">Contact Us</a></p>
 
 
22
  </div>
23
  </li>
24
  </ul>
18
  <li class="active">
19
  <div class="collapsible-header"><?php _e( 'Contact Us', 'click-to-chat-for-whatsapp' ); ?></div>
20
  <div class="collapsible-body">
21
+ <p class="description"><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>
22
+ <p class="description"><a href="mailto: ctc@holithemes.com"> ctc@holithemes.com</a></p>
23
+ <!-- <p class="description"><?php _e( 'For any queries, suggestions', 'click-to-chat-for-whatsapp' ); ?>. <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/support/">Contact Us</a></p> -->
24
  </div>
25
  </li>
26
  </ul>
new/admin/admin_commons/class-ht-ctc-admin-hooks.php CHANGED
@@ -241,7 +241,6 @@ class HT_CTC_Admin_Others {
241
 
242
 
243
 
244
-
245
  // clear cache after save settings.
246
  function clear_cache() {
247
 
241
 
242
 
243
 
 
244
  // clear cache after save settings.
245
  function clear_cache() {
246
 
new/admin/class-ht-ctc-admin-customize-styles.php CHANGED
@@ -136,25 +136,46 @@ class HT_CTC_Admin_Customize_Styles {
136
 
137
  register_setting( 'ht_ctc_cs_page_settings_fields', 'ht_ctc_cs_options' , array( $this, 'options_sanitize' ) );
138
 
139
- add_settings_section( 'ht_ctc_cs_settings_sections_add', '', array( $this, 'main_settings_section_cb' ), 'ht_ctc_cs_page_settings_sections_do' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
 
141
- // add_settings_field
142
- foreach ($styles_list as $s) {
143
 
144
- $name = str_replace( 'ht_ctc_s', 'Style ', $s );
145
-
146
- add_settings_field(
147
- $s,
148
- $name,
149
- [$this, "{$s}_cb"],
150
- 'ht_ctc_cs_page_settings_sections_do',
151
- 'ht_ctc_cs_settings_sections_add'
152
- );
153
 
154
- }
 
 
 
 
 
 
 
 
 
 
 
155
 
156
- add_settings_field( 'ht_ctc_cs', '', array( $this, 'ht_ctc_cs_cb' ), 'ht_ctc_cs_page_settings_sections_do', 'ht_ctc_cs_settings_sections_add' );
157
 
 
 
 
158
 
159
  }
160
 
136
 
137
  register_setting( 'ht_ctc_cs_page_settings_fields', 'ht_ctc_cs_options' , array( $this, 'options_sanitize' ) );
138
 
139
+
140
+
141
+ // check for options.php, _GET page = click-to-chat-customize-styles
142
+ $get_url = ( isset($_GET) && isset($_GET['page']) && 'click-to-chat-customize-styles' == $_GET['page'] ) ? true : false;
143
+
144
+ $options_page = false;
145
+ // if request url have options.php .. (or if requesturl is not set.. or empty ) then $options_page = true
146
+ if ( isset($_SERVER['REQUEST_URI']) && !empty($_SERVER['REQUEST_URI']) ) {
147
+ if ( false !== strpos( $_SERVER['REQUEST_URI'], 'options.php' ) ) {
148
+ // if options.php page
149
+ $options_page = true;
150
+ }
151
+ } else {
152
+ $options_page = true;
153
+ }
154
+
155
 
156
+ // if its - options.php page or _GET page = click-to-chat-customize-styles - load settings fields.. (or if request url is not set or empty - no risk)
157
+ if ( true == $options_page || true == $get_url ) {
158
 
159
+ add_settings_section( 'ht_ctc_cs_settings_sections_add', '', array( $this, 'main_settings_section_cb' ), 'ht_ctc_cs_page_settings_sections_do' );
 
 
 
 
 
 
 
 
160
 
161
+ // add_settings_field
162
+ foreach ($styles_list as $s) {
163
+
164
+ $name = str_replace( 'ht_ctc_s', 'Style ', $s );
165
+
166
+ add_settings_field(
167
+ $s,
168
+ $name,
169
+ [$this, "{$s}_cb"],
170
+ 'ht_ctc_cs_page_settings_sections_do',
171
+ 'ht_ctc_cs_settings_sections_add'
172
+ );
173
 
174
+ }
175
 
176
+ add_settings_field( 'ht_ctc_cs', '', array( $this, 'ht_ctc_cs_cb' ), 'ht_ctc_cs_page_settings_sections_do', 'ht_ctc_cs_settings_sections_add' );
177
+
178
+ }
179
 
180
  }
181
 
new/admin/class-ht-ctc-admin-other-settings.php CHANGED
@@ -77,7 +77,7 @@ class HT_CTC_Admin_Other_Settings {
77
  add_settings_field( 'ht_ctc_animations', 'Animations', array( $this, 'ht_ctc_animations_cb' ), 'ht_ctc_os_page_settings_sections_do', 'ht_ctc_os_settings_sections_add' );
78
  add_settings_field( 'ht_ctc_analytics', 'Analytics', array( $this, 'ht_ctc_analytics_cb' ), 'ht_ctc_os_page_settings_sections_do', 'ht_ctc_os_settings_sections_add' );
79
  add_settings_field( 'ht_ctc_webhooks', 'Webhooks', array( $this, 'ht_ctc_webhooks_cb' ), 'ht_ctc_os_page_settings_sections_do', 'ht_ctc_os_settings_sections_add' );
80
- add_settings_field( 'ht_ctc_othersettings', 'Other Settings', array( $this, 'ht_ctc_othersettings_cb' ), 'ht_ctc_os_page_settings_sections_do', 'ht_ctc_os_settings_sections_add' );
81
 
82
  }
83
 
@@ -230,7 +230,7 @@ class HT_CTC_Admin_Other_Settings {
230
  <div class="collapsible-header"><?php _e( 'Webhooks', 'click-to-chat-for-whatsapp' ); ?></div>
231
  <div class="collapsible-body">
232
 
233
- <p class="description" style="margin-bottom: 40px;"><?php _e( 'Integarte, Automation', 'click-to-chat-for-whatsapp' ); ?> <?php _e( 'using', 'click-to-chat-for-whatsapp' ); ?> <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/webhooks/"><?php _e( 'Webhooks', 'click-to-chat-for-whatsapp' ); ?></a></p>
234
 
235
  <!-- Webhook URL -->
236
  <div class="row">
@@ -291,7 +291,7 @@ class HT_CTC_Admin_Other_Settings {
291
  <?php
292
  if ( ! defined( 'HT_CTC_PRO_VERSION' ) ) {
293
  ?>
294
- <p class="description">Webhook Dynamic Varibales - {number}, {url}, {time} - <a href="https://holithemes.com/plugins/click-to-chat/pricing/">PRO</a></p>
295
  <?php
296
  }
297
  ?>
@@ -435,11 +435,11 @@ class HT_CTC_Admin_Other_Settings {
435
  $li_active_gr_sh = ( isset( $options['enable_group'] ) || isset( $options['enable_share'] ) ) ? "class='active'" : '';
436
  ?>
437
 
438
- <p class="description" style="color: red;"><?php _e( 'All this below settings are not important to everyone', 'click-to-chat-for-whatsapp' ); ?></p>
439
 
440
  <ul class="collapsible ht_ctc_other_settings" data-collapsible="accordion" id="ht_ctc_othersettings">
441
  <li class="">
442
- <div class="collapsible-header"><?php _e( 'Other Settings', 'click-to-chat-for-whatsapp' ); ?></div>
443
  <div class="collapsible-body">
444
 
445
  <!-- z-index -->
@@ -556,33 +556,33 @@ class HT_CTC_Admin_Other_Settings {
556
  <div class="collapsible-body">
557
  <?php
558
 
559
- // AMP Compatibility - enabled by default. (if an issue uncheck this..)
560
- // later version remove this option and make enable by default..
561
- // if amp related issue, uncheck this option
 
 
 
 
 
562
  if ( function_exists( 'amp_is_request' ) ) {
563
- if ( isset( $options['amp'] ) ) {
564
- ?>
565
- <p id="amp_compatibility">
566
- <label>
567
- <input name="<?= $dbrow; ?>[amp]" type="checkbox" value="1" <?php checked( $options['amp'], 1 ); ?> id="amp" />
568
- <span><?php _e( 'AMP Compatibility', 'click-to-chat-for-whatsapp' ); ?></span>
569
- </label>
570
- </p>
571
- <?php
572
- } else {
573
- ?>
574
- <p id="amp_compatibility">
575
- <label>
576
- <input name="<?= $dbrow; ?>[amp]" type="checkbox" value="1" id="amp" />
577
- <span><?php _e( 'AMP Compatibility', 'click-to-chat-for-whatsapp' ); ?></span>
578
- </label>
579
- </p>
580
- <?php
581
- }
582
  ?>
583
- <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>
 
 
 
 
 
 
584
  <br>
585
  <?php
 
 
 
 
 
 
 
 
586
  }
587
 
588
  // debug mode
77
  add_settings_field( 'ht_ctc_animations', 'Animations', array( $this, 'ht_ctc_animations_cb' ), 'ht_ctc_os_page_settings_sections_do', 'ht_ctc_os_settings_sections_add' );
78
  add_settings_field( 'ht_ctc_analytics', 'Analytics', array( $this, 'ht_ctc_analytics_cb' ), 'ht_ctc_os_page_settings_sections_do', 'ht_ctc_os_settings_sections_add' );
79
  add_settings_field( 'ht_ctc_webhooks', 'Webhooks', array( $this, 'ht_ctc_webhooks_cb' ), 'ht_ctc_os_page_settings_sections_do', 'ht_ctc_os_settings_sections_add' );
80
+ add_settings_field( 'ht_ctc_othersettings', 'Advanced Settings', array( $this, 'ht_ctc_othersettings_cb' ), 'ht_ctc_os_page_settings_sections_do', 'ht_ctc_os_settings_sections_add' );
81
 
82
  }
83
 
230
  <div class="collapsible-header"><?php _e( 'Webhooks', 'click-to-chat-for-whatsapp' ); ?></div>
231
  <div class="collapsible-body">
232
 
233
+ <p class="description" style="margin-bottom: 40px;"><?php _e( 'Integrate, Automation', 'click-to-chat-for-whatsapp' ); ?> <?php _e( 'using', 'click-to-chat-for-whatsapp' ); ?> <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/webhooks/"><?php _e( 'Webhooks', 'click-to-chat-for-whatsapp' ); ?></a></p>
234
 
235
  <!-- Webhook URL -->
236
  <div class="row">
291
  <?php
292
  if ( ! defined( 'HT_CTC_PRO_VERSION' ) ) {
293
  ?>
294
+ <p class="description">Webhook Dynamic Varibales - {number}, {url}, {time} - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/pricing/">PRO</a></p>
295
  <?php
296
  }
297
  ?>
435
  $li_active_gr_sh = ( isset( $options['enable_group'] ) || isset( $options['enable_share'] ) ) ? "class='active'" : '';
436
  ?>
437
 
438
+ <p class="description"><?php _e( 'All this below settings are not important to everyone', 'click-to-chat-for-whatsapp' ); ?></p>
439
 
440
  <ul class="collapsible ht_ctc_other_settings" data-collapsible="accordion" id="ht_ctc_othersettings">
441
  <li class="">
442
+ <div class="collapsible-header"><?php _e( 'Advanced Settings', 'click-to-chat-for-whatsapp' ); ?></div>
443
  <div class="collapsible-body">
444
 
445
  <!-- z-index -->
556
  <div class="collapsible-body">
557
  <?php
558
 
559
+ /**
560
+ * AMP Compatibility - enabled by default. (if an issue uncheck this..)
561
+ * later version remove this option and make enable by default..
562
+ * if amp related issue, uncheck this option
563
+ */
564
+
565
+ $amp_checkbox = ( isset( $options['amp']) ) ? esc_attr( $options['amp'] ) : '';
566
+
567
  if ( function_exists( 'amp_is_request' ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
568
  ?>
569
+ <p id="amp_compatibility">
570
+ <label>
571
+ <input name="<?= $dbrow; ?>[amp]" type="checkbox" value="1" <?php checked( $amp_checkbox, 1 ); ?> id="amp" />
572
+ <span><?php _e( 'AMP Compatibility', 'click-to-chat-for-whatsapp' ); ?></span>
573
+ </label>
574
+ </p>
575
+ <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> If any issue, uncheck this option and please contact us</p>
576
  <br>
577
  <?php
578
+ } else {
579
+ // if amp is activated after this settings.
580
+ ?>
581
+ <label style="display: none;">
582
+ <input name="<?= $dbrow; ?>[amp]" type="checkbox" value="1" <?php checked( $amp_checkbox, 1 ); ?> id="amp" />
583
+ <span><?php _e( 'AMP Compatibility', 'click-to-chat-for-whatsapp' ); ?></span>
584
+ </label>
585
+ <?php
586
  }
587
 
588
  // debug mode
new/admin/class-ht-ctc-admin-scripts.php CHANGED
@@ -24,7 +24,7 @@ class HT_CTC_Admin_Scripts {
24
  $admin_js = '333.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 || 'click-to-chat_page_click-to-chat-woocommerce' == $hook ) {
28
 
29
  do_action('ht_ctc_ah_admin_scripts_start');
30
 
24
  $admin_js = '333.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 || 'click-to-chat_page_click-to-chat-woocommerce' == $hook || 'click-to-chat_page_click-to-chat-greetings' == $hook ) {
28
 
29
  do_action('ht_ctc_ah_admin_scripts_start');
30
 
new/admin/components/checkbox.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * checkbox
4
+ */
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) exit;
7
+
8
+ $title = (isset($input['title'])) ? esc_attr($input['title']) : '';
9
+
10
+ ?>
11
+ <div class="row">
12
+ <p>
13
+ <label>
14
+ <input name="<?= $dbrow ?>[<?= $db_key ?>]" type="checkbox" value="1" <?php checked( $db_value, 1 ); ?> />
15
+ <span><?= $title ?></span>
16
+ </label>
17
+ </p>
18
+ </div>
19
+ <?php
new/admin/components/collapsible_end.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * collapsible - end code
4
+ *
5
+ */
6
+
7
+ if ( ! defined( 'ABSPATH' ) ) exit;
8
+
9
+ $description = (isset($input['description'])) ? $input['description'] : '';
10
+
11
+ if ('' !== $description) {
12
+ ?>
13
+ <p class="description"><?= $description ?></p>
14
+ <?php
15
+ }
16
+ ?>
17
+
18
+ </div>
19
+ </li>
20
+ <ul>
new/admin/components/collapsible_start.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * collapsible - start code
4
+ *
5
+ */
6
+
7
+ if ( ! defined( 'ABSPATH' ) ) exit;
8
+
9
+ $title = (isset($input['title'])) ? esc_attr($input['title']) : '';
10
+
11
+ $description = (isset($input['description'])) ? $input['description'] : '';
12
+
13
+ if ('' !== $description) {
14
+ ?>
15
+ <p class="description"><?= $description; ?></p>
16
+ <?php
17
+ }
18
+ ?>
19
+
20
+ <ul class="collapsible">
21
+ <li class="active">
22
+ <div class="collapsible-header" id="showhide_settings"><?= $title ?></div>
23
+ <div class="collapsible-body">
new/admin/components/color.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Color
4
+ *
5
+ */
6
+
7
+ if ( ! defined( 'ABSPATH' ) ) exit;
8
+
9
+ $title = (isset($input['title'])) ? $input['title'] : '';
10
+ $default_color = (isset($input['default_color'])) ? $input['default_color'] : '';
11
+
12
+ ?>
13
+ <div class="row">
14
+ <div class="col s6">
15
+ <p><?= $title ?></p>
16
+ </div>
17
+ <div class="input-field col s6">
18
+ <input class="ht-ctc-color" name="<?= $dbrow ?>[<?= $db_key ?>]" data-default-color="<?= $default_color ?>" id="<?= $db_key ?>" value="<?= $db_value ?>" type="text">
19
+ </div>
20
+ </div>
new/admin/components/editor.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <?php
3
+ /**
4
+ * editor
5
+ *
6
+ *
7
+ * $db_value is santized esc_attr - so call db again.. and reassing $db_value
8
+ */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+
12
+ $title = (isset($input['title'])) ? $input['title'] : '';
13
+ $description = (isset($input['description'])) ? $input['description'] : '';
14
+ $label = (isset($input['label'])) ? $input['label'] : '';
15
+ $placeholder = (isset($input['placeholder'])) ? $input['placeholder'] : '';
16
+ $parent_style = (isset($input['parent_style'])) ? $input['parent_style'] : '';
17
+
18
+
19
+ // function ctc_edit_quicktags( $qtInit, $editor_id = 'content' ) {
20
+ // $qtInit['buttons'] = 'strong,code,more,close';
21
+ // return $qtInit;
22
+ // }
23
+ // add_filter( 'quicktags_settings', 'ctc_edit_quicktags', 10, 2 );
24
+
25
+ if ( ! function_exists( 'ctc_tiny_mce_toolbar_settings' ) ) {
26
+ function ctc_tiny_mce_toolbar_settings( $args ) {
27
+ $args['fontsize_formats'] = "6px 8px 10px 12px 13px 14px 15px 16px 18px 20px 24px 28px 32px 36px";
28
+ return $args;
29
+ }
30
+ }
31
+ add_filter( 'tiny_mce_before_init', 'ctc_tiny_mce_toolbar_settings' );
32
+
33
+ if ( ! function_exists( 'ctc_tinymce_add_font_sizes' ) ) {
34
+ function ctc_tinymce_add_font_sizes( $buttons ) {
35
+ array_unshift( $buttons, 'fontselect' );
36
+ array_unshift( $buttons, 'fontsizeselect' );
37
+ return $buttons;
38
+ }
39
+ }
40
+ add_filter( 'mce_buttons_2', 'ctc_tinymce_add_font_sizes' );
41
+
42
+ // db_value call again for editor. and santize using wp_kses
43
+ $db_value = ( isset( $options[$db_key]) ) ? $options[$db_key] : '';
44
+
45
+ if ( '' !== $db_value ) {
46
+ $allowed_html = wp_kses_allowed_html( 'post' );
47
+
48
+ // $allowed_html['iframe'] = array(
49
+ // 'src' => true,
50
+ // 'height' => true,
51
+ // 'width' => true,
52
+ // 'frameborder' => true,
53
+ // 'allowfullscreen' => true,
54
+ // 'title' => true,
55
+ // 'allow' => true,
56
+ // 'autoplay' => true,
57
+ // 'clipboard-write' => true,
58
+ // 'encrypted-media' => true,
59
+ // 'gyroscope' => true,
60
+ // 'picture-in-picture' => true,
61
+ // );
62
+
63
+ $db_value = html_entity_decode(wp_kses($db_value, $allowed_html));
64
+ }
65
+
66
+ ?>
67
+ <div class="row" style="<?= $parent_style ?>">
68
+ <p class="description ht_ctc_subtitle" style="margin-top: 40px;"><?php _e( $title, 'click-to-chat-for-whatsapp' ); ?> </p>
69
+ <?php
70
+
71
+ $content = $db_value;
72
+ $editor_id = $db_key;
73
+ $args = [
74
+ 'textarea_name' => "$dbrow"."[$db_key]",
75
+ 'textarea_rows' => 10,
76
+ 'editor_height' => 250,
77
+ // 'media_buttons' => false,
78
+ 'drag_drop_upload' => true,
79
+ 'tinymce' => array(
80
+ 'textarea_rows'=> 10,
81
+ 'fontsize_formats' => "8px 10px 12px 14px 18px 24px 36px",
82
+ )
83
+ ];
84
+
85
+ wp_editor( $content, $editor_id, $args );
86
+ ?>
87
+ <p class="description"><?= $description ?></p>
88
+ </div>
new/admin/components/empty.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * empty field. hidden type.. useful to save some value in table instead of keeping empty. to prevent some errors
4
+ */
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) exit;
7
+
8
+ $db_value = '1';
9
+ ?>
10
+ <input name="<?= $dbrow ?>[<?= $db_key ?>]" type="text" hidden style="display:none;" value="<?= $db_value ?>"/>
new/admin/components/heading.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * number
4
+ */
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) exit;
7
+
8
+ $title = (isset($input['title'])) ? $input['title'] : '';
9
+ ?>
10
+
11
+ <div class="row">
12
+ <p class="description ht_ctc_subtitle"><?php _e( $title, 'click-to-chat-for-whatsapp' ); ?> </p>
13
+ </div>
new/admin/components/number.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * number
4
+ */
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) exit;
7
+
8
+ $title = (isset($input['title'])) ? esc_attr($input['title']) : '';
9
+ $description = (isset($input['description'])) ? esc_attr($input['description']) : '';
10
+ $label = (isset($input['label'])) ? esc_attr($input['label']) : '';
11
+ $placeholder = (isset($input['placeholder'])) ? esc_attr($input['placeholder']) : '';
12
+
13
+ $min = (isset($input['min'])) ? esc_attr($input['min']) : '';
14
+
15
+ $attr = '';
16
+
17
+ if ('' !== $min) {
18
+ $attr .= " min=$min ";
19
+ }
20
+
21
+ ?>
22
+ <div class="row">
23
+ <div class="input-field col s12">
24
+ <input name="<?= $dbrow ?>[<?= $db_key ?>]" type="number" <?= $attr ?> value="<?= $db_value ?>" placeholder="<?= $placeholder ?>"/>
25
+ <label for="pre_filled"><?= $label ?></label>
26
+ <p class="description"><?= $description ?></p>
27
+ </div>
28
+ </div>
new/admin/components/select.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Color
4
+ *
5
+ *
6
+ * list - is an array of values.. adding direclty..
7
+ * list_cb - get from ht-h-list.php
8
+ */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+
12
+ // todo: improve this .. to not create multiple instance ..
13
+ include_once HT_CTC_PLUGIN_DIR ."new/admin/components/list/ht-ctc-admin-list-greetings-page.php";
14
+ $lists = new HT_CTC_Admin_List_Greetings_Page();
15
+
16
+ $title = (isset($input['title'])) ? $input['title'] : '';
17
+ $description = (isset($input['description'])) ? $input['description'] : '';
18
+
19
+ // list
20
+ if (isset($input['list'])) {
21
+ $list = $input['list'];
22
+ } elseif (isset($input['list_cb'])) {
23
+
24
+ $list_cb = $input['list_cb'];
25
+ // $lists is instance
26
+ $list = $lists->$list_cb();
27
+ }
28
+
29
+ if ( '' !== $title ) {
30
+ ?>
31
+ <p class="description"><?php _e( $title, 'click-to-chat-for-whatsapp' ); ?> </p>
32
+ <?php
33
+ }
34
+
35
+ ?>
36
+ <div class="row">
37
+ <div class="input-field col s12">
38
+ <select name="<?= $dbrow ?>[<?= $db_key ?>]" class="">
39
+ <?php
40
+ foreach ($list as $k => $v) {
41
+ ?>
42
+ <option value="<?= $k ?>" <?= $db_value == $k ? 'SELECTED' : ''; ?> ><?= $v ?></option>
43
+ <?php
44
+ }
45
+ ?>
46
+ </select>
47
+ <p class="description"><?= $description ?></p>
48
+ </div>
49
+ </div>
new/admin/components/space.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * add space / line breaks
4
+ */
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) exit;
7
+
8
+ $type = (isset($input['type'])) ? esc_attr($input['type']) : '';
9
+
10
+ if ('line' == $type) {
11
+ ?>
12
+ <br>
13
+ <?php
14
+ } else if ('margin' == $type) {
15
+
16
+ $margin_bottom = (isset($input['margin_bottom'])) ? "margin-bottom: " . esc_attr($input['margin_bottom']) . ";" : '';
17
+
18
+ ?>
19
+ <span style="display:block; <?= $margin_bottom ?>"></span>
20
+ <?php
21
+ }
new/admin/components/text.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * text
4
+ */
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) exit;
7
+
8
+ $title = (isset($input['title'])) ? $input['title'] : '';
9
+ $description = (isset($input['description'])) ? $input['description'] : '';
10
+ $label = (isset($input['label'])) ? $input['label'] : '';
11
+ $placeholder = (isset($input['placeholder'])) ? $input['placeholder'] : '';
12
+
13
+ ?>
14
+ <div class="row">
15
+ <div class="input-field col s12">
16
+ <input name="<?= $dbrow ?>[<?= $db_key ?>]" type="text" value="<?= $db_value ?>" placeholder="<?= $placeholder ?>"/>
17
+ <label for="pre_filled"><?= $label ?></label>
18
+ <p class="description"><?= $description ?></p>
19
+ </div>
20
+ </div>
new/admin/components/textarea.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * text
4
+ */
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) exit;
7
+
8
+ $title = (isset($input['title'])) ? $input['title'] : '';
9
+ $description = (isset($input['description'])) ? $input['description'] : '';
10
+ $label = (isset($input['label'])) ? $input['label'] : '';
11
+ $placeholder = (isset($input['placeholder'])) ? $input['placeholder'] : '';
12
+
13
+ ?>
14
+ <div class="row">
15
+ <div class="input-field col s12">
16
+ <textarea name="<?= $dbrow ?>[<?= $db_key ?>]" style="min-height: 84px;" placeholder="<?= $placeholder ?>" id="pre_filled" class="materialize-textarea input-margin"><?= $db_value ?></textarea>
17
+ <label for="pre_filled"><?= $label ?></label>
18
+ <p class="description"><?= $description ?></p>
19
+ </div>
20
+ </div>
new/inc/assets/js/332.app.js CHANGED
@@ -1 +1 @@
1
- !function(l){l(function(){var t,o=window.location.href,a=void 0!==document.title?document.title:"",n=void 0!==screen.width&&1024<screen.width?"no":"yes",_="",h="";if("undefined"!=typeof ht_ctc_chat_var)h=ht_ctc_chat_var,e(),c();else{try{document.querySelector(".ht_ctc_chat_data")&&(t=l(".ht_ctc_chat_data").attr("data-settings"),h=JSON.parse(t))}catch(t){h={}}e(),c()}function e(){var t=document.querySelector(".ht_ctc_chat_data");t&&(_=l(".ht_ctc_chat_data").attr("data-no_number"),t.remove())}function c(){var e;l(document).trigger("ht_ctc_ce_settings",[h]),document.dispatchEvent(new CustomEvent("ht_ctc_event_settings",{detail:{ctc:h}})),(e=document.querySelector(".ht-ctc-chat"))&&(l(document).trigger("ht_ctc_ce_chat"),document.dispatchEvent(new CustomEvent("ht_ctc_event_chat")),function(t){"yes"==h.schedule?(l(document).trigger("ht_ctc_ce_display",[h,i,t]),document.dispatchEvent(new CustomEvent("ht_ctc_event_display",{detail:{ctc:h,display_chat:i,ht_ctc_chat:t}}))):i(t)}(e),e.addEventListener("click",function(){l(".ht_ctc_chat_greetings_box_link").length||d(e)}),l(".ht_ctc_chat_greetings_box").length&&l(document).on("click",".ht_ctc_chat_style",function(){l(".ht_ctc_chat_greetings_box").toggle(120)}),l(document).on("click",".ctc_greetings_close_btn",function(t){l(".ht_ctc_chat_greetings_box").hide(120),localStorage.setItem("ht_ctc_chat_greetings_box","user_closed")}),l(document).on("click",".ht_ctc_chat_greetings_box_link",function(t){t.preventDefault(),d(e),document.dispatchEvent(new CustomEvent("ht_ctc_event_greetings"))})),l(document).on("click",".ht-ctc-sc-chat",function(){var t=this.getAttribute("data-number"),e=(e=this.getAttribute("data-pre_filled")).replace(/\[url]/gi,o);e=encodeURIComponent(e),h.web&&"yes"!==n?window.open("https://web.whatsapp.com/send?phone="+t+"&text="+e,"_blank","noopener"):window.open("https://wa.me/"+t+"?text="+e,"_blank","noopener"),r(this),u(t)}),l(document).on("click",".ctc_chat, #ctc_chat",function(t){d(this),l(this).hasClass("ctc_woo_place")&&t.preventDefault()}),l(document).on("click",'[href="#ctc_chat"]',function(t){t.preventDefault(),d(this)})}function i(t){var e;"yes"==n?"show"==h.dis_m&&((e=document.querySelector(".ht_ctc_desktop_chat"))&&e.remove(),t.style.cssText=h.pos_m+h.css,s(t)):"show"==h.dis_d&&((e=document.querySelector(".ht_ctc_mobile_chat"))&&e.remove(),t.style.cssText=h.pos_d+h.css,s(t))}function s(e){try{l(e).show(parseInt(h.se))}catch(t){e.style.display="block"}var t,c;c=l(t=e).hasClass("ht_ctc_entry_animation")?1200:120,setTimeout(function(){t.classList.add("ht_ctc_animation",h.ani)},c),l(".ht-ctc-chat").hover(function(){l(".ht-ctc-chat .ht-ctc-cta-hover").show(120)},function(){l(".ht-ctc-chat .ht-ctc-cta-hover").hide(100)})}function r(t){document.dispatchEvent(new CustomEvent("ht_ctc_event_analytics"));var e=h.number;t.classList.contains("ht-ctc-sc")&&(e=t.getAttribute("data-number"));var c="Click to Chat for WhatsApp",n="chat: "+e,t=a+", "+o;(h.ga||h.ga4)&&("undefined"!=typeof gtag?h.ga4?gtag("event","click to chat",{number:e,title:a,url:o}):gtag("event",n,{event_category:c,event_label:t}):"undefined"!=typeof ga&&void 0!==ga.getAll?ga.getAll()[0].send("event",c,n,t):"undefined"!=typeof __gaTracker&&__gaTracker("send","event",c,n,t)),"undefined"!=typeof dataLayer&&dataLayer.push({event:"Click to Chat",type:"chat",number:e,title:a,url:o,event_category:c,event_label:t,event_action:n}),h.ads&&"undefined"!=typeof gtag_report_conversion&&gtag_report_conversion(),h.fb&&"undefined"!=typeof fbq&&fbq("trackCustom","Click to Chat by HoliThemes",{Category:"Click to Chat for WhatsApp",return_type:"chat",ID:e,Title:a,URL:o})}function d(t){l(document).trigger("ht_ctc_ce_number",[h]),document.dispatchEvent(new CustomEvent("ht_ctc_event_number",{detail:{ctc:h}}));var e=h.number,c=(c=h.pre_filled).replace(/\[url]/gi,o);c=encodeURIComponent(c),""!=e?(h.web&&"yes"!==n?window.open("https://web.whatsapp.com/send?phone="+e+"&text="+c,"_blank","noopener"):window.open("https://wa.me/"+e+"?text="+c,"_blank","noopener"),r(t),u(e)):l(".ht-ctc-chat").html(_)}function u(t){var e,c;h.hook_url&&(e=h.hook_url,c={},h.hook_v&&(c=h.hook_v),l(document).trigger("ht_ctc_ce_hook",[h,t]),document.dispatchEvent(new CustomEvent("ht_ctc_event_hook",{detail:{ctc:h,number:t}})),e=h.hook_url,c=h.hook_v,data=JSON.stringify(c),l.ajax({url:e,type:"POST",mode:"no-cors",data:data,success:function(t){}}))}})}(jQuery);
1
+ !function(f){f(function(){var o=window.location.href,a=void 0!==document.title?document.title:"",n=void 0!==screen.width&&1024<screen.width?"no":"yes",_="",c={};function e(t,e){c[t]=e;e=JSON.stringify(c);localStorage.setItem("ht_ctc_storage",e)}localStorage.getItem("ht_ctc_storage")&&(c=localStorage.getItem("ht_ctc_storage"),c=JSON.parse(c));var t,i="";if("undefined"!=typeof ht_ctc_chat_var)i=ht_ctc_chat_var,s(),r();else{try{document.querySelector(".ht_ctc_chat_data")&&(t=f(".ht_ctc_chat_data").attr("data-settings"),i=JSON.parse(t))}catch(t){i={}}s(),r()}function s(){var t=document.querySelector(".ht_ctc_chat_data");t&&(_=f(".ht_ctc_chat_data").attr("data-no_number"),t.remove())}function r(){var e;document.dispatchEvent(new CustomEvent("ht_ctc_event_settings",{detail:{ctc:i}})),(e=document.querySelector(".ht-ctc-chat"))&&(document.dispatchEvent(new CustomEvent("ht_ctc_event_chat")),function(t){"yes"==i.schedule?document.dispatchEvent(new CustomEvent("ht_ctc_event_display",{detail:{ctc:i,display_chat:l,ht_ctc_chat:t}})):l(t)}(e),e.addEventListener("click",function(){f(".ht_ctc_chat_greetings_box").length||p(e)}),function(){var t;f(".ht_ctc_chat_greetings_box").length&&(t=f(window).height(),t-=t/3,f(".ht_ctc_chat_greetings_box_layout").css({maxHeight:t+"px"}),f(document).on("click",".ht_ctc_chat_style",function(t){(f(".ht_ctc_chat_greetings_box").hasClass("ctc_greetings_opened")?u:d)()})),f(document).on("click",".ctc_greetings_close_btn",function(t){u()})}(),f(document).on("click",".ht_ctc_chat_greetings_box_link",function(t){t.preventDefault(),p(e),document.dispatchEvent(new CustomEvent("ht_ctc_event_greetings"))})),f(document).on("click",".ht-ctc-sc-chat",function(){var t=this.getAttribute("data-number"),e=(e=this.getAttribute("data-pre_filled")).replace(/\[url]/gi,o);e=encodeURIComponent(e),i.web&&"yes"!==n?window.open("https://web.whatsapp.com/send?phone="+t+"&text="+e,"_blank","noopener"):window.open("https://wa.me/"+t+"?text="+e,"_blank","noopener"),v(this),m(t)}),f(document).on("click",".ctc_chat, #ctc_chat",function(t){p(this),f(this).hasClass("ctc_woo_place")&&t.preventDefault()}),f(document).on("click",'[href="#ctc_chat"]',function(t){t.preventDefault(),p(this)})}function h(){if(f(".ht_ctc_chat_greetings_box").length){if(i.g_device){if("yes"!==n&&"mobile"==i.g_device)return void f(".ht_ctc_chat_greetings_box").remove();if("yes"==n&&"desktop"==i.g_device)return void f(".ht_ctc_chat_greetings_box").remove()}document.dispatchEvent(new CustomEvent("ht_ctc_event_after_chat_displayed",{detail:{ctc:i,greetings_open:d,greetings_close:u}})),i.g_init&&"open"==i.g_init&&"user_closed"!==(c["g_user_action"]||!1)&&d("init")}}function d(t){f(".ht_ctc_chat_greetings_box").show(70),f(".ht_ctc_chat_greetings_box").addClass("ctc_greetings_opened").removeClass("ctc_greetings_closed"),e("g_action",t),"user_opened"==t&&e("g_user_action",t)}function u(t="user_closed"){f(".ht_ctc_chat_greetings_box").hide(70),f(".ht_ctc_chat_greetings_box").addClass("ctc_greetings_closed").removeClass("ctc_greetings_opened"),e("g_action",t),"user_closed"==t&&e("g_user_action",t)}function l(t){var e;"yes"==n?"show"==i.dis_m&&((e=document.querySelector(".ht_ctc_desktop_chat"))&&e.remove(),t.style.cssText=i.pos_m+i.css,g(t)):"show"==i.dis_d&&((e=document.querySelector(".ht_ctc_mobile_chat"))&&e.remove(),t.style.cssText=i.pos_d+i.css,g(t))}function g(e){try{f(e).show(parseInt(i.se))}catch(t){e.style.display="block"}var t,c;h(),c=f(t=e).hasClass("ht_ctc_entry_animation")?1200:120,setTimeout(function(){t.classList.add("ht_ctc_animation",i.ani)},c),f(".ht-ctc-chat").hover(function(){f(".ht-ctc-chat .ht-ctc-cta-hover").show(120)},function(){f(".ht-ctc-chat .ht-ctc-cta-hover").hide(100)})}function v(t){document.dispatchEvent(new CustomEvent("ht_ctc_event_analytics"));var e=i.number;t.classList.contains("ht-ctc-sc")&&(e=t.getAttribute("data-number"));var c="Click to Chat for WhatsApp",n="chat: "+e,t=a+", "+o;(i.ga||i.ga4)&&("undefined"!=typeof gtag?i.ga4?gtag("event","click to chat",{number:e,title:a,url:o}):gtag("event",n,{event_category:c,event_label:t}):"undefined"!=typeof ga&&void 0!==ga.getAll?ga.getAll()[0].send("event",c,n,t):"undefined"!=typeof __gaTracker&&__gaTracker("send","event",c,n,t)),"undefined"!=typeof dataLayer&&dataLayer.push({event:"Click to Chat",type:"chat",number:e,title:a,url:o,event_category:c,event_label:t,event_action:n}),i.ads&&"undefined"!=typeof gtag_report_conversion&&gtag_report_conversion(),i.fb&&"undefined"!=typeof fbq&&fbq("trackCustom","Click to Chat by HoliThemes",{Category:"Click to Chat for WhatsApp",return_type:"chat",ID:e,Title:a,URL:o})}function p(t){document.dispatchEvent(new CustomEvent("ht_ctc_event_number",{detail:{ctc:i}}));var e=i.number,c=i.pre_filled;t.hasAttribute("data-number")&&(e=t.getAttribute("data-number")),t.hasAttribute("data-pre_filled")&&(c=t.getAttribute("data-pre_filled")),c=c.replace(/\[url]/gi,o),c=encodeURIComponent(c),""!=e?(i.web&&"yes"!==n?window.open("https://web.whatsapp.com/send?phone="+e+"&text="+c,"_blank","noopener"):window.open("https://wa.me/"+e+"?text="+c,"_blank","noopener"),v(t),m(e)):f(".ht-ctc-chat").html(_)}function m(t){var e,c;i.hook_url&&(e=i.hook_url,c={},i.hook_v&&(c=i.hook_v),document.dispatchEvent(new CustomEvent("ht_ctc_event_hook",{detail:{ctc:i,number:t}})),e=i.hook_url,c=i.hook_v,data=JSON.stringify(c),f.ajax({url:e,type:"POST",mode:"no-cors",data:data,success:function(t){}}))}})}(jQuery);
new/inc/assets/js/app.js CHANGED
@@ -1 +1 @@
1
- !function(l){l(function(){var t,o=window.location.href,a=void 0!==document.title?document.title:"",n=void 0!==screen.width&&1024<screen.width?"no":"yes",_="",h="";if("undefined"!=typeof ht_ctc_chat_var)h=ht_ctc_chat_var,e(),c();else{try{document.querySelector(".ht_ctc_chat_data")&&(t=l(".ht_ctc_chat_data").attr("data-settings"),h=JSON.parse(t))}catch(t){h={}}e(),c()}function e(){var t=document.querySelector(".ht_ctc_chat_data");t&&(_=l(".ht_ctc_chat_data").attr("data-no_number"),t.remove())}function c(){var e;l(document).trigger("ht_ctc_ce_settings",[h]),document.dispatchEvent(new CustomEvent("ht_ctc_event_settings",{detail:{ctc:h}})),(e=document.querySelector(".ht-ctc-chat"))&&(l(document).trigger("ht_ctc_ce_chat"),document.dispatchEvent(new CustomEvent("ht_ctc_event_chat")),function(t){"yes"==h.schedule?(l(document).trigger("ht_ctc_ce_display",[h,i,t]),document.dispatchEvent(new CustomEvent("ht_ctc_event_display",{detail:{ctc:h,display_chat:i,ht_ctc_chat:t}}))):i(t)}(e),e.addEventListener("click",function(){l(".ht_ctc_chat_greetings_box_link").length||d(e)}),l(".ht_ctc_chat_greetings_box").length&&l(document).on("click",".ht_ctc_chat_style",function(){l(".ht_ctc_chat_greetings_box").toggle(120)}),l(document).on("click",".ctc_greetings_close_btn",function(t){l(".ht_ctc_chat_greetings_box").hide(120),localStorage.setItem("ht_ctc_chat_greetings_box","user_closed")}),l(document).on("click",".ht_ctc_chat_greetings_box_link",function(t){t.preventDefault(),d(e),document.dispatchEvent(new CustomEvent("ht_ctc_event_greetings"))})),l(document).on("click",".ht-ctc-sc-chat",function(){var t=this.getAttribute("data-number"),e=(e=this.getAttribute("data-pre_filled")).replace(/\[url]/gi,o);e=encodeURIComponent(e),h.web&&"yes"!==n?window.open("https://web.whatsapp.com/send?phone="+t+"&text="+e,"_blank","noopener"):window.open("https://wa.me/"+t+"?text="+e,"_blank","noopener"),r(this),u(t)}),l(document).on("click",".ctc_chat, #ctc_chat",function(t){d(this),l(this).hasClass("ctc_woo_place")&&t.preventDefault()}),l(document).on("click",'[href="#ctc_chat"]',function(t){t.preventDefault(),d(this)})}function i(t){var e;"yes"==n?"show"==h.dis_m&&((e=document.querySelector(".ht_ctc_desktop_chat"))&&e.remove(),t.style.cssText=h.pos_m+h.css,s(t)):"show"==h.dis_d&&((e=document.querySelector(".ht_ctc_mobile_chat"))&&e.remove(),t.style.cssText=h.pos_d+h.css,s(t))}function s(e){try{l(e).show(parseInt(h.se))}catch(t){e.style.display="block"}var t,c;c=l(t=e).hasClass("ht_ctc_entry_animation")?1200:120,setTimeout(function(){t.classList.add("ht_ctc_animation",h.ani)},c),l(".ht-ctc-chat").hover(function(){l(".ht-ctc-chat .ht-ctc-cta-hover").show(120)},function(){l(".ht-ctc-chat .ht-ctc-cta-hover").hide(100)})}function r(t){document.dispatchEvent(new CustomEvent("ht_ctc_event_analytics"));var e=h.number;t.classList.contains("ht-ctc-sc")&&(e=t.getAttribute("data-number"));var c="Click to Chat for WhatsApp",n="chat: "+e,t=a+", "+o;(h.ga||h.ga4)&&("undefined"!=typeof gtag?h.ga4?gtag("event","click to chat",{number:e,title:a,url:o}):gtag("event",n,{event_category:c,event_label:t}):"undefined"!=typeof ga&&void 0!==ga.getAll?ga.getAll()[0].send("event",c,n,t):"undefined"!=typeof __gaTracker&&__gaTracker("send","event",c,n,t)),"undefined"!=typeof dataLayer&&dataLayer.push({event:"Click to Chat",type:"chat",number:e,title:a,url:o,event_category:c,event_label:t,event_action:n}),h.ads&&"undefined"!=typeof gtag_report_conversion&&gtag_report_conversion(),h.fb&&"undefined"!=typeof fbq&&fbq("trackCustom","Click to Chat by HoliThemes",{Category:"Click to Chat for WhatsApp",return_type:"chat",ID:e,Title:a,URL:o})}function d(t){l(document).trigger("ht_ctc_ce_number",[h]),document.dispatchEvent(new CustomEvent("ht_ctc_event_number",{detail:{ctc:h}}));var e=h.number,c=(c=h.pre_filled).replace(/\[url]/gi,o);c=encodeURIComponent(c),""!=e?(h.web&&"yes"!==n?window.open("https://web.whatsapp.com/send?phone="+e+"&text="+c,"_blank","noopener"):window.open("https://wa.me/"+e+"?text="+c,"_blank","noopener"),r(t),u(e)):l(".ht-ctc-chat").html(_)}function u(t){var e,c;h.hook_url&&(e=h.hook_url,c={},h.hook_v&&(c=h.hook_v),l(document).trigger("ht_ctc_ce_hook",[h,t]),document.dispatchEvent(new CustomEvent("ht_ctc_event_hook",{detail:{ctc:h,number:t}})),e=h.hook_url,c=h.hook_v,data=JSON.stringify(c),l.ajax({url:e,type:"POST",mode:"no-cors",data:data,success:function(t){}}))}})}(jQuery);
1
+ !function(f){f(function(){var o=window.location.href,a=void 0!==document.title?document.title:"",n=void 0!==screen.width&&1024<screen.width?"no":"yes",_="",c={};function e(t,e){c[t]=e;e=JSON.stringify(c);localStorage.setItem("ht_ctc_storage",e)}localStorage.getItem("ht_ctc_storage")&&(c=localStorage.getItem("ht_ctc_storage"),c=JSON.parse(c));var t,i="";if("undefined"!=typeof ht_ctc_chat_var)i=ht_ctc_chat_var,s(),r();else{try{document.querySelector(".ht_ctc_chat_data")&&(t=f(".ht_ctc_chat_data").attr("data-settings"),i=JSON.parse(t))}catch(t){i={}}s(),r()}function s(){var t=document.querySelector(".ht_ctc_chat_data");t&&(_=f(".ht_ctc_chat_data").attr("data-no_number"),t.remove())}function r(){var e;document.dispatchEvent(new CustomEvent("ht_ctc_event_settings",{detail:{ctc:i}})),(e=document.querySelector(".ht-ctc-chat"))&&(document.dispatchEvent(new CustomEvent("ht_ctc_event_chat")),function(t){"yes"==i.schedule?document.dispatchEvent(new CustomEvent("ht_ctc_event_display",{detail:{ctc:i,display_chat:l,ht_ctc_chat:t}})):l(t)}(e),e.addEventListener("click",function(){f(".ht_ctc_chat_greetings_box").length||p(e)}),function(){var t;f(".ht_ctc_chat_greetings_box").length&&(t=f(window).height(),t-=t/3,f(".ht_ctc_chat_greetings_box_layout").css({maxHeight:t+"px"}),f(document).on("click",".ht_ctc_chat_style",function(t){(f(".ht_ctc_chat_greetings_box").hasClass("ctc_greetings_opened")?u:d)()})),f(document).on("click",".ctc_greetings_close_btn",function(t){u()})}(),f(document).on("click",".ht_ctc_chat_greetings_box_link",function(t){t.preventDefault(),p(e),document.dispatchEvent(new CustomEvent("ht_ctc_event_greetings"))})),f(document).on("click",".ht-ctc-sc-chat",function(){var t=this.getAttribute("data-number"),e=(e=this.getAttribute("data-pre_filled")).replace(/\[url]/gi,o);e=encodeURIComponent(e),i.web&&"yes"!==n?window.open("https://web.whatsapp.com/send?phone="+t+"&text="+e,"_blank","noopener"):window.open("https://wa.me/"+t+"?text="+e,"_blank","noopener"),v(this),m(t)}),f(document).on("click",".ctc_chat, #ctc_chat",function(t){p(this),f(this).hasClass("ctc_woo_place")&&t.preventDefault()}),f(document).on("click",'[href="#ctc_chat"]',function(t){t.preventDefault(),p(this)})}function h(){if(f(".ht_ctc_chat_greetings_box").length){if(i.g_device){if("yes"!==n&&"mobile"==i.g_device)return void f(".ht_ctc_chat_greetings_box").remove();if("yes"==n&&"desktop"==i.g_device)return void f(".ht_ctc_chat_greetings_box").remove()}document.dispatchEvent(new CustomEvent("ht_ctc_event_after_chat_displayed",{detail:{ctc:i,greetings_open:d,greetings_close:u}})),i.g_init&&"open"==i.g_init&&"user_closed"!==(c["g_user_action"]||!1)&&d("init")}}function d(t){f(".ht_ctc_chat_greetings_box").show(70),f(".ht_ctc_chat_greetings_box").addClass("ctc_greetings_opened").removeClass("ctc_greetings_closed"),e("g_action",t),"user_opened"==t&&e("g_user_action",t)}function u(t="user_closed"){f(".ht_ctc_chat_greetings_box").hide(70),f(".ht_ctc_chat_greetings_box").addClass("ctc_greetings_closed").removeClass("ctc_greetings_opened"),e("g_action",t),"user_closed"==t&&e("g_user_action",t)}function l(t){var e;"yes"==n?"show"==i.dis_m&&((e=document.querySelector(".ht_ctc_desktop_chat"))&&e.remove(),t.style.cssText=i.pos_m+i.css,g(t)):"show"==i.dis_d&&((e=document.querySelector(".ht_ctc_mobile_chat"))&&e.remove(),t.style.cssText=i.pos_d+i.css,g(t))}function g(e){try{f(e).show(parseInt(i.se))}catch(t){e.style.display="block"}var t,c;h(),c=f(t=e).hasClass("ht_ctc_entry_animation")?1200:120,setTimeout(function(){t.classList.add("ht_ctc_animation",i.ani)},c),f(".ht-ctc-chat").hover(function(){f(".ht-ctc-chat .ht-ctc-cta-hover").show(120)},function(){f(".ht-ctc-chat .ht-ctc-cta-hover").hide(100)})}function v(t){document.dispatchEvent(new CustomEvent("ht_ctc_event_analytics"));var e=i.number;t.classList.contains("ht-ctc-sc")&&(e=t.getAttribute("data-number"));var c="Click to Chat for WhatsApp",n="chat: "+e,t=a+", "+o;(i.ga||i.ga4)&&("undefined"!=typeof gtag?i.ga4?gtag("event","click to chat",{number:e,title:a,url:o}):gtag("event",n,{event_category:c,event_label:t}):"undefined"!=typeof ga&&void 0!==ga.getAll?ga.getAll()[0].send("event",c,n,t):"undefined"!=typeof __gaTracker&&__gaTracker("send","event",c,n,t)),"undefined"!=typeof dataLayer&&dataLayer.push({event:"Click to Chat",type:"chat",number:e,title:a,url:o,event_category:c,event_label:t,event_action:n}),i.ads&&"undefined"!=typeof gtag_report_conversion&&gtag_report_conversion(),i.fb&&"undefined"!=typeof fbq&&fbq("trackCustom","Click to Chat by HoliThemes",{Category:"Click to Chat for WhatsApp",return_type:"chat",ID:e,Title:a,URL:o})}function p(t){document.dispatchEvent(new CustomEvent("ht_ctc_event_number",{detail:{ctc:i}}));var e=i.number,c=i.pre_filled;t.hasAttribute("data-number")&&(e=t.getAttribute("data-number")),t.hasAttribute("data-pre_filled")&&(c=t.getAttribute("data-pre_filled")),c=c.replace(/\[url]/gi,o),c=encodeURIComponent(c),""!=e?(i.web&&"yes"!==n?window.open("https://web.whatsapp.com/send?phone="+e+"&text="+c,"_blank","noopener"):window.open("https://wa.me/"+e+"?text="+c,"_blank","noopener"),v(t),m(e)):f(".ht-ctc-chat").html(_)}function m(t){var e,c;i.hook_url&&(e=i.hook_url,c={},i.hook_v&&(c=i.hook_v),document.dispatchEvent(new CustomEvent("ht_ctc_event_hook",{detail:{ctc:i,number:t}})),e=i.hook_url,c=i.hook_v,data=JSON.stringify(c),f.ajax({url:e,type:"POST",mode:"no-cors",data:data,success:function(t){}}))}})}(jQuery);
new/inc/assets/js/dev/app.dev.js CHANGED
@@ -11,6 +11,29 @@ $(function () {
11
  var is_mobile = (typeof screen.width !== "undefined" && screen.width > 1024) ? "no" : "yes";
12
  var no_num = '';
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  var ctc = '';
15
  if ( typeof ht_ctc_chat_var !== "undefined" ) {
16
  ctc = ht_ctc_chat_var;
@@ -81,8 +104,12 @@ $(function () {
81
 
82
  // click
83
  ht_ctc_chat.addEventListener('click', function () {
84
- // ht_ctc_chat_greetings_box_link is not exists..
85
- if (! $('.ht_ctc_chat_greetings_box_link').length) {
 
 
 
 
86
  // link
87
  ht_ctc_link(ht_ctc_chat);
88
  }
@@ -106,26 +133,90 @@ $(function () {
106
  }
107
 
108
 
109
-
 
 
110
  function greetings() {
111
 
112
- // display greetings dialog
113
  if ($('.ht_ctc_chat_greetings_box').length) {
114
- $(document).on('click', '.ht_ctc_chat_style', function () {
115
- $('.ht_ctc_chat_greetings_box').toggle(120);
116
- // localStorage.setItem('ht_ctc_chat_greetings_box', 'user_opened');
 
 
 
 
 
 
 
 
 
 
 
117
  });
 
118
  }
119
 
120
  // close btn - greetings dialog
121
  $(document).on('click', '.ctc_greetings_close_btn', function (e) {
122
- $('.ht_ctc_chat_greetings_box').hide(120);
123
- localStorage.setItem('ht_ctc_chat_greetings_box', 'user_closed');
124
  });
125
-
126
 
127
  }
128
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  // display settings - Fixed position style
130
  function display_settings(ht_ctc_chat) {
131
 
@@ -165,6 +256,8 @@ $(function () {
165
  display(p)
166
  }
167
  }
 
 
168
  }
169
 
170
  function display(p) {
@@ -174,6 +267,8 @@ $(function () {
174
  p.style.display = "block";
175
  }
176
 
 
 
177
  ht_ctc_things(p);
178
  }
179
 
11
  var is_mobile = (typeof screen.width !== "undefined" && screen.width > 1024) ? "no" : "yes";
12
  var no_num = '';
13
 
14
+ var ht_ctc_storage = {};
15
+
16
+ if (localStorage.getItem('ht_ctc_storage')) {
17
+ ht_ctc_storage = localStorage.getItem('ht_ctc_storage');
18
+ ht_ctc_storage = JSON.parse(ht_ctc_storage);
19
+ }
20
+
21
+ // get items from ht_ctc_storage
22
+ function ctc_getItem(item) {
23
+ if (ht_ctc_storage[item]) {
24
+ return ht_ctc_storage[item];
25
+ } else {
26
+ return false;
27
+ }
28
+ }
29
+
30
+ // set items to ht_ctc_storage storage
31
+ function ctc_setItem(name, value) {
32
+ ht_ctc_storage[name] = value;
33
+ var newValues = JSON.stringify(ht_ctc_storage);
34
+ localStorage.setItem('ht_ctc_storage', newValues);
35
+ }
36
+
37
  var ctc = '';
38
  if ( typeof ht_ctc_chat_var !== "undefined" ) {
39
  ctc = ht_ctc_chat_var;
104
 
105
  // click
106
  ht_ctc_chat.addEventListener('click', function () {
107
+ // ht_ctc_chat_greetings_box (ht_ctc_chat_greetings_box_link) is not exists..
108
+
109
+ console.log(!$('.ht_ctc_chat_greetings_box').length);
110
+
111
+ if (!$('.ht_ctc_chat_greetings_box').length) {
112
+ console.log('no greetings dialog');
113
  // link
114
  ht_ctc_link(ht_ctc_chat);
115
  }
133
  }
134
 
135
 
136
+ /**
137
+ * greetings dialog
138
+ */
139
  function greetings() {
140
 
 
141
  if ($('.ht_ctc_chat_greetings_box').length) {
142
+
143
+ // max screen width is 66% of inner height
144
+ // var innerheight = window.innerHeight;
145
+ var innerheight = $(window).height();
146
+ innerheight = innerheight - (innerheight / 3);
147
+ $('.ht_ctc_chat_greetings_box_layout').css({ maxHeight: innerheight + 'px'});
148
+
149
+ $(document).on('click', '.ht_ctc_chat_style', function (e) {
150
+ // ctc_greetings_opened / ctc_greetings_closed
151
+ if ($('.ht_ctc_chat_greetings_box').hasClass('ctc_greetings_opened')) {
152
+ greetings_close();
153
+ } else {
154
+ greetings_open();
155
+ }
156
  });
157
+
158
  }
159
 
160
  // close btn - greetings dialog
161
  $(document).on('click', '.ctc_greetings_close_btn', function (e) {
162
+ greetings_close();
 
163
  });
 
164
 
165
  }
166
 
167
+ function greetings_display() {
168
+
169
+ if ($('.ht_ctc_chat_greetings_box').length) {
170
+
171
+ // Display greetings - device based
172
+ if (ctc.g_device) {
173
+ if (is_mobile !== 'yes' && 'mobile' == ctc.g_device) {
174
+ // in desktop, mobile only
175
+ $('.ht_ctc_chat_greetings_box').remove();
176
+ return;
177
+ } else if(is_mobile == 'yes' && 'desktop' == ctc.g_device) {
178
+ // in mobile, desktop only
179
+ $('.ht_ctc_chat_greetings_box').remove();
180
+ return;
181
+ }
182
+ }
183
+
184
+ document.dispatchEvent(
185
+ new CustomEvent("ht_ctc_event_after_chat_displayed", { detail: { ctc, greetings_open, greetings_close } })
186
+ );
187
+
188
+ if (ctc.g_init && 'open' == ctc.g_init && 'user_closed' !== ctc_getItem('g_user_action') ) {
189
+ greetings_open('init');
190
+ }
191
+
192
+ }
193
+
194
+ }
195
+
196
+ /**
197
+ * ht_ctc_chat_greetings_box_user_action - this is needed for initial close or open.. if user closed.. then no auto open initially
198
+ *
199
+ */
200
+ function greetings_open(message = 'user_opened') {
201
+ console.log('open');
202
+ $('.ht_ctc_chat_greetings_box').show(70);
203
+ $('.ht_ctc_chat_greetings_box').addClass('ctc_greetings_opened').removeClass('ctc_greetings_closed');
204
+ ctc_setItem( 'g_action', message);
205
+ if ('user_opened' == message) {
206
+ ctc_setItem('g_user_action', message);
207
+ }
208
+ }
209
+
210
+ function greetings_close(message = 'user_closed') {
211
+ console.log('close');
212
+ $('.ht_ctc_chat_greetings_box').hide(70);
213
+ $('.ht_ctc_chat_greetings_box').addClass('ctc_greetings_closed').removeClass('ctc_greetings_opened');
214
+ ctc_setItem('g_action', message);
215
+ if ('user_closed' == message) {
216
+ ctc_setItem('g_user_action', message);
217
+ }
218
+ }
219
+
220
  // display settings - Fixed position style
221
  function display_settings(ht_ctc_chat) {
222
 
256
  display(p)
257
  }
258
  }
259
+
260
+
261
  }
262
 
263
  function display(p) {
267
  p.style.display = "block";
268
  }
269
 
270
+ greetings_display();
271
+
272
  ht_ctc_things(p);
273
  }
274
 
new/inc/chat/class-ht-ctc-chat.php CHANGED
@@ -231,6 +231,7 @@ class HT_CTC_Chat {
231
  $display_css = "display: none; ";
232
 
233
  // AMP
 
234
  $on = "";
235
 
236
  // AMP
@@ -238,6 +239,8 @@ class HT_CTC_Chat {
238
  // ampforwp_is_amp_endpoint / is_amp_endpoint / amp_is_request
239
  if ( function_exists( 'amp_is_request' ) && amp_is_request() ) {
240
 
 
 
241
  if ( 'yes' == $is_mobile ) {
242
  if ( 'show' == $ht_ctc_chat['display_mobile'] ) {
243
  $display_css = "";
@@ -247,6 +250,7 @@ class HT_CTC_Chat {
247
  $display_css = "";
248
  }
249
  }
 
250
 
251
  $pre = rawurlencode($ht_ctc_chat['pre_filled']);
252
  // 'single quote', 'double quote', '&', '<', '>'
@@ -258,7 +262,6 @@ class HT_CTC_Chat {
258
  wp_deregister_script( 'ht_ctc_app_js' );
259
  }
260
  }
261
-
262
 
263
  // webhook
264
  $hook_url = isset($othersettings['hook_url']) ? esc_attr( $othersettings['hook_url'] ) : '';
@@ -335,8 +338,6 @@ class HT_CTC_Chat {
335
  }
336
  }
337
 
338
-
339
-
340
  $ctc = apply_filters( 'ht_ctc_fh_ctc', $ctc );
341
 
342
  // data-attribute - data-settings
231
  $display_css = "display: none; ";
232
 
233
  // AMP
234
+ $is_amp = false;
235
  $on = "";
236
 
237
  // AMP
239
  // ampforwp_is_amp_endpoint / is_amp_endpoint / amp_is_request
240
  if ( function_exists( 'amp_is_request' ) && amp_is_request() ) {
241
 
242
+ $is_amp = true;
243
+
244
  if ( 'yes' == $is_mobile ) {
245
  if ( 'show' == $ht_ctc_chat['display_mobile'] ) {
246
  $display_css = "";
250
  $display_css = "";
251
  }
252
  }
253
+ $display_css .= "cursor:pointer;";
254
 
255
  $pre = rawurlencode($ht_ctc_chat['pre_filled']);
256
  // 'single quote', 'double quote', '&', '<', '>'
262
  wp_deregister_script( 'ht_ctc_app_js' );
263
  }
264
  }
 
265
 
266
  // webhook
267
  $hook_url = isset($othersettings['hook_url']) ? esc_attr( $othersettings['hook_url'] ) : '';
338
  }
339
  }
340
 
 
 
341
  $ctc = apply_filters( 'ht_ctc_fh_ctc', $ctc );
342
 
343
  // data-attribute - data-settings
new/inc/greetings/class-ht-ctc-chat-greetings.php DELETED
@@ -1,76 +0,0 @@
1
- <?php
2
- /**
3
- * WhatsApp Chat - main page ..
4
- *
5
- * @subpackage chat
6
- */
7
-
8
- if ( ! defined( 'ABSPATH' ) ) exit;
9
-
10
- if ( ! class_exists( 'HT_CTC_Chat_Greetings' ) ) :
11
-
12
- class HT_CTC_Chat_Greetings {
13
-
14
- public function __construct() {
15
- $this->start();
16
- }
17
-
18
- public function start() {
19
- add_action( 'ht_ctc_ah_in_fixed_position', [$this, 'greetings_dialog'] );
20
- }
21
-
22
-
23
-
24
- function greetings_dialog() {
25
-
26
- $ht_ctc_greetings = array();
27
-
28
- $greetings = get_option('ht_ctc_greetings');
29
- $chat = get_option('ht_ctc_chat_options');
30
-
31
- $ht_ctc_greetings['template'] = ( isset( $chat['template']) ) ? esc_attr( $chat['template'] ) : '';
32
- // todo:
33
- $ht_ctc_greetings['template'] = 1;
34
-
35
- // return if template not set..
36
- if ( '' == $ht_ctc_greetings['template'] ) {
37
- return;
38
- }
39
-
40
- $ht_ctc_greetings['path'] = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/greetings/greetings-' . $ht_ctc_greetings['template']. '.php';
41
-
42
- // filter hook to update values...
43
- $ht_ctc_greetings = apply_filters( 'ht_ctc_fh_greetings', $ht_ctc_greetings );
44
-
45
- if ( is_file( $ht_ctc_greetings['path'] ) ) {
46
- ?>
47
- <style>
48
- .ctc_greetings_close_btn {
49
- display: none;
50
- }
51
- .ht_ctc_chat_greetings_box:hover .ctc_greetings_close_btn {
52
- display: block;
53
- }
54
- </style>
55
- <div style="position: relative; bottom: 18px; cursor: auto;">
56
-
57
- <div class="ht_ctc_chat_greetings_box" style="position: absolute; bottom: 0px; right: 0px; min-width: 300px; max-width: 400px; background-color: #ffffff; padding: 25px; box-shadow: 1px 4px 2px 1px rgba(0,0,0,.14); border-radius:4px; ">
58
- <span style="color:#ffffff; background-color: lightgray; cursor:pointer; float:right; border-radius: 50%;" class="ctc_greetings_close_btn dashicons dashicons-no-alt"></span>
59
- <div class="ctc_greetings_template">
60
- <?php include $ht_ctc_greetings['path']; ?>
61
- </div>
62
- </div>
63
- </div>
64
- <?php
65
- }
66
-
67
- }
68
-
69
-
70
- }
71
-
72
- // new HT_CTC_Chat();
73
-
74
- new HT_CTC_Chat_Greetings();
75
-
76
- endif; // END class_exists check
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
new/inc/greetings/greetings-1.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
- /**
3
- * Greetings - template - 1
4
- *
5
- */
6
-
7
- if ( ! defined( 'ABSPATH' ) ) exit;
8
-
9
- $g1_options = get_option( 'ht_ctc_g1' );
10
- $g1_options = apply_filters( 'ht_ctc_fh_g1_options', $g1_options );
11
-
12
- $g1_heading = (isset( $g1_options['g1_heading'])) ? esc_attr( $g1_options['g1_heading'] ) : '';
13
-
14
- ?>
15
- <div class="ctc_g_heading"><b>Hello World</b></div>
16
- <div class="ctc_g_content">
17
- <p>Hello, Are you interested in buying this product. For any queries, Chat with us.</p>
18
- </div>
19
- <div class="ctc_g_sentbutton">
20
- <input class="ht_ctc_chat_greetings_box_link" type="submit" value="WhatsApp">
21
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
new/tools/woo/class-ht-ctc-woo.php CHANGED
@@ -112,6 +112,10 @@ class HT_CTC_WOO_Pages {
112
  $css = '';
113
  $css .= "cursor:pointer;";
114
 
 
 
 
 
115
  if ('' !== $woo_shop_margin_left) {
116
  $css .= "margin-left:$woo_shop_margin_left;";
117
  }
112
  $css = '';
113
  $css .= "cursor:pointer;";
114
 
115
+ if ( isset($woo_options['woo_shop_position_center']) ) {
116
+ $css .= "text-align: center;";
117
+ }
118
+
119
  if ('' !== $woo_shop_margin_left) {
120
  $css .= "margin-left:$woo_shop_margin_left;";
121
  }
new/tools/woo/woo-admin/class-ht-ctc-admin-woo-page.php CHANGED
@@ -160,7 +160,6 @@ class HT_CTC_Admin_Woo_Page {
160
  $woo_shop_margin_left = ( isset( $woo_options['woo_shop_margin_left']) ) ? esc_attr( $woo_options['woo_shop_margin_left'] ) : '';
161
  $woo_shop_margin_unit = ( isset( $woo_options['woo_shop_margin_unit']) ) ? esc_attr( $woo_options['woo_shop_margin_unit'] ) : 'px';
162
 
163
-
164
  ?>
165
 
166
  <ul class="collapsible ht_ctc_woo_1">
@@ -200,7 +199,7 @@ class HT_CTC_Admin_Woo_Page {
200
  <!-- Add button/icon -->
201
  <div class="row">
202
  <div class="col s6" style="padding-top: 14px;">
203
- <p><?php _e( 'Position', 'click-to-chat-for-whatsapp' ); ?></p>
204
  </div>
205
  <div class="input-field col s6">
206
  <select name="<?php echo $dbrow ?>[woo_position]" class="woo_single_position_select">
@@ -249,8 +248,6 @@ class HT_CTC_Admin_Woo_Page {
249
  <p class="description ctc_init_display_none woo_single_position_settings">The styles and its position appears based on how Theme is developed.</p>
250
  <p class="description ctc_init_display_none woo_single_position_settings">This below settings are useful to adjust its appearance</p>
251
 
252
- <p class="description ctc_init_display_none woo_single_position_settings" style="margin-top: 20px;"><strong>New Feature:</strong> We are planning to improve this feature. For any suggestions please <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/support/">contact us</a></p>
253
-
254
  <!-- display - center -->
255
  <div class="row woo_single_position_settings" style="display: none;">
256
  <div class="col s6" style="padding-top: 14px;">
@@ -306,50 +303,21 @@ class HT_CTC_Admin_Woo_Page {
306
  <div class="collapsible-header"><?php _e( 'WooCommerce', 'click-to-chat-for-whatsapp' ); ?> - <?php _e( 'Shop Page', 'click-to-chat-for-whatsapp' ); ?></div>
307
  <div class="collapsible-body">
308
 
309
- <?php
310
- if (function_exists( 'wc_get_page_id')) {
311
- $shop_page_url = get_permalink( wc_get_page_id( 'shop' ) );
312
- ?>
313
- <!-- <a target="_blank" href="<?= $shop_page_url ?>">Shop Page</a> - Edit - at the right sidebar. -->
314
- <?php
315
-
316
- $admin_url = admin_url();
317
- $shop_page_id = wc_get_page_id( 'shop' );
318
- $shop_admin_url = "${admin_url}post.php?post=${shop_page_id}&action=edit";
319
- ?>
320
- <p class="description">Shop Page <a target="_blank" href="<?= $shop_admin_url ?>">Edit </a> -> Settings Icon - At the right Sidebar 'Click to Chat' metabox - <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/">Page Level Settings</a></p>
321
- <br>
322
- <?php
323
- }
324
- ?>
325
- <p class="description">
326
- <strong>Change values for Cart Page:</strong> <br>
327
- Number <br>
328
- Call to Action <br>
329
- Prefilled Message <br>
330
- Time Delay (PRO) <br>
331
- Scroll Delay (PRO) <br>
332
- Style (PRO) <br>
333
- <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/">Page Level Settings</a>
334
- </p>
335
- <br><br>
336
 
337
  <!-- At WooCommerce shop pages, loop.. -->
338
  <div class="row">
339
  <div class="col s6" style="padding-top: 14px;">
340
- <p><?php _e( 'Add WhatsApp at Products Archive', 'click-to-chat-for-whatsapp' ); ?><br>(<?php _e( 'Shop page', 'click-to-chat-for-whatsapp' ); ?>)</p>
341
  </div>
342
  <div class="input-field col s6">
343
  <label>
344
  <input name="<?= $dbrow; ?>[woo_shop_add_whatsapp]" type="checkbox" value="1" <?php checked( $woo_shop_add_whatsapp, 1 ); ?> id="woo_shop_add_whatsapp" />
345
- <span><?php _e( "Add WhatsApp at Products Archive, Shop Page", 'click-to-chat-for-whatsapp' ); ?></span>
346
- <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/whatsapp-chat-in-woocommerce-shop-page/">more info</a></p>
347
  </label>
348
  </div>
349
  </div>
350
 
351
- <p class="description ctc_init_display_none woo_shop_add_whatsapp_settings" style="margin: 35px 0px;"><strong>New Feature:</strong> We are planning to improve this feature. For any suggestions please <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/support/">contact us</a></p>
352
-
353
  <!-- prefilled message -->
354
  <div class="row ctc_init_display_none woo_shop_add_whatsapp_settings">
355
  <div class="input-field col s12">
@@ -391,6 +359,19 @@ class HT_CTC_Admin_Woo_Page {
391
  </div>
392
  </div>
393
 
 
 
 
 
 
 
 
 
 
 
 
 
 
394
  <!-- margin -->
395
  <div class="row ctc_init_display_none woo_shop_add_whatsapp_settings">
396
  <div class="col s6" style="padding-top: 14px;">
@@ -405,112 +386,46 @@ class HT_CTC_Admin_Woo_Page {
405
  <span class="helper-text" style="float:right;">Top, Bottom, Left, Right <span> E.g. 10px, 50%</span> </span>
406
  </div>
407
 
408
- </div>
409
- </div>
410
- </li>
411
- </ul>
412
-
413
- <!-- woo cart page -->
414
- <ul class="collapsible ht_ctc_woo_cart" style="margin-top: 40px;">
415
- <li class="">
416
- <div class="collapsible-header"><?php _e( 'WooCommerce', 'click-to-chat-for-whatsapp' ); ?> - <?php _e( 'Cart Page', 'click-to-chat-for-whatsapp' ); ?></div>
417
- <div class="collapsible-body">
418
-
419
- <?php
420
- if (function_exists( 'wc_get_page_id')) {
421
- $admin_url = admin_url();
422
- $shop_page_id = wc_get_page_id( 'cart' );
423
- $shop_admin_url = "${admin_url}post.php?post=${shop_page_id}&action=edit";
424
- ?>
425
- <p class="description">Cart Page <a target="_blank" href="<?= $shop_admin_url ?>">Edit </a> -> Settings Icon - At the right Sidebar 'Click to Chat' metabox</p><br>
426
- <p class="description">
427
- <strong>Change values for Cart Page:</strong> <br>
428
- Number <br>
429
- Call to Action <br>
430
- Prefilled Message <br>
431
- Time Delay (PRO) <br>
432
- Scroll Delay (PRO) <br>
433
- Style (PRO) <br>
434
- <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/">Page Level Settings</a>
435
- </p>
436
- <?php
437
- }
438
- ?>
439
 
440
  </div>
441
  </div>
442
  </li>
443
  </ul>
444
 
445
- <!-- woo checkout page -->
446
- <ul class="collapsible ht_ctc_woo_checkout" style="margin-top: 40px;">
447
- <li class="">
448
- <div class="collapsible-header"><?php _e( 'WooCommerce', 'click-to-chat-for-whatsapp' ); ?> - <?php _e( 'Checkout Page', 'click-to-chat-for-whatsapp' ); ?></div>
449
- <div class="collapsible-body">
450
 
 
 
 
 
451
  <?php
452
- if (function_exists( 'wc_get_page_id')) {
453
- $admin_url = admin_url();
454
- $shop_page_id = wc_get_page_id( 'checkout' );
455
- $shop_admin_url = "${admin_url}post.php?post=${shop_page_id}&action=edit";
456
- ?>
457
- <p class="description">Checkout Page <a target="_blank" href="<?= $shop_admin_url ?>">Edit </a> -> Settings Icon - At the right Sidebar 'Click to Chat' metabox</p><br>
458
- <p class="description">
459
- <strong>Change values for Cart Page:</strong> <br>
460
- Number <br>
461
- Call to Action <br>
462
- Prefilled Message <br>
463
- Time Delay (PRO) <br>
464
- Scroll Delay (PRO) <br>
465
- Style (PRO) <br>
466
- <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/">Page Level Settings</a>
467
- </p>
468
- <?php
469
- }
470
- ?>
471
 
472
- </div>
473
- </div>
474
- </li>
475
- </ul>
476
-
477
-
478
- <!-- woo My Account page -->
479
- <ul class="collapsible ht_ctc_woo_myaccount" style="margin-top: 40px;">
480
- <li class="">
481
- <div class="collapsible-header"><?php _e( 'WooCommerce', 'click-to-chat-for-whatsapp' ); ?> - <?php _e( 'My Account Page', 'click-to-chat-for-whatsapp' ); ?></div>
482
- <div class="collapsible-body">
483
-
484
- <?php
485
  if (function_exists( 'wc_get_page_id')) {
486
- $admin_url = admin_url();
487
- $shop_page_id = wc_get_page_id( 'myaccount' );
488
  $shop_admin_url = "${admin_url}post.php?post=${shop_page_id}&action=edit";
 
 
 
 
 
 
 
 
 
 
489
  ?>
490
- <!-- <p class="description">
491
- <strong>Change values for My Account Page</strong>: Number, Call to Action, Prefilled Message, Time Delay (PRO), Scroll Delay (PRO), Style (PRO)
492
- </p><br> -->
493
- <p class="description">My Account Page <a target="_blank" href="<?= $shop_admin_url ?>">Edit </a> -> Settings Icon - At the right Sidebar 'Click to Chat' metabox </p><br>
494
- <p class="description">
495
- <strong>Change values for Cart Page:</strong> <br>
496
- Number <br>
497
- Call to Action <br>
498
- Prefilled Message <br>
499
- Time Delay (PRO) <br>
500
- Scroll Delay (PRO) <br>
501
- Style (PRO) <br>
502
- <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/">Page Level Settings</a>
503
- </p>
504
  <?php
505
  }
506
- ?>
507
 
508
- </div>
509
- </div>
510
- </li>
511
- </ul>
512
-
513
- <?php
514
  }
515
 
516
 
160
  $woo_shop_margin_left = ( isset( $woo_options['woo_shop_margin_left']) ) ? esc_attr( $woo_options['woo_shop_margin_left'] ) : '';
161
  $woo_shop_margin_unit = ( isset( $woo_options['woo_shop_margin_unit']) ) ? esc_attr( $woo_options['woo_shop_margin_unit'] ) : 'px';
162
 
 
163
  ?>
164
 
165
  <ul class="collapsible ht_ctc_woo_1">
199
  <!-- Add button/icon -->
200
  <div class="row">
201
  <div class="col s6" style="padding-top: 14px;">
202
+ <p><?php _e( 'Add WhatsApp', 'click-to-chat-for-whatsapp' ); ?>:</p>
203
  </div>
204
  <div class="input-field col s6">
205
  <select name="<?php echo $dbrow ?>[woo_position]" class="woo_single_position_select">
248
  <p class="description ctc_init_display_none woo_single_position_settings">The styles and its position appears based on how Theme is developed.</p>
249
  <p class="description ctc_init_display_none woo_single_position_settings">This below settings are useful to adjust its appearance</p>
250
 
 
 
251
  <!-- display - center -->
252
  <div class="row woo_single_position_settings" style="display: none;">
253
  <div class="col s6" style="padding-top: 14px;">
303
  <div class="collapsible-header"><?php _e( 'WooCommerce', 'click-to-chat-for-whatsapp' ); ?> - <?php _e( 'Shop Page', 'click-to-chat-for-whatsapp' ); ?></div>
304
  <div class="collapsible-body">
305
 
306
+ <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/whatsapp-chat-in-woocommerce-shop-page/"><?php _e( 'WooCommerce Shop page', 'click-to-chat-for-whatsapp' ); ?></a></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
 
308
  <!-- At WooCommerce shop pages, loop.. -->
309
  <div class="row">
310
  <div class="col s6" style="padding-top: 14px;">
311
+ <p><?php _e( 'Add WhatsApp', 'click-to-chat-for-whatsapp' ); ?>:</p>
312
  </div>
313
  <div class="input-field col s6">
314
  <label>
315
  <input name="<?= $dbrow; ?>[woo_shop_add_whatsapp]" type="checkbox" value="1" <?php checked( $woo_shop_add_whatsapp, 1 ); ?> id="woo_shop_add_whatsapp" />
316
+ <span><?php _e( "At Products Archive, Shop Page", 'click-to-chat-for-whatsapp' ); ?></span>
 
317
  </label>
318
  </div>
319
  </div>
320
 
 
 
321
  <!-- prefilled message -->
322
  <div class="row ctc_init_display_none woo_shop_add_whatsapp_settings">
323
  <div class="input-field col s12">
359
  </div>
360
  </div>
361
 
362
+ <!-- display - center -->
363
+ <div class="row ctc_init_display_none woo_shop_add_whatsapp_settings">
364
+ <div class="col s6" style="padding-top: 14px;">
365
+ <p><?php _e( 'Display Center', 'click-to-chat-for-whatsapp' ); ?></p>
366
+ </div>
367
+ <div class="input-field col s6">
368
+ <label>
369
+ <input name="<?= $dbrow; ?>[woo_shop_position_center]" type="checkbox" value="1" <?php checked( $woo_shop_position_center, 1 ); ?> id="woo_shop_position_center" />
370
+ <span><?php _e( 'Display center', 'click-to-chat-for-whatsapp' ); ?></span>
371
+ </label>
372
+ </div>
373
+ </div>
374
+
375
  <!-- margin -->
376
  <div class="row ctc_init_display_none woo_shop_add_whatsapp_settings">
377
  <div class="col s6" style="padding-top: 14px;">
386
  <span class="helper-text" style="float:right;">Top, Bottom, Left, Right <span> E.g. 10px, 50%</span> </span>
387
  </div>
388
 
389
+ <br>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
390
 
391
  </div>
392
  </div>
393
  </li>
394
  </ul>
395
 
 
 
 
 
 
396
 
397
+ <!-- Page Level settings - for WooCommerce pages -->
398
+ <br><br>
399
+ <p class="description ht_ctc_subtitle">Page Level Settings:</p>
400
+ <br>
401
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
402
 
403
+ $admin_url = admin_url();
404
+
 
 
 
 
 
 
 
 
 
 
 
405
  if (function_exists( 'wc_get_page_id')) {
406
+ $shop_page_id = wc_get_page_id( 'shop' );
 
407
  $shop_admin_url = "${admin_url}post.php?post=${shop_page_id}&action=edit";
408
+
409
+ $cart_page_id = wc_get_page_id( 'cart' );
410
+ $cart_admin_url = "${admin_url}post.php?post=${cart_page_id}&action=edit";
411
+
412
+ $checkout_page_id = wc_get_page_id( 'checkout' );
413
+ $checkout_admin_url = "${admin_url}post.php?post=${checkout_page_id}&action=edit";
414
+
415
+ $myaccount_page_id = wc_get_page_id( 'myaccount' );
416
+ $myaccount_admin_url = "${admin_url}post.php?post=${myaccount_page_id}&action=edit";
417
+
418
  ?>
419
+ <p class="description"><a target="_blank" href="<?= $shop_admin_url ?>">Edit Shop Page</a> </p>
420
+ <p class="description"><a target="_blank" href="<?= $cart_admin_url ?>">Edit Cart Page</a> </p>
421
+ <p class="description"><a target="_blank" href="<?= $checkout_admin_url ?>">Edit Checkout Page</a> </p>
422
+ <p class="description"><a target="_blank" href="<?= $myaccount_admin_url ?>">Edit My Account Page</a> </p>
423
+
424
+ <br>
425
+ <p class="description">(Edit -> Settings Icon - At the right Sidebar 'Click to Chat' metabox) <br> Number, Call to Action, Prefilled Message, <br> PRO: Time Delay, Scroll Delay, Style <br> <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/">Page Level Settings</a></p>
 
 
 
 
 
 
 
426
  <?php
427
  }
 
428
 
 
 
 
 
 
 
429
  }
430
 
431
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Requires at least: 4.6
3
  Tested up to: 5.8.2
4
  Requires PHP: 5.6
5
  Contributors: holithemes
6
- Stable tag: 3.5.3
7
  Tags: whatsapp, whatsapp business, click to chat, whatsapp chat, whatsapp support, whatsapp group, whatsapp message, WhatsApp WooCommerce, 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
@@ -27,7 +27,7 @@ Add your 'WhatsApp' or 'WhatsApp Business' Number. And let your website visitors
27
  **💻 Desktop:** Navigates to WhatsApp Desktop App / Web WhatsApp page(web.whatsapp.com)
28
 
29
 
30
- = 💎 Styles =
31
 
32
  Select a Style that matches your Website design.
33
 
@@ -35,7 +35,7 @@ Select a Style that matches your Website design.
35
  * Add your own Image/GIF
36
  * Custom Element/Design
37
  * Shortcodes
38
- * Select different Styles for Mobile, Desktop
39
  * All pre-defined styles are customizable
40
  * Select style, customize to match the website design.
41
 
@@ -48,9 +48,9 @@ Select a Style that matches your Website design.
48
 
49
  Instead of selecting a pre-defined style, add any Image/Animated-image/GIF.
50
 
51
- = 🌈 Custom Element =
52
 
53
- Create your own Element/Desing and just add
54
  * Class name: 'ctc_chat' (or)
55
  * Id name: 'ctc_chat' (or)
56
  * Href/link: '#ctc_chat'
@@ -59,13 +59,13 @@ The custom design will navigate to WhatsApp based on plugin settings (WhatsApp N
59
 
60
  [Custom Element](https://holithemes.com/plugins/click-to-chat/custom-element/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
61
 
62
- = ✳️ Position to Place =
63
 
64
  * Add styles at any position of the screen
65
  (not limited to fixed positions).
66
  * Different positions for Mobile and Desktop.
67
 
68
- = ⏩ Pre-filled Message =
69
 
70
  Text that appears at the WhatsApp chat window when the user clicks on the WhatsApp Image/button.
71
 
@@ -82,9 +82,9 @@ With these variables, we can understand from which page the user started WhatsAp
82
 
83
  [Pre-filled Message](https://holithemes.com/plugins/click-to-chat/pre-filled-message/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
84
 
85
- = 🎁 WooCommerce =
86
 
87
- == WooCommerce Single product pages ==
88
 
89
  Separate 'pre-filled message', 'call to action' settings for WooCommerce Single product pages.
90
 
@@ -98,8 +98,7 @@ Additional variables, specific to WooCommerce single product page to change valu
98
 
99
  * After product summary
100
 
101
- In PRO: multiple positions are available
102
-
103
  * Before Main Content
104
  * Before Product
105
  * Before Product Summary
@@ -112,7 +111,7 @@ In PRO: multiple positions are available
112
 
113
  [Add WhatsApp Icon/Button in WooCommerce Product pages](https://holithemes.com/plugins/click-to-chat/add-whatsapp-in-woocommerce-single-product-pages/)
114
 
115
- == WooCommerce Shop Page ==
116
 
117
  Add WhatsApp button/icon at WooCommerce Products list (shop page, related products list)
118
 
@@ -127,13 +126,15 @@ At page level we can overwrite the settings. Each post we can add different What
127
  * Call to Action
128
  * Pre-filled Message
129
  * Display Settings
130
- * Styles (pro)
131
- * Time Dealy (pro)
132
- * Scroll Dealy (pro)
 
 
133
 
134
  [Page level settings](https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
135
 
136
- = 📈 Analytics =
137
 
138
  Creates an Event when the user clicks on the WhatsApp Icon/button.
139
 
@@ -143,7 +144,7 @@ Creates an Event when the user clicks on the WhatsApp Icon/button.
143
 
144
  [Google Ads Conversations](https://holithemes.com/plugins/click-to-chat/google-ads-conversion/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
145
 
146
- = Webhooks =
147
 
148
  Connect other applications using Integarate, Automation tools like Zapier, IFTTT, Pipedream
149
 
@@ -168,13 +169,14 @@ Connect other applications using Integarate, Automation tools like Zapier, IFTTT
168
  * Absolute: Fixed position to the body content. (Moves when user scrolls the page)
169
  * Time Dealy - Display after some time dealy
170
  * Scroll Action - Display after user scroll the page of given percentage
 
171
  * Page level settings - Change styles, time, scroll delay.
172
  * WooCommerce
173
  * Mulitple position to add WhatsApp in product pages.
174
 
175
  [PRO](https://holithemes.com/plugins/click-to-chat/pricing/)
176
 
177
- = 🎯 Localization =
178
 
179
  Click to Chat is Compatible with translate plugins. [WPML](https://wpml.org/), Polylang.
180
 
@@ -188,13 +190,13 @@ Easy to setup different values for each language
188
 
189
  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)
190
 
191
- = 🚀 Performance =
192
 
193
  * Rich in features but the frontend of the site content is very light weight.
194
 
195
  We highly concentrate on speed, performance.
196
 
197
- = 👓 Display Settings =
198
 
199
  Show/Hide styles based on
200
  * Post type
@@ -203,13 +205,20 @@ Show/Hide styles based on
203
  * Device Type(Mobile, Desktop)
204
  * WooCommerce single product pages
205
 
206
- = ⛳ Shortcodes =
 
 
 
 
 
 
 
207
 
208
  Use shortcodes to add the icon/button with inline the Posts content, widgets.
209
 
210
  change the default setting values using shortcode attributes - WhatsApp Number, Style, Prefilled message, Call to Action.
211
 
212
- == Chat Shortcodes ==
213
 
214
  [ht-ctc-chat]
215
 
@@ -219,7 +228,7 @@ To change the WhatsApp number use 'number' attribute
219
 
220
  [Shortcodes for Chat](https://holithemes.com/plugins/click-to-chat/shortcodes-chat/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
221
 
222
- == Group ==
223
 
224
  Enable Group chat feature and add WhatsApp Group id in the plugin setting page.
225
 
@@ -227,7 +236,7 @@ Make it easy for your customers to join your Whatsapp Group.
227
 
228
  [Group](https://holithemes.com/plugins/click-to-chat/group-chat-feature/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
229
 
230
- == Share ==
231
 
232
  Let users share your website with their WhatsApp contacts and get more leads.
233
 
@@ -469,6 +478,9 @@ After Activate the plugin, add WhatsApp Number at plugin settings.
469
 
470
  == Changelog ==
471
 
 
 
 
472
  = 3.5.3 =
473
  * New: Display settings for WooCommerce Thank you page
474
  * Fix: Display based on Category settings not found issue
3
  Tested up to: 5.8.2
4
  Requires PHP: 5.6
5
  Contributors: holithemes
6
+ Stable tag: 3.6
7
  Tags: whatsapp, whatsapp business, click to chat, whatsapp chat, whatsapp support, whatsapp group, whatsapp message, WhatsApp WooCommerce, 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
27
  **💻 Desktop:** Navigates to WhatsApp Desktop App / Web WhatsApp page(web.whatsapp.com)
28
 
29
 
30
+ == 💎 Styles ==
31
 
32
  Select a Style that matches your Website design.
33
 
35
  * Add your own Image/GIF
36
  * Custom Element/Design
37
  * Shortcodes
38
+ * Different Styles, Positions for Mobile, Desktop
39
  * All pre-defined styles are customizable
40
  * Select style, customize to match the website design.
41
 
48
 
49
  Instead of selecting a pre-defined style, add any Image/Animated-image/GIF.
50
 
51
+ == 🌈 Custom Element ==
52
 
53
+ Convert any Element/Design as WhatsApp Chat Element by adding
54
  * Class name: 'ctc_chat' (or)
55
  * Id name: 'ctc_chat' (or)
56
  * Href/link: '#ctc_chat'
59
 
60
  [Custom Element](https://holithemes.com/plugins/click-to-chat/custom-element/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
61
 
62
+ == ✳️ Position to Place ==
63
 
64
  * Add styles at any position of the screen
65
  (not limited to fixed positions).
66
  * Different positions for Mobile and Desktop.
67
 
68
+ == ⏩ Pre-filled Message ==
69
 
70
  Text that appears at the WhatsApp chat window when the user clicks on the WhatsApp Image/button.
71
 
82
 
83
  [Pre-filled Message](https://holithemes.com/plugins/click-to-chat/pre-filled-message/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
84
 
85
+ == 🎁 WooCommerce ==
86
 
87
+ = WooCommerce Single product pages =
88
 
89
  Separate 'pre-filled message', 'call to action' settings for WooCommerce Single product pages.
90
 
98
 
99
  * After product summary
100
 
101
+ PRO:
 
102
  * Before Main Content
103
  * Before Product
104
  * Before Product Summary
111
 
112
  [Add WhatsApp Icon/Button in WooCommerce Product pages](https://holithemes.com/plugins/click-to-chat/add-whatsapp-in-woocommerce-single-product-pages/)
113
 
114
+ = WooCommerce Shop Page =
115
 
116
  Add WhatsApp button/icon at WooCommerce Products list (shop page, related products list)
117
 
126
  * Call to Action
127
  * Pre-filled Message
128
  * Display Settings
129
+
130
+ PRO:
131
+ * Styles
132
+ * Time Dealy
133
+ * Scroll Dealy
134
 
135
  [Page level settings](https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
136
 
137
+ == 📈 Analytics ==
138
 
139
  Creates an Event when the user clicks on the WhatsApp Icon/button.
140
 
144
 
145
  [Google Ads Conversations](https://holithemes.com/plugins/click-to-chat/google-ads-conversion/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
146
 
147
+ == Webhooks ==
148
 
149
  Connect other applications using Integarate, Automation tools like Zapier, IFTTT, Pipedream
150
 
169
  * Absolute: Fixed position to the body content. (Moves when user scrolls the page)
170
  * Time Dealy - Display after some time dealy
171
  * Scroll Action - Display after user scroll the page of given percentage
172
+ * Display based on Website visitors login status
173
  * Page level settings - Change styles, time, scroll delay.
174
  * WooCommerce
175
  * Mulitple position to add WhatsApp in product pages.
176
 
177
  [PRO](https://holithemes.com/plugins/click-to-chat/pricing/)
178
 
179
+ == 🎯 Localization ==
180
 
181
  Click to Chat is Compatible with translate plugins. [WPML](https://wpml.org/), Polylang.
182
 
190
 
191
  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)
192
 
193
+ == 🚀 Performance ==
194
 
195
  * Rich in features but the frontend of the site content is very light weight.
196
 
197
  We highly concentrate on speed, performance.
198
 
199
+ == 👓 Display Settings ==
200
 
201
  Show/Hide styles based on
202
  * Post type
205
  * Device Type(Mobile, Desktop)
206
  * WooCommerce single product pages
207
 
208
+ PRO:
209
+ * Time delay
210
+ * Scroll delay
211
+ * Selected Days in a week
212
+ * Selected time range in a day
213
+ * Website visitor login status
214
+
215
+ == ⛳ Shortcodes ==
216
 
217
  Use shortcodes to add the icon/button with inline the Posts content, widgets.
218
 
219
  change the default setting values using shortcode attributes - WhatsApp Number, Style, Prefilled message, Call to Action.
220
 
221
+ = Chat Shortcodes =
222
 
223
  [ht-ctc-chat]
224
 
228
 
229
  [Shortcodes for Chat](https://holithemes.com/plugins/click-to-chat/shortcodes-chat/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
230
 
231
+ = Group =
232
 
233
  Enable Group chat feature and add WhatsApp Group id in the plugin setting page.
234
 
236
 
237
  [Group](https://holithemes.com/plugins/click-to-chat/group-chat-feature/?utm_source=wp&utm_medium=readme&utm_campaign=ht)
238
 
239
+ = Share =
240
 
241
  Let users share your website with their WhatsApp contacts and get more leads.
242
 
478
 
479
  == Changelog ==
480
 
481
+ = 3.6 =
482
+ * Enchantment: settings pages
483
+
484
  = 3.5.3 =
485
  * New: Display settings for WooCommerce Thank you page
486
  * Fix: Display based on Category settings not found issue