Click to Chat for WhatsApp Chat - Version 3.2.4

Version Description

  • AMP Compatibility - 1st version
  • Updated: Positions to place
  • Fix: Shortcode hover color effects
Download this release

Release Info

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

Code changes from version 3.2.3 to 3.2.4

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.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.2.3' );
21
  }
22
 
23
  // environment - production, staging, development, test
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.4
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.4' );
21
  }
22
 
23
  // environment - production, staging, development, test
new/admin/admin.php CHANGED
@@ -25,7 +25,7 @@ include_once HT_CTC_PLUGIN_DIR .'new/admin/admin_commons/class-ht-ctc-admin-othe
25
  // add scripts
26
  include_once HT_CTC_PLUGIN_DIR .'new/admin/class-ht-ctc-admin-scripts.php';
27
 
28
- // Main, Chat admin page - enable options ..
29
  include_once HT_CTC_PLUGIN_DIR .'new/admin/class-ht-ctc-admin-main-page.php';
30
 
31
  // group admin page
@@ -41,7 +41,7 @@ if ( isset ( $ht_ctc_othersettings['enable_share'] ) ) {
41
  // customize
42
  include_once HT_CTC_PLUGIN_DIR .'new/admin/class-ht-ctc-admin-customize-styles.php';
43
 
44
- // other settings
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
25
  // add scripts
26
  include_once HT_CTC_PLUGIN_DIR .'new/admin/class-ht-ctc-admin-scripts.php';
27
 
28
+ // Main, Chat admin page
29
  include_once HT_CTC_PLUGIN_DIR .'new/admin/class-ht-ctc-admin-main-page.php';
30
 
31
  // group admin page
41
  // customize
42
  include_once HT_CTC_PLUGIN_DIR .'new/admin/class-ht-ctc-admin-customize-styles.php';
43
 
44
+ // other settings - enable options ..
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
new/admin/admin_commons/admin-mobile.php CHANGED
@@ -65,8 +65,8 @@ do_action('ht_ctc_ah_admin_mobile_after_select_sytle', $options, $dbrow );
65
  <label>top / bottom </label>
66
  </div>
67
  <div class="input-field col s6">
68
- <input name="<?php echo $dbrow ?>[mobile_side_1_value]" value="<?php echo $mobile_side_1_value ?>" id="side_1_value" type="text" class="input-margin">
69
- <label for="side_1_value"><?php _e( 'E.g. 10px', 'click-to-chat-for-whatsapp' ); ?></label>
70
  </div>
71
  </div>
72
 
@@ -81,8 +81,8 @@ do_action('ht_ctc_ah_admin_mobile_after_select_sytle', $options, $dbrow );
81
  </div>
82
 
83
  <div class="input-field col s6">
84
- <input name="<?php echo $dbrow ?>[mobile_side_2_value]" value="<?php echo $mobile_side_2_value ?>" id="side_2_value" type="text" class="input-margin">
85
- <label for="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>
65
  <label>top / bottom </label>
66
  </div>
67
  <div class="input-field col s6">
68
+ <input name="<?php echo $dbrow ?>[mobile_side_1_value]" value="<?php echo $mobile_side_1_value ?>" id="mobile_side_1_value" type="text" class="input-margin">
69
+ <label for="mobile_side_1_value"><?php _e( 'E.g. 10px', 'click-to-chat-for-whatsapp' ); ?></label>
70
  </div>
71
  </div>
72
 
81
  </div>
82
 
83
  <div class="input-field col s6">
84
+ <input name="<?php echo $dbrow ?>[mobile_side_2_value]" value="<?php echo $mobile_side_2_value ?>" id="mobile_side_2_value" type="text" class="input-margin">
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>
new/admin/admin_commons/admin-sidebar-content.php CHANGED
@@ -5,54 +5,19 @@
5
  ?>
6
 
7
  <div class="sidebar-content">
8
- <!-- <p>
9
- Please let us know if you have any suggestions or feedback!! <br>
10
- <a href="http://api.whatsapp.com/send?phone=919494429789&text=<?php echo get_bloginfo('url'); ?>%0AHi%20HoliThemes,%0AI%20have%20a%20Suggestion/Feedback:" target="_blank">WhatsApp</a> <br>
11
- mail: ctc@holithemes.com
12
- </p> -->
13
 
14
- <div class="col s12 m8 l12 xl12">
15
- <div class="row">
16
-
17
- <ul class="collapsible popout">
18
-
19
- <!-- <li>
20
- <div class="collapsible-header">Show/Hide on Selected pages, devices</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/">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/">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/">Show/Hide on Mobile/Desktop</a></p>
25
- </div>
26
- </li> -->
27
-
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
-
36
- <!-- <li>
37
- <div class="collapsible-header">HoliThemes On</div>
38
- <div class="collapsible-body">
39
- <p class="description"><a href="https://www.facebook.com/holithemes/" target="_blank">Facebook</a></p>
40
- <p class="description"><a href="https://www.youtube.com/channel/UC2Tf_WB9PWffO2B3tswWCGw" target="_blank">YouTube</a></p>
41
- <p class="description"><a href="https://twitter.com/holithemes" target="_blank">Twitter</a></p>
42
- <p class="description"><a href="https://www.instagram.com/holithemes/" target="_blank">Instagram</a></p>
43
- <p class="description"><a href="https://www.linkedin.com/company/holithemes" target="_blank">LinkedIn</a></p>
44
- </div>
45
- </li> -->
46
-
47
- <!-- <div class="collapsible-header">Support Us</div>
48
- <div class="collapsible-body">
49
- <p class="description">If you like the plugin support us by giving 5 star rating</p>
50
  </div>
51
- </li> -->
52
-
53
- </ul>
54
-
55
- </div>
56
  </div>
57
 
58
  <!-- <div class="col s12 m8">
5
  ?>
6
 
7
  <div class="sidebar-content">
 
 
 
 
 
8
 
9
+ <div class="col s12 m8 l12 xl12">
10
+ <div class="row">
11
+ <ul class="collapsible popout">
12
+ <li class="active">
13
+ <div class="collapsible-header"><?php _e( 'Contact Us', 'click-to-chat-for-whatsapp' ); ?></div>
14
+ <div class="collapsible-body">
15
+ <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>
16
+ <p class="description"><?php _e( 'Mail', 'click-to-chat-for-whatsapp' ); ?>:<a href="mailto: ctc@holithemes.com"> ctc@holithemes.com</a></p>
17
+ </div>
18
+ </li>
19
+ </ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  </div>
 
 
 
 
 
21
  </div>
22
 
23
  <!-- <div class="col s12 m8">
new/admin/admin_commons/class-ht-ctc-admin-others.php CHANGED
@@ -1,5 +1,6 @@
1
  <?php
2
  /**
 
3
  * Other function, features .. to
4
  *
5
  * admin notices
@@ -20,14 +21,24 @@ class HT_CTC_Admin_Others {
20
  $this->admin_notice();
21
  }
22
 
23
- function admin_notice() {
 
 
 
 
 
 
 
 
24
 
25
  // clear cache
26
  add_action( 'update_option_ht_ctc_chat_options', array( $this, 'clear_cache') );
27
  add_action( 'update_option_ht_ctc_othersettings', array( $this, 'clear_cache') );
28
  add_action( 'update_option_ht_ctc_group', array( $this, 'clear_cache') );
29
  add_action( 'update_option_ht_ctc_share', array( $this, 'clear_cache') );
30
- add_action( 'update_option_ht_ctc_s2', array( $this, 'clear_cache') ); //customize styles
 
 
31
  add_action( 'update_option_ht_ctc_s3', array( $this, 'clear_cache') );
32
  add_action( 'update_option_ht_ctc_s4', array( $this, 'clear_cache') );
33
  add_action( 'update_option_ht_ctc_s5', array( $this, 'clear_cache') );
@@ -36,6 +47,10 @@ class HT_CTC_Admin_Others {
36
  add_action( 'update_option_ht_ctc_s8', array( $this, 'clear_cache') );
37
  add_action( 'update_option_ht_ctc_s99', array( $this, 'clear_cache') );
38
 
 
 
 
 
39
  // Admin notices
40
  // if number blank
41
  $ht_ctc_chat_options = get_option('ht_ctc_chat_options');
1
  <?php
2
  /**
3
+ * Admin Hooks
4
  * Other function, features .. to
5
  *
6
  * admin notices
21
  $this->admin_notice();
22
  }
23
 
24
+ function admin_hooks() {
25
+ // clear cache
26
+ add_action( 'current_screen', array( $this, 'add_clear_cache') );
27
+ // $this->add_clear_cache();
28
+ // hooks related to admin notices
29
+ $this->admin_notice();
30
+ }
31
+
32
+ function add_clear_cache() {
33
 
34
  // clear cache
35
  add_action( 'update_option_ht_ctc_chat_options', array( $this, 'clear_cache') );
36
  add_action( 'update_option_ht_ctc_othersettings', array( $this, 'clear_cache') );
37
  add_action( 'update_option_ht_ctc_group', array( $this, 'clear_cache') );
38
  add_action( 'update_option_ht_ctc_share', array( $this, 'clear_cache') );
39
+ //customize styles
40
+ add_action( 'update_option_ht_ctc_s1', array( $this, 'clear_cache') );
41
+ add_action( 'update_option_ht_ctc_s2', array( $this, 'clear_cache') );
42
  add_action( 'update_option_ht_ctc_s3', array( $this, 'clear_cache') );
43
  add_action( 'update_option_ht_ctc_s4', array( $this, 'clear_cache') );
44
  add_action( 'update_option_ht_ctc_s5', array( $this, 'clear_cache') );
47
  add_action( 'update_option_ht_ctc_s8', array( $this, 'clear_cache') );
48
  add_action( 'update_option_ht_ctc_s99', array( $this, 'clear_cache') );
49
 
50
+ }
51
+
52
+ function admin_notice() {
53
+
54
  // Admin notices
55
  // if number blank
56
  $ht_ctc_chat_options = get_option('ht_ctc_chat_options');
new/admin/class-ht-ctc-admin-main-page.php CHANGED
@@ -91,6 +91,11 @@ class HT_CTC_Admin_Main_Page {
91
  add_settings_field( 'prefilled', __( 'Pre-Filled Message', 'click-to-chat-for-whatsapp'), array( $this, 'prefilled_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
92
  add_settings_field( 'cta', __( 'Call to Action', 'click-to-chat-for-whatsapp'), array( $this, 'cta_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
93
  add_settings_field( 'ctc_webandapi', __( 'Web WhatsApp', 'click-to-chat-for-whatsapp'), array( $this, 'ctc_webandapi_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
 
 
 
 
 
94
  add_settings_field( 'ctc_desktop', __( 'Dekstop', 'click-to-chat-for-whatsapp'), array( $this, 'ctc_desktop_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
95
  add_settings_field( 'ctc_mobile', __( 'Mobile', 'click-to-chat-for-whatsapp'), array( $this, 'ctc_mobile_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
96
  add_settings_field( 'ctc_show_hide', __( 'Display Settings', 'click-to-chat-for-whatsapp'), array( $this, 'ctc_show_hide_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
@@ -180,6 +185,7 @@ class HT_CTC_Admin_Main_Page {
180
  // If checked web / api whatsapp link. If unchecked wa.me links
181
  function ctc_webandapi_cb() {
182
  $options = get_option('ht_ctc_chat_options');
 
183
 
184
  if ( isset( $options['webandapi'] ) ) {
185
  ?>
@@ -207,6 +213,58 @@ class HT_CTC_Admin_Main_Page {
207
  <?php
208
  }
209
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
 
211
  // Dekstop
212
  function ctc_desktop_cb() {
91
  add_settings_field( 'prefilled', __( 'Pre-Filled Message', 'click-to-chat-for-whatsapp'), array( $this, 'prefilled_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
92
  add_settings_field( 'cta', __( 'Call to Action', 'click-to-chat-for-whatsapp'), array( $this, 'cta_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
93
  add_settings_field( 'ctc_webandapi', __( 'Web WhatsApp', 'click-to-chat-for-whatsapp'), array( $this, 'ctc_webandapi_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
94
+
95
+ if ( function_exists( 'amp_is_request' ) ) {
96
+ add_settings_field( 'ctc_amp', 'AMP', array( $this, 'ctc_amp_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
97
+ }
98
+
99
  add_settings_field( 'ctc_desktop', __( 'Dekstop', 'click-to-chat-for-whatsapp'), array( $this, 'ctc_desktop_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
100
  add_settings_field( 'ctc_mobile', __( 'Mobile', 'click-to-chat-for-whatsapp'), array( $this, 'ctc_mobile_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
101
  add_settings_field( 'ctc_show_hide', __( 'Display Settings', 'click-to-chat-for-whatsapp'), array( $this, 'ctc_show_hide_cb' ), 'ht_ctc_main_page_settings_sections_do', 'ht_ctc_chat_page_settings_sections_add' );
185
  // If checked web / api whatsapp link. If unchecked wa.me links
186
  function ctc_webandapi_cb() {
187
  $options = get_option('ht_ctc_chat_options');
188
+ $dbrow = 'ht_ctc_chat_options';
189
 
190
  if ( isset( $options['webandapi'] ) ) {
191
  ?>
213
  <?php
214
  }
215
 
216
+ // If checked web / api whatsapp link. If unchecked wa.me links
217
+ function ctc_amp_cb() {
218
+ $options = get_option('ht_ctc_chat_options');
219
+ $dbrow = 'ht_ctc_chat_options';
220
+
221
+ if ( function_exists( 'amp_is_request' ) ) {
222
+ ?>
223
+ <ul class="collapsible" data-collapsible="accordion" id="ht_ctc_amp">
224
+ <li class="active">
225
+ <div class="collapsible-header"><?php _e( 'AMP Compatibility', 'click-to-chat-for-whatsapp' ); ?> (Beta)</div>
226
+ <div class="collapsible-body">
227
+
228
+ <?php
229
+ // cache issue while selecting styles
230
+ if ( isset( $options['amp'] ) ) {
231
+ ?>
232
+ <p id="styles_issue">
233
+ <label>
234
+ <input name="<?php echo $dbrow ?>[amp]" type="checkbox" value="1" <?php checked( $options['amp'], 1 ); ?> id="amp" />
235
+ <span><?php _e( 'AMP Compatibility', 'click-to-chat-for-whatsapp' ); ?></span>
236
+ </label>
237
+ </p>
238
+ <?php
239
+ } else {
240
+ ?>
241
+ <p id="styles_issue">
242
+ <label>
243
+ <input name="<?php echo $dbrow ?>[amp]" type="checkbox" value="1" id="amp" />
244
+ <span><?php _e( 'AMP Compatibility', 'click-to-chat-for-whatsapp' ); ?></span>
245
+ </label>
246
+ </p>
247
+ <?php
248
+ }
249
+ ?>
250
+ <br>
251
+ <p class="description">In Beta Stage </p>
252
+ <p class="description">All the features are not fully compatibile. </p>
253
+ <br>
254
+ <p class="description">Plese contact us for any suggestions, feedback
255
+ <br>
256
+ Mail: <a href="mailto:ctc@holithemes.com">ctc@holithemes.com</a>
257
+ </p>
258
+ <br>
259
+ <p class="description" style="font-size: 0.8em;">After getting sufficent feedbacks, this option will be removed. And by default plugin is compatible with AMP</p>
260
+ </div>
261
+ </li>
262
+ </ul>
263
+ <?php
264
+ }
265
+
266
+ }
267
+
268
 
269
  // Dekstop
270
  function ctc_desktop_cb() {
new/admin/class-ht-ctc-db.php CHANGED
@@ -153,6 +153,11 @@ class HT_CTC_DB {
153
  );
154
  $values = array_merge($values, $mobile_values);
155
  }
 
 
 
 
 
156
 
157
 
158
  $db_values = get_option( 'ht_ctc_chat_options', array() );
153
  );
154
  $values = array_merge($values, $mobile_values);
155
  }
156
+
157
+ // enable by default for new installs.
158
+ // if ( !isset ( $this->os['version'] ) ) {
159
+ // $values['amp'] = '1';
160
+ // }
161
 
162
 
163
  $db_values = get_option( 'ht_ctc_chat_options', array() );
new/inc/assets/img/ht-ctc-svg-images.php CHANGED
@@ -73,8 +73,8 @@ function ht_ctc_style_3_1_svg( $img_size, $type, $ht_ctc_svg_css, $others ) {
73
  $svg = '<svg style="'.$ht_ctc_svg_css.'" width="'.$img_size.'" height="'.$img_size.'" viewBox="0 0 1219.547 1225.016">
74
  <path fill="#E0E0E0" d="M1041.858 178.02C927.206 63.289 774.753.07 612.325 0 277.617 0 5.232 272.298 5.098 606.991c-.039 106.986 27.915 211.42 81.048 303.476L0 1225.016l321.898-84.406c88.689 48.368 188.547 73.855 290.166 73.896h.258.003c334.654 0 607.08-272.346 607.222-607.023.056-162.208-63.052-314.724-177.689-429.463zm-429.533 933.963h-.197c-90.578-.048-179.402-24.366-256.878-70.339l-18.438-10.93-191.021 50.083 51-186.176-12.013-19.087c-50.525-80.336-77.198-173.175-77.16-268.504.111-278.186 226.507-504.503 504.898-504.503 134.812.056 261.519 52.604 356.814 147.965 95.289 95.36 147.728 222.128 147.688 356.948-.118 278.195-226.522 504.543-504.693 504.543z"/>
75
  <linearGradient id="htwaicona-'.$type.'" gradientUnits="userSpaceOnUse" x1="609.77" y1="1190.114" x2="609.77" y2="21.084">
76
- <stop offset="0" stop-color="'.$stop_color_0.'"/>
77
- <stop offset="1" stop-color="'.$stop_color_1.'"/>
78
  </linearGradient>
79
  <path fill="url(#htwaicona-'.$type.')" d="M27.875 1190.114l82.211-300.18c-50.719-87.852-77.391-187.523-77.359-289.602.133-319.398 260.078-579.25 579.469-579.25 155.016.07 300.508 60.398 409.898 169.891 109.414 109.492 169.633 255.031 169.57 409.812-.133 319.406-260.094 579.281-579.445 579.281-.023 0 .016 0 0 0h-.258c-96.977-.031-192.266-24.375-276.898-70.5l-307.188 80.548z"/>
80
  <image overflow="visible" opacity=".08" width="682" height="639" transform="translate(270.984 291.372)"/>
73
  $svg = '<svg style="'.$ht_ctc_svg_css.'" width="'.$img_size.'" height="'.$img_size.'" viewBox="0 0 1219.547 1225.016">
74
  <path fill="#E0E0E0" d="M1041.858 178.02C927.206 63.289 774.753.07 612.325 0 277.617 0 5.232 272.298 5.098 606.991c-.039 106.986 27.915 211.42 81.048 303.476L0 1225.016l321.898-84.406c88.689 48.368 188.547 73.855 290.166 73.896h.258.003c334.654 0 607.08-272.346 607.222-607.023.056-162.208-63.052-314.724-177.689-429.463zm-429.533 933.963h-.197c-90.578-.048-179.402-24.366-256.878-70.339l-18.438-10.93-191.021 50.083 51-186.176-12.013-19.087c-50.525-80.336-77.198-173.175-77.16-268.504.111-278.186 226.507-504.503 504.898-504.503 134.812.056 261.519 52.604 356.814 147.965 95.289 95.36 147.728 222.128 147.688 356.948-.118 278.195-226.522 504.543-504.693 504.543z"/>
75
  <linearGradient id="htwaicona-'.$type.'" gradientUnits="userSpaceOnUse" x1="609.77" y1="1190.114" x2="609.77" y2="21.084">
76
+ <stop id="s3_1_offset_1" offset="0" stop-color="'.$stop_color_0.'"/>
77
+ <stop id="s3_1_offset_2" offset="1" stop-color="'.$stop_color_1.'"/>
78
  </linearGradient>
79
  <path fill="url(#htwaicona-'.$type.')" d="M27.875 1190.114l82.211-300.18c-50.719-87.852-77.391-187.523-77.359-289.602.133-319.398 260.078-579.25 579.469-579.25 155.016.07 300.508 60.398 409.898 169.891 109.414 109.492 169.633 255.031 169.57 409.812-.133 319.406-260.094 579.281-579.445 579.281-.023 0 .016 0 0 0h-.258c-96.977-.031-192.266-24.375-276.898-70.5l-307.188 80.548z"/>
80
  <image overflow="visible" opacity=".08" width="682" height="639" transform="translate(270.984 291.372)"/>
new/inc/assets/js/dev/app.dev.js CHANGED
@@ -109,12 +109,9 @@ function display(p) {
109
  try {
110
  var dt = parseInt(p.getAttribute('data-show_effect'));
111
  $(p).show(dt);
112
- // $(p).fadeIn(1000);
113
  } catch (e) {
114
  p.style.display = "block";
115
  }
116
- // $(".ht-ctc-chat").show(120);
117
- // $(".ht-ctc-chat").fadeIn();
118
 
119
  try {
120
  ht_ctc_things(p);
@@ -220,7 +217,7 @@ function ht_ctc_link(values) {
220
  var base_link = 'https://wa.me/';
221
  window.open(base_link + number + '?text=' + pre_filled, '_blank', 'noopener');
222
  }
223
-
224
  }
225
 
226
 
@@ -233,8 +230,4 @@ function ht_ctc_link(values) {
233
  function ht_ctc_click(values) {
234
  console.log(values);
235
  return;
236
- }
237
- function ht_ctc_shortcode_click(values) {
238
- console.log(values);
239
- return;
240
  }
109
  try {
110
  var dt = parseInt(p.getAttribute('data-show_effect'));
111
  $(p).show(dt);
 
112
  } catch (e) {
113
  p.style.display = "block";
114
  }
 
 
115
 
116
  try {
117
  ht_ctc_things(p);
217
  var base_link = 'https://wa.me/';
218
  window.open(base_link + number + '?text=' + pre_filled, '_blank', 'noopener');
219
  }
220
+
221
  }
222
 
223
 
230
  function ht_ctc_click(values) {
231
  console.log(values);
232
  return;
 
 
 
 
233
  }
new/inc/chat/class-ht-ctc-chat-shortcode.php CHANGED
@@ -166,7 +166,6 @@ class HT_CTC_Chat_Shortcode {
166
  // analytics
167
  $ht_ctc_os['is_ga_enable'] = 'yes';
168
  $ht_ctc_os['is_fb_pixel'] = 'yes';
169
- $ht_ctc_os['is_fb_an_enable'] = 'yes';
170
 
171
  // Hooks
172
  $ht_ctc_os = apply_filters( 'ht_ctc_fh_os', $ht_ctc_os );
@@ -180,13 +179,13 @@ class HT_CTC_Chat_Shortcode {
180
  // todo: 3.3 - later have to remove onclick attribute
181
 
182
  if ( is_file( $sc_path ) ) {
183
- $o .= '<div onclick="ht_ctc_shortcode_click(this);" 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_an_enable="'.$ht_ctc_os['is_fb_an_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">';
184
  include $sc_path;
185
  $o .= '</div>';
186
  } else {
187
  // if style is not in the list..
188
  $img_link = plugins_url("./new/inc/assets/img/whatsapp-logo.svg", HT_CTC_PLUGIN_FILE );
189
- $o .= '<div onclick="ht_ctc_shortcode_click(this);" 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_an_enable="'.$ht_ctc_os['is_fb_an_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">';
190
  $o .= '<img class="img-icon-sc sc_item pointer style-3-sc" src="'.$img_link.'" alt="'.$call_to_action.'" style="height: 50px; '.$css.' " >';
191
  $o .= '</div>';
192
  }
166
  // analytics
167
  $ht_ctc_os['is_ga_enable'] = 'yes';
168
  $ht_ctc_os['is_fb_pixel'] = 'yes';
 
169
 
170
  // Hooks
171
  $ht_ctc_os = apply_filters( 'ht_ctc_fh_os', $ht_ctc_os );
179
  // todo: 3.3 - later have to remove onclick attribute
180
 
181
  if ( is_file( $sc_path ) ) {
182
+ $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">';
183
  include $sc_path;
184
  $o .= '</div>';
185
  } else {
186
  // if style is not in the list..
187
  $img_link = plugins_url("./new/inc/assets/img/whatsapp-logo.svg", HT_CTC_PLUGIN_FILE );
188
+ $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">';
189
  $o .= '<img class="img-icon-sc sc_item pointer style-3-sc" src="'.$img_link.'" alt="'.$call_to_action.'" style="height: 50px; '.$css.' " >';
190
  $o .= '</div>';
191
  }
new/inc/chat/class-ht-ctc-chat.php CHANGED
@@ -43,17 +43,19 @@ class HT_CTC_Chat {
43
  }
44
 
45
 
46
- // position
47
- include HT_CTC_PLUGIN_DIR .'new/inc/commons/position-to-place.php';
48
- $ht_ctc_chat['position'] = $position;
49
- $ht_ctc_chat['position_mobile'] = $position_mobile;
50
-
51
  // is mobile
52
  $is_mobile = ht_ctc()->device_type->is_mobile();
53
  // style
54
  $ht_ctc_chat['style_desktop'] = esc_attr( $options['style_desktop'] );
55
  $ht_ctc_chat['style_mobile'] = esc_attr( $options['style_mobile'] );
56
 
 
 
 
 
 
 
 
57
  $page_id = get_the_ID();
58
  $page_url = get_permalink();
59
  $post_title = esc_html( get_the_title() );
@@ -105,7 +107,6 @@ class HT_CTC_Chat {
105
  // analytics
106
  $ht_ctc_os['is_ga_enable'] = 'yes';
107
  $ht_ctc_os['is_fb_pixel'] = 'yes';
108
- $ht_ctc_os['is_fb_an_enable'] = 'yes';
109
  // show effect
110
  $ht_ctc_os['show_effect'] = '';
111
  $ht_ctc_os['data-attributes'] = '';
@@ -117,9 +118,6 @@ class HT_CTC_Chat {
117
  // pre-filled - have to run after filter hook.
118
  $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'] );
119
 
120
- // Fallback support - js will override this css
121
- $backend_position = $ht_ctc_chat['position'];
122
-
123
  // style for desktop, mobile
124
  if ( 'yes' == $is_mobile ) {
125
  $ht_ctc_chat['style'] = $ht_ctc_chat['style_mobile'];
@@ -150,20 +148,53 @@ class HT_CTC_Chat {
150
  }
151
  }
152
 
 
153
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
  if ( is_file( $path ) ) {
155
  do_action('ht_ctc_ah_before_fixed_position');
156
  // todo: 3.3 - later have to remove onclick attribute
157
  ?>
158
- <div onclick="ht_ctc_click(this);" class="<?php echo $ht_ctc_chat['class_names'] ?>"
159
- style="display: none; <?php echo $backend_position ?>"
160
  data-return_type="<?php echo $type ?>"
161
  data-style="<?php echo $ht_ctc_chat['style'] ?>"
162
  data-number="<?php echo $ht_ctc_chat['number'] ?>"
163
  data-pre_filled="<?php echo $ht_ctc_chat['pre_filled'] ?>"
164
  data-is_ga_enable="<?php echo $ht_ctc_os['is_ga_enable'] ?>"
165
  data-is_fb_pixel="<?php echo $ht_ctc_os['is_fb_pixel'] ?>"
166
- data-is_fb_an_enable="<?php echo $ht_ctc_os['is_fb_an_enable'] ?>"
167
  data-webandapi="<?php echo $ht_ctc_chat['webandapi'] ?>"
168
  data-display_mobile="<?php echo $ht_ctc_chat['display_mobile'] ?>"
169
  data-display_desktop="<?php echo $ht_ctc_chat['display_desktop'] ?>"
@@ -172,7 +203,8 @@ class HT_CTC_Chat {
172
  data-position_mobile="<?php echo $ht_ctc_chat['position_mobile'] ?>"
173
  data-show_effect="<?php echo $ht_ctc_os['show_effect'] ?>"
174
  data-no_number="<?php echo $no_number ?>"
175
- <?php echo $ht_ctc_os['data-attributes'] ?>
 
176
  >
177
  <?php
178
  if ( isset( $othersettings['select_styles_issue'] ) ) {
43
  }
44
 
45
 
 
 
 
 
 
46
  // is mobile
47
  $is_mobile = ht_ctc()->device_type->is_mobile();
48
  // style
49
  $ht_ctc_chat['style_desktop'] = esc_attr( $options['style_desktop'] );
50
  $ht_ctc_chat['style_mobile'] = esc_attr( $options['style_mobile'] );
51
 
52
+ // position
53
+ $default_position = '';
54
+ include HT_CTC_PLUGIN_DIR .'new/inc/commons/position-to-place.php';
55
+ $ht_ctc_chat['position'] = $position;
56
+ $ht_ctc_chat['position_mobile'] = $position_mobile;
57
+
58
+
59
  $page_id = get_the_ID();
60
  $page_url = get_permalink();
61
  $post_title = esc_html( get_the_title() );
107
  // analytics
108
  $ht_ctc_os['is_ga_enable'] = 'yes';
109
  $ht_ctc_os['is_fb_pixel'] = 'yes';
 
110
  // show effect
111
  $ht_ctc_os['show_effect'] = '';
112
  $ht_ctc_os['data-attributes'] = '';
118
  // pre-filled - have to run after filter hook.
119
  $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'] );
120
 
 
 
 
121
  // style for desktop, mobile
122
  if ( 'yes' == $is_mobile ) {
123
  $ht_ctc_chat['style'] = $ht_ctc_chat['style_mobile'];
148
  }
149
  }
150
 
151
+ $display_css = "display: none; ";
152
 
153
+ // AMP
154
+ $on = "";
155
+ $onclick = "onclick='ht_ctc_click(this)'";
156
+
157
+ // AMP
158
+ if ( isset($options['amp']) ) {
159
+ // ampforwp_is_amp_endpoint / is_amp_endpoint / amp_is_request
160
+ if ( function_exists( 'amp_is_request' ) && amp_is_request() ) {
161
+
162
+ $onclick = "";
163
+ if ( 'yes' == $is_mobile ) {
164
+ if ( 'show' == $ht_ctc_chat['display_mobile'] ) {
165
+ $display_css = "";
166
+ }
167
+ } else {
168
+ if ( 'show' == $ht_ctc_chat['display_desktop'] ) {
169
+ $display_css = "";
170
+ }
171
+ }
172
+
173
+ $pre = rawurlencode($ht_ctc_chat['pre_filled']);
174
+ // 'single quote', 'double quote', '&', '<', '>'
175
+ $pre = str_replace( array('%26%23039%3B', '%26quot%3B', '%26amp%3B', '%26lt%3B', '%26gt%3B'), array('', '', '', '<', '>'), $pre);
176
+ $ext = $ht_ctc_chat['number'] . '?text=' . $pre;
177
+ $wame_link = "https://wa.me/$ext";
178
+ $on = "on=\"tap:AMP.navigateTo(url='$wame_link', target='_blank', opener='')\"";
179
+
180
+ wp_deregister_script( 'ht_ctc_app_js' );
181
+ }
182
+ }
183
+
184
+
185
+
186
  if ( is_file( $path ) ) {
187
  do_action('ht_ctc_ah_before_fixed_position');
188
  // todo: 3.3 - later have to remove onclick attribute
189
  ?>
190
+ <div <?php echo $onclick ?> class="<?php echo $ht_ctc_chat['class_names'] ?>"
191
+ style="<?php echo $display_css ?> <?php echo $default_position ?>"
192
  data-return_type="<?php echo $type ?>"
193
  data-style="<?php echo $ht_ctc_chat['style'] ?>"
194
  data-number="<?php echo $ht_ctc_chat['number'] ?>"
195
  data-pre_filled="<?php echo $ht_ctc_chat['pre_filled'] ?>"
196
  data-is_ga_enable="<?php echo $ht_ctc_os['is_ga_enable'] ?>"
197
  data-is_fb_pixel="<?php echo $ht_ctc_os['is_fb_pixel'] ?>"
 
198
  data-webandapi="<?php echo $ht_ctc_chat['webandapi'] ?>"
199
  data-display_mobile="<?php echo $ht_ctc_chat['display_mobile'] ?>"
200
  data-display_desktop="<?php echo $ht_ctc_chat['display_desktop'] ?>"
203
  data-position_mobile="<?php echo $ht_ctc_chat['position_mobile'] ?>"
204
  data-show_effect="<?php echo $ht_ctc_os['show_effect'] ?>"
205
  data-no_number="<?php echo $no_number ?>"
206
+ <?php echo $ht_ctc_os['data-attributes'] ?>
207
+ <?php echo $on ?>
208
  >
209
  <?php
210
  if ( isset( $othersettings['select_styles_issue'] ) ) {
new/inc/commons/class-ht-ctc-scripts.php CHANGED
@@ -25,9 +25,6 @@ class HT_CTC_Scripts {
25
  // true/false
26
  $load_app_js_bottom = apply_filters( 'ht_ctc_fh_load_app_js_bottom', true );
27
 
28
- // style-8 - enqueue at style page
29
- wp_register_style('ht_ctc_mdstyle8_css', plugins_url( 'new/inc/assets/css/mdstyle8.css', HT_CTC_PLUGIN_FILE ) , '', HT_CTC_VERSION );
30
-
31
  // js
32
  $js = 'app.js';
33
  $group_js = 'group.js';
25
  // true/false
26
  $load_app_js_bottom = apply_filters( 'ht_ctc_fh_load_app_js_bottom', true );
27
 
 
 
 
28
  // js
29
  $js = 'app.js';
30
  $group_js = 'group.js';
new/inc/commons/position-to-place.php CHANGED
@@ -27,7 +27,14 @@ $mobile_side_2_value = ( isset( $options['mobile_side_2_value'])) ? esc_attr( $o
27
 
28
  $position_mobile = "position: $position_type_mobile; $mobile_side_1: $mobile_side_1_value; $mobile_side_2: $mobile_side_2_value;";
29
 
30
- // incase mobile position is null; - safeside can remove this later as db is handling the updates
31
  if ( '' == $mobile_side_1_value && '' == $mobile_side_2_value ) {
32
  $position_mobile = $position;
 
 
 
 
 
 
 
33
  }
27
 
28
  $position_mobile = "position: $position_type_mobile; $mobile_side_1: $mobile_side_1_value; $mobile_side_2: $mobile_side_2_value;";
29
 
30
+ // incase mobile position is null; - safeside can remove this later as db is handling the version updates
31
  if ( '' == $mobile_side_1_value && '' == $mobile_side_2_value ) {
32
  $position_mobile = $position;
33
+ }
34
+
35
+ // wp_is_mobile way of position (amp may need this)
36
+ // js will override this based on screen size
37
+ $default_position = $position;
38
+ if ( 'yes' == $is_mobile ) {
39
+ $default_position = $position_mobile;
40
  }
new/inc/group/class-ht-ctc-group-shortcode.php CHANGED
@@ -142,7 +142,6 @@ 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['is_fb_an_enable'] = 'yes';
146
 
147
  // Hooks
148
  $ht_ctc_os = apply_filters( 'ht_ctc_fh_os', $ht_ctc_os );
@@ -154,13 +153,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'].'" data-is_fb_an_enable="'.$ht_ctc_os['is_fb_an_enable'].'" 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'].'" data-is_fb_an_enable="'.$ht_ctc_os['is_fb_an_enable'].'" 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
 
146
  // Hooks
147
  $ht_ctc_os = apply_filters( 'ht_ctc_fh_os', $ht_ctc_os );
153
  $sc_path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles-shortcode/sc-style-' . $style. '.php';
154
 
155
  if ( is_file( $sc_path ) ) {
156
+ $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">';
157
  include $sc_path;
158
  $o .= '</div>';
159
  } else {
160
  // if style is not in the list..
161
  $img_link = plugins_url("./new/inc/assets/img/whatsapp-logo.svg", HT_CTC_PLUGIN_FILE );
162
+ $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">';
163
  $o .= '<img class="img-icon-sc sc_item pointer style-3-sc" src="'.$img_link.'" alt="'.$call_to_action.'" style="height: 50px; '.$css.' " >';
164
  $o .= '</div>';
165
  }
new/inc/group/class-ht-ctc-group.php CHANGED
@@ -34,12 +34,6 @@ class HT_CTC_Group {
34
  return;
35
  }
36
 
37
-
38
- // position
39
- include HT_CTC_PLUGIN_DIR .'new/inc/commons/position-to-place.php';
40
- $ht_ctc_group['position'] = $position;
41
- $ht_ctc_group['position_mobile'] = $position_mobile;
42
-
43
  // is mobile to select styles
44
  $is_mobile = ht_ctc()->device_type->is_mobile();
45
 
@@ -47,6 +41,11 @@ class HT_CTC_Group {
47
  $ht_ctc_group['style_desktop'] = esc_attr( $options['style_desktop'] );
48
  $ht_ctc_group['style_mobile'] = esc_attr( $options['style_mobile'] );
49
 
 
 
 
 
 
50
  // call to action
51
  $ht_ctc_group['call_to_action'] = esc_attr( $options['call_to_action'] );
52
  $ht_ctc_group['call_to_action'] = apply_filters( 'wpml_translate_single_string', $ht_ctc_group['call_to_action'], 'Click to Chat for WhatsApp', 'call_to_action__group' );
@@ -76,7 +75,6 @@ class HT_CTC_Group {
76
  // analytics
77
  $ht_ctc_os['is_ga_enable'] = 'yes';
78
  $ht_ctc_os['is_fb_pixel'] = 'yes';
79
- $ht_ctc_os['is_fb_an_enable'] = 'yes';
80
  // show effect
81
  $ht_ctc_os['show_effect'] = '';
82
  $ht_ctc_os['data-attributes'] = '';
@@ -122,7 +120,6 @@ class HT_CTC_Group {
122
  data-group_id="<?php echo $ht_ctc_group['group_id'] ?>"
123
  data-is_ga_enable="<?php echo $ht_ctc_os['is_ga_enable'] ?>"
124
  data-is_fb_pixel="<?php echo $ht_ctc_os['is_fb_pixel'] ?>"
125
- data-is_fb_an_enable="<?php echo $ht_ctc_os['is_fb_an_enable'] ?>"
126
  data-display_mobile="<?php echo $ht_ctc_group['display_mobile'] ?>"
127
  data-display_desktop="<?php echo $ht_ctc_group['display_desktop'] ?>"
128
  data-css="<?php echo $ht_ctc_group['css'] ?>"
34
  return;
35
  }
36
 
 
 
 
 
 
 
37
  // is mobile to select styles
38
  $is_mobile = ht_ctc()->device_type->is_mobile();
39
 
41
  $ht_ctc_group['style_desktop'] = esc_attr( $options['style_desktop'] );
42
  $ht_ctc_group['style_mobile'] = esc_attr( $options['style_mobile'] );
43
 
44
+ // position
45
+ include HT_CTC_PLUGIN_DIR .'new/inc/commons/position-to-place.php';
46
+ $ht_ctc_group['position'] = $position;
47
+ $ht_ctc_group['position_mobile'] = $position_mobile;
48
+
49
  // call to action
50
  $ht_ctc_group['call_to_action'] = esc_attr( $options['call_to_action'] );
51
  $ht_ctc_group['call_to_action'] = apply_filters( 'wpml_translate_single_string', $ht_ctc_group['call_to_action'], 'Click to Chat for WhatsApp', 'call_to_action__group' );
75
  // analytics
76
  $ht_ctc_os['is_ga_enable'] = 'yes';
77
  $ht_ctc_os['is_fb_pixel'] = 'yes';
 
78
  // show effect
79
  $ht_ctc_os['show_effect'] = '';
80
  $ht_ctc_os['data-attributes'] = '';
120
  data-group_id="<?php echo $ht_ctc_group['group_id'] ?>"
121
  data-is_ga_enable="<?php echo $ht_ctc_os['is_ga_enable'] ?>"
122
  data-is_fb_pixel="<?php echo $ht_ctc_os['is_fb_pixel'] ?>"
 
123
  data-display_mobile="<?php echo $ht_ctc_group['display_mobile'] ?>"
124
  data-display_desktop="<?php echo $ht_ctc_group['display_desktop'] ?>"
125
  data-css="<?php echo $ht_ctc_group['css'] ?>"
new/inc/share/class-ht-ctc-share-shortcode.php CHANGED
@@ -163,7 +163,6 @@ 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['is_fb_an_enable'] = 'yes';
167
 
168
  // Hooks
169
  $ht_ctc_os = apply_filters( 'ht_ctc_fh_os', $ht_ctc_os );
@@ -175,13 +174,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'].'" data-is_fb_an_enable="'.$ht_ctc_os['is_fb_an_enable'].'" 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'].'" data-is_fb_an_enable="'.$ht_ctc_os['is_fb_an_enable'].'" 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
 
167
  // Hooks
168
  $ht_ctc_os = apply_filters( 'ht_ctc_fh_os', $ht_ctc_os );
174
  $sc_path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles-shortcode/sc-style-' . $style. '.php';
175
 
176
  if ( is_file( $sc_path ) ) {
177
+ $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">';
178
  include $sc_path;
179
  $o .= '</div>';
180
  } else {
181
  // if style is not in the list..
182
  $img_link = plugins_url("./new/inc/assets/img/whatsapp-logo.svg", HT_CTC_PLUGIN_FILE );
183
+ $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">';
184
  $o .= '<img class="img-icon-sc sc_item pointer style-3-sc" src="'.$img_link.'" alt="'.$call_to_action.'" style="height: 50px; '.$css.' " >';
185
  $o .= '</div>';
186
  }
new/inc/share/class-ht-ctc-share.php CHANGED
@@ -44,11 +44,6 @@ class HT_CTC_Share {
44
  }
45
 
46
 
47
- // position
48
- include HT_CTC_PLUGIN_DIR .'new/inc/commons/position-to-place.php';
49
- $ht_ctc_share['position'] = $position;
50
- $ht_ctc_share['position_mobile'] = $position_mobile;
51
-
52
  // is mobile to select styles
53
  $is_mobile = ht_ctc()->device_type->is_mobile();
54
 
@@ -56,6 +51,11 @@ class HT_CTC_Share {
56
  $ht_ctc_share['style_desktop'] = esc_attr( $options['style_desktop'] );
57
  $ht_ctc_share['style_mobile'] = esc_attr( $options['style_mobile'] );
58
 
 
 
 
 
 
59
  // call to action
60
  $ht_ctc_share['call_to_action'] = esc_html( $options['call_to_action'] );
61
  $ht_ctc_share['call_to_action'] = apply_filters( 'wpml_translate_single_string', $ht_ctc_share['call_to_action'], 'Click to Chat for WhatsApp', 'call_to_action__share' );
@@ -88,7 +88,6 @@ class HT_CTC_Share {
88
  // analytics
89
  $ht_ctc_os['is_ga_enable'] = 'yes';
90
  $ht_ctc_os['is_fb_pixel'] = 'yes';
91
- $ht_ctc_os['is_fb_an_enable'] = 'yes';
92
  // show effect
93
  $ht_ctc_os['show_effect'] = '';
94
  $ht_ctc_os['data-attributes'] = '';
@@ -135,7 +134,6 @@ class HT_CTC_Share {
135
  data-share_text="<?php echo $ht_ctc_share['share_text'] ?>"
136
  data-is_ga_enable="<?php echo $ht_ctc_os['is_ga_enable'] ?>"
137
  data-is_fb_pixel="<?php echo $ht_ctc_os['is_fb_pixel'] ?>"
138
- data-is_fb_an_enable="<?php echo $ht_ctc_os['is_fb_an_enable'] ?>"
139
  data-webandapi="<?php echo $ht_ctc_share['webandapi'] ?>"
140
  data-display_mobile="<?php echo $ht_ctc_share['display_mobile'] ?>"
141
  data-display_desktop="<?php echo $ht_ctc_share['display_desktop'] ?>"
44
  }
45
 
46
 
 
 
 
 
 
47
  // is mobile to select styles
48
  $is_mobile = ht_ctc()->device_type->is_mobile();
49
 
51
  $ht_ctc_share['style_desktop'] = esc_attr( $options['style_desktop'] );
52
  $ht_ctc_share['style_mobile'] = esc_attr( $options['style_mobile'] );
53
 
54
+ // position
55
+ include HT_CTC_PLUGIN_DIR .'new/inc/commons/position-to-place.php';
56
+ $ht_ctc_share['position'] = $position;
57
+ $ht_ctc_share['position_mobile'] = $position_mobile;
58
+
59
  // call to action
60
  $ht_ctc_share['call_to_action'] = esc_html( $options['call_to_action'] );
61
  $ht_ctc_share['call_to_action'] = apply_filters( 'wpml_translate_single_string', $ht_ctc_share['call_to_action'], 'Click to Chat for WhatsApp', 'call_to_action__share' );
88
  // analytics
89
  $ht_ctc_os['is_ga_enable'] = 'yes';
90
  $ht_ctc_os['is_fb_pixel'] = 'yes';
 
91
  // show effect
92
  $ht_ctc_os['show_effect'] = '';
93
  $ht_ctc_os['data-attributes'] = '';
134
  data-share_text="<?php echo $ht_ctc_share['share_text'] ?>"
135
  data-is_ga_enable="<?php echo $ht_ctc_os['is_ga_enable'] ?>"
136
  data-is_fb_pixel="<?php echo $ht_ctc_os['is_fb_pixel'] ?>"
 
137
  data-webandapi="<?php echo $ht_ctc_share['webandapi'] ?>"
138
  data-display_mobile="<?php echo $ht_ctc_share['display_mobile'] ?>"
139
  data-display_desktop="<?php echo $ht_ctc_share['display_desktop'] ?>"
new/inc/styles-shortcode/sc-style-3_1.php CHANGED
@@ -1,7 +1,6 @@
1
  <?php
2
  /**
3
- *
4
- *
5
  */
6
 
7
  if ( ! defined( 'ABSPATH' ) ) exit;
@@ -44,11 +43,12 @@ $others = array(
44
 
45
  $style_3_extend_svg = ht_ctc_style_3_1_svg( $img_size, $type, $ht_ctc_svg_css, $others );;
46
 
47
- ?>
48
- <style id="ht-ctc-sc-s8">
49
- .ht-ctc-sc:hover svg stop{stop-color:<?php echo $s3_bg_color_hover ?>;}.ht-ctc-sc:hover .ht_ctc_padding{<?php echo $s3_hover_css ?>}
50
- </style>
51
- <?php
 
52
 
53
  $s3_extend = '';
54
  $s3_extend .= '
1
  <?php
2
  /**
3
+ * sc s3 Extend
 
4
  */
5
 
6
  if ( ! defined( 'ABSPATH' ) ) exit;
43
 
44
  $style_3_extend_svg = ht_ctc_style_3_1_svg( $img_size, $type, $ht_ctc_svg_css, $others );;
45
 
46
+
47
+ // styles
48
+ $o .= '<style id="ht-ctc-sc-s8">';
49
+ $o .= '.ht-ctc-sc:hover svg stop{stop-color:'.$s3_bg_color_hover.';}.ht-ctc-sc:hover .ht_ctc_padding{'.$s3_hover_css.'}';
50
+ $o .= '</style>';
51
+
52
 
53
  $s3_extend = '';
54
  $s3_extend .= '
new/inc/styles-shortcode/sc-style-7.php CHANGED
@@ -56,11 +56,12 @@ $s7_hover_icon_styles = ".ht-ctc-sc.sc-style-7:hover .ctc_s_7_icon_padding{backg
56
  include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
57
 
58
  $style_7_svg = ht_ctc_singlecolor( $s7_svg_attrs );
59
- ?>
60
- <style id="ht-ctc-sc-s7">
61
- <?php echo $s7_hover_icon_styles ?>
62
- </style>
63
- <?php
 
64
  $o .= '
65
  <div '.$title.' class="ctc_s_7" style="'.$s7_n1_styles.'">
66
  <p class="ctc_s_7_cta ctc-analytics '.$s7_cta_class.'" style="'.$s7_cta_css.'">'.$call_to_action.'</p>
56
  include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
57
 
58
  $style_7_svg = ht_ctc_singlecolor( $s7_svg_attrs );
59
+
60
+
61
+ $o .= '<style id="ht-ctc-sc-s7">';
62
+ $o .= '.ht-ctc-sc.sc-style-7:hover .ctc_s_7_icon_padding{background-color:'.$s7_border_color_hover.' !important;}.ht-ctc-sc.sc-style-7:hover svg g path{fill:'.$s7_icon_color_hover.' !important;}';
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>
new/inc/styles-shortcode/sc-style-7_1.php CHANGED
@@ -25,14 +25,15 @@ $s7_n1_styles = "display:inline-flex;justify-content:center;align-items:center;"
25
  $s7_cta_css = "";
26
  $s7_icon_padding_css = "";
27
  $s7_cta_class = "ht-ctc-cta ";
28
- $s7_hover_styles = "";
29
 
30
  // hover style is not there in shortcodes..
31
  $s7_n1_styles .= "padding:5px 25px; background-color:$s7_bgcolor;border-radius:25px;";
32
  $s7_cta_css .= "padding: 1px 16px; color: $s7_icon_color; border-radius:10px; margin:0 10px; order: $s7_cta_order; ";
33
  $s7_icon_padding_css .= "";
34
- $s7_hover_styles = ".ht-ctc.style-7_1:hover .ctc_s_7_1{background-color:$s7_bgcolor_hover !important;}.ht-ctc.style-7_1:hover .ctc_s_7_1_cta{color:$s7_icon_color_hover !important;}.ht-ctc.style-7_1:hover svg g path{fill:$s7_icon_color_hover !important;}";
35
 
 
 
 
36
 
37
  // svg values
38
  $ht_ctc_svg_css = "pointer-events:none; display:block; height:$s7_icon_size; width:$s7_icon_size;";
@@ -47,11 +48,9 @@ include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
47
 
48
  $style_7_1_svg = ht_ctc_singlecolor( $s7_svg_attrs );
49
 
50
- ?>
51
- <style id="ht-ctc-sc-s7_1">
52
- <?php echo $s7_hover_styles ?>
53
- </style>
54
- <?php
55
 
56
  $o .= '
57
  <div class="ctc_s_7_1" style="'.$s7_n1_styles.'">
25
  $s7_cta_css = "";
26
  $s7_icon_padding_css = "";
27
  $s7_cta_class = "ht-ctc-cta ";
 
28
 
29
  // hover style is not there in shortcodes..
30
  $s7_n1_styles .= "padding:5px 25px; background-color:$s7_bgcolor;border-radius:25px;";
31
  $s7_cta_css .= "padding: 1px 16px; color: $s7_icon_color; border-radius:10px; margin:0 10px; order: $s7_cta_order; ";
32
  $s7_icon_padding_css .= "";
 
33
 
34
+ // $s7_mouse_hover = "this.style.backgroundColor= '$s7_bgcolor_hover', this.querySelector('.ctc_s_7_1_cta').style.color= '$s7_icon_color_hover', this.querySelector('svg g path').style.fill= '$s7_icon_color_hover' ";
35
+ // $s7_mouse_out = "this.style.backgroundColor= '$s7_bgcolor', this.querySelector('.ctc_s_7_1_cta').style.color= '$s7_icon_color', this.querySelector('svg g path').style.fill= '$s7_icon_color' ";
36
+ // onmouseover="'.$s7_mouse_hover.'" onmouseout="'.$s7_mouse_out.'"
37
 
38
  // svg values
39
  $ht_ctc_svg_css = "pointer-events:none; display:block; height:$s7_icon_size; width:$s7_icon_size;";
48
 
49
  $style_7_1_svg = ht_ctc_singlecolor( $s7_svg_attrs );
50
 
51
+ $o .= '<style id="ht-ctc-sc-s7_1">';
52
+ $o .= '.ht-ctc-sc.sc-style-7_1:hover .ctc_s_7_1{background-color:'.$s7_bgcolor_hover.' !important;}.ht-ctc-sc.sc-style-7_1:hover .ctc_s_7_1_cta{color:'.$s7_icon_color_hover.' !important;}.ht-ctc-sc.sc-style-7_1:hover svg g path{fill:'.$s7_icon_color_hover.' !important;}';
53
+ $o .= '</style>';
 
 
54
 
55
  $o .= '
56
  <div class="ctc_s_7_1" style="'.$s7_n1_styles.'">
new/inc/styles-shortcode/sc-style-8.php CHANGED
@@ -60,11 +60,12 @@ if ('hide' !== $s8_icon_position) {
60
  include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
61
  $style_8_svg = ht_ctc_singlecolor( $s8_svg_attrs );
62
  }
63
- ?>
64
- <style id="ht-ctc-sc-s8">
65
- .ht-ctc-sc .ht-ctc-style-8 .s_8 svg{<?php echo $s8_icon_css ?>;}.ht-ctc-sc:hover svg g path{fill:<?php echo $s8_txt_color_on_hover ?> !important;}.ht-ctc-sc:hover .ht-ctc-s8-text{color:<?php echo $s8_txt_color_on_hover ?> !important;}.ht-ctc-sc:hover .ht-ctc-style-8 .s_8{box-shadow: 0 3px 3px 0 rgba(7,6,6,.14), 0 1px 7px 0 rgba(0,0,0,.12), 0 3px 1px -1px rgba(0,0,0,.2) !important; transition: .2s ease-out !important; background-color:<?php echo $s8_bg_color_on_hover ?> !important; }
66
- </style>
67
- <?php
 
68
  $o .= '
69
  <div class="ht-ctc-style-8 ctc-analytics" style="display: inline-block; '.$s8_width_css.' " >
70
  <span class="s_8 waves-effect waves-light ctc-analytics" style="'.$s8_main_span_css.' ">
60
  include_once HT_CTC_PLUGIN_DIR .'new/inc/assets/img/ht-ctc-svg-images.php';
61
  $style_8_svg = ht_ctc_singlecolor( $s8_svg_attrs );
62
  }
63
+
64
+ // styles
65
+ $o .= '<style>';
66
+ $o .= '.ht-ctc-sc .ht-ctc-style-8 .s_8 svg{'.$s8_icon_css.'}.ht-ctc-sc:hover svg g path{fill:'.$s8_txt_color_on_hover.' !important;}.ht-ctc-sc:hover .ht-ctc-s8-text{color:'.$s8_txt_color_on_hover.' !important;}.ht-ctc-sc:hover .ht-ctc-style-8 .s_8{box-shadow: 0 3px 3px 0 rgba(7,6,6,.14), 0 1px 7px 0 rgba(0,0,0,.12), 0 3px 1px -1px rgba(0,0,0,.2) !important; transition: .2s ease-out !important; background-color:'.$s8_bg_color_on_hover.' !important; }';
67
+ $o .= '</style>';
68
+
69
  $o .= '
70
  <div class="ht-ctc-style-8 ctc-analytics" style="display: inline-block; '.$s8_width_css.' " >
71
  <span class="s_8 waves-effect waves-light ctc-analytics" style="'.$s8_main_span_css.' ">
readme.txt CHANGED
@@ -3,7 +3,7 @@ Requires at least: 4.6
3
  Tested up to: 5.6
4
  Requires PHP: 5.6
5
  Contributors: holithemes
6
- Stable tag: 3.2.3
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
@@ -395,6 +395,11 @@ After Activate the plugin, add WhatsApp Number at plugin settings.
395
 
396
  == Changelog ==
397
 
 
 
 
 
 
398
  = 3.2.3 =
399
  * Updated Show/Hide settings
400
  * Fix: Style-7 Background-color on hover issue
3
  Tested up to: 5.6
4
  Requires PHP: 5.6
5
  Contributors: holithemes
6
+ Stable tag: 3.2.4
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
395
 
396
  == Changelog ==
397
 
398
+ = 3.2.4 =
399
+ * AMP Compatibility - 1st version
400
+ * Updated: Positions to place
401
+ * Fix: Shortcode hover color effects
402
+
403
  = 3.2.3 =
404
  * Updated Show/Hide settings
405
  * Fix: Style-7 Background-color on hover issue