Version Description
- Enchantment: Greetings settings
- WhatsApp popup window width updated to display qr code in initial viewport
Download this release
Release Info
Developer | bhvreddy |
Plugin | Click to Chat for WhatsApp Chat |
Version | 3.12.2 |
Comparing to | |
See all releases |
Code changes from version 3.12 to 3.12.2
- click-to-chat.php +2 -2
- common/class-ht-ctc-switch.php +1 -0
- new/admin/admin_assets/js/admin.js +2 -0
- new/admin/admin_assets/js/greetings.js +10 -3
- new/admin/class-ht-ctc-admin-greetings-page.php +9 -0
- new/admin/class-ht-ctc-admin-main-page.php +2 -5
- new/admin/class-ht-ctc-admin-other-settings.php +1 -1
- new/admin/class-ht-ctc-admin-scripts.php +17 -3
- new/inc/assets/js/app.js +1 -1
- new/inc/assets/js/dev/app.dev.js +1 -1
- new/inc/chat/class-ht-ctc-chat.php +1 -2
- readme.txt +20 -12
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.12
|
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.12' );
|
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.12.2
|
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.12.2' );
|
21 |
}
|
22 |
|
23 |
// define HT_CTC_PLUGIN_FILE
|
common/class-ht-ctc-switch.php
CHANGED
@@ -24,6 +24,7 @@ class HT_CTC_Swift {
|
|
24 |
private function define_constants() {
|
25 |
|
26 |
$this->define( 'HT_CTC_WP_MIN_VERSION', '4.6' );
|
|
|
27 |
$this->define( 'HT_CTC_PLUGIN_BASENAME', plugin_basename( HT_CTC_PLUGIN_FILE ) );
|
28 |
$this->define( 'HT_CTC_BLOG_NAME', get_bloginfo('name') );
|
29 |
// $this->define( 'HT_CTC_SITE_URL', get_site_url() );
|
24 |
private function define_constants() {
|
25 |
|
26 |
$this->define( 'HT_CTC_WP_MIN_VERSION', '4.6' );
|
27 |
+
$this->define( 'HT_CTC_PLUGIN_DIR_URL', plugin_dir_url( HT_CTC_PLUGIN_FILE ) );
|
28 |
$this->define( 'HT_CTC_PLUGIN_BASENAME', plugin_basename( HT_CTC_PLUGIN_FILE ) );
|
29 |
$this->define( 'HT_CTC_BLOG_NAME', get_bloginfo('name') );
|
30 |
// $this->define( 'HT_CTC_SITE_URL', get_site_url() );
|
new/admin/admin_assets/js/admin.js
CHANGED
@@ -590,6 +590,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
590 |
'ht_ctc_woo_1',
|
591 |
'ht_ctc_woo_shop',
|
592 |
'ctc_g_opt_in',
|
|
|
593 |
'url_structure',
|
594 |
];
|
595 |
|
@@ -601,6 +602,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
601 |
'ht_ctc_analytics',
|
602 |
'ht_ctc_animations',
|
603 |
'ht_ctc_other_settings',
|
|
|
604 |
'url_structure',
|
605 |
];
|
606 |
|
590 |
'ht_ctc_woo_1',
|
591 |
'ht_ctc_woo_shop',
|
592 |
'ctc_g_opt_in',
|
593 |
+
'ctc_g_content',
|
594 |
'url_structure',
|
595 |
];
|
596 |
|
602 |
'ht_ctc_analytics',
|
603 |
'ht_ctc_animations',
|
604 |
'ht_ctc_other_settings',
|
605 |
+
'ctc_g_content',
|
606 |
'url_structure',
|
607 |
];
|
608 |
|
new/admin/admin_assets/js/greetings.js
CHANGED
@@ -3,8 +3,6 @@
|
|
3 |
// ready
|
4 |
$(function () {
|
5 |
|
6 |
-
console.log('greetings.js');
|
7 |
-
|
8 |
if (document.querySelector('.pr_greetings_template')) {
|
9 |
try {
|
10 |
greetings_template();
|
@@ -24,6 +22,12 @@
|
|
24 |
|
25 |
var greetings_template = $('.pr_greetings_template select').find(":selected").val();
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
// greetings-1
|
28 |
if (greetings_template == 'greetings-1') {
|
29 |
$('.ctc_greetings_settings.ctc_g_1').show();
|
@@ -48,9 +52,12 @@
|
|
48 |
|
49 |
// ctc_greetings_settings
|
50 |
if (greetings_template == 'no') {
|
51 |
-
$(
|
|
|
52 |
} else {
|
53 |
// $(" ." + greetings_template).show(100);
|
|
|
|
|
54 |
|
55 |
// if not no - then first hide all and again display required fields..
|
56 |
$(" .ctc_greetings_settings").hide();
|
3 |
// ready
|
4 |
$(function () {
|
5 |
|
|
|
|
|
6 |
if (document.querySelector('.pr_greetings_template')) {
|
7 |
try {
|
8 |
greetings_template();
|
22 |
|
23 |
var greetings_template = $('.pr_greetings_template select').find(":selected").val();
|
24 |
|
25 |
+
if (greetings_template == 'no' || '' == greetings_template) {
|
26 |
+
$('.ctc_g_content').hide();
|
27 |
+
} else {
|
28 |
+
$('.ctc_g_content').show();
|
29 |
+
}
|
30 |
+
|
31 |
// greetings-1
|
32 |
if (greetings_template == 'greetings-1') {
|
33 |
$('.ctc_greetings_settings.ctc_g_1').show();
|
52 |
|
53 |
// ctc_greetings_settings
|
54 |
if (greetings_template == 'no') {
|
55 |
+
$('.ctc_g_content').hide(100);
|
56 |
+
$(" .ctc_greetings_settings").hide();
|
57 |
} else {
|
58 |
// $(" ." + greetings_template).show(100);
|
59 |
+
|
60 |
+
$('.ctc_g_content').show();
|
61 |
|
62 |
// if not no - then first hide all and again display required fields..
|
63 |
$(" .ctc_greetings_settings").hide();
|
new/admin/class-ht-ctc-admin-greetings-page.php
CHANGED
@@ -120,6 +120,12 @@ class HT_CTC_Admin_Greetings {
|
|
120 |
'parent_class' => 'pr_greetings_template',
|
121 |
'description' => "<a href='https://holithemes.com/plugins/click-to-chat/greetings/' target='_blank'>Greetings</a> | <a href='https://holithemes.com/plugins/click-to-chat/greetings-1/' target='_blank'>Greetings-1</a> | <a href='https://holithemes.com/plugins/click-to-chat/greetings-2/' target='_blank'>Greetings-2</a> | <a href='https://holithemes.com/plugins/click-to-chat/greetings-form/' target='_blank'>Greetings - Form Filling</a> ",
|
122 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
[
|
124 |
'db' => 'empty',
|
125 |
'template' => 'empty',
|
@@ -159,6 +165,9 @@ class HT_CTC_Admin_Greetings {
|
|
159 |
'description' => __( 'Call to Action (Button/Link Text)', 'click-to-chat-for-whatsapp'),
|
160 |
'parent_class' => 'pr_call_to_action ctc_greetings_settings ctc_g_1 ctc_g_2',
|
161 |
],
|
|
|
|
|
|
|
162 |
]
|
163 |
],
|
164 |
'greetings_1' => [
|
120 |
'parent_class' => 'pr_greetings_template',
|
121 |
'description' => "<a href='https://holithemes.com/plugins/click-to-chat/greetings/' target='_blank'>Greetings</a> | <a href='https://holithemes.com/plugins/click-to-chat/greetings-1/' target='_blank'>Greetings-1</a> | <a href='https://holithemes.com/plugins/click-to-chat/greetings-2/' target='_blank'>Greetings-2</a> | <a href='https://holithemes.com/plugins/click-to-chat/greetings-form/' target='_blank'>Greetings - Form Filling</a> ",
|
122 |
],
|
123 |
+
[
|
124 |
+
'template' => 'collapsible_start',
|
125 |
+
'collapsible' => 'no',
|
126 |
+
'ul_class' => 'ctc_g_content',
|
127 |
+
'title' => "Content: Header, Main, Bottom, Call to Action",
|
128 |
+
],
|
129 |
[
|
130 |
'db' => 'empty',
|
131 |
'template' => 'empty',
|
165 |
'description' => __( 'Call to Action (Button/Link Text)', 'click-to-chat-for-whatsapp'),
|
166 |
'parent_class' => 'pr_call_to_action ctc_greetings_settings ctc_g_1 ctc_g_2',
|
167 |
],
|
168 |
+
[
|
169 |
+
'template' => 'collapsible_end',
|
170 |
+
],
|
171 |
]
|
172 |
],
|
173 |
'greetings_1' => [
|
new/admin/class-ht-ctc-admin-main-page.php
CHANGED
@@ -144,16 +144,13 @@ class HT_CTC_Admin_Main_Page {
|
|
144 |
|
145 |
<!-- country code -->
|
146 |
<div class="input-field col s3 m3 ctc_num_field">
|
147 |
-
<input name="ht_ctc_chat_options[cc]" value="<?= $cc ?>" id="whatsapp_cc" type="text" class="input-margin tooltipped" data-position="left" data-tooltip="Country Code">
|
148 |
-
|
149 |
<label for="whatsapp_cc"><?php _e( 'Country Code', 'click-to-chat-for-whatsapp' ); ?></label>
|
150 |
-
|
151 |
-
|
152 |
</div>
|
153 |
|
154 |
<!-- number -->
|
155 |
<div class="input-field col s9 m7 ctc_num_field">
|
156 |
-
<input name="ht_ctc_chat_options[num]" value="<?= $num ?>" id="whatsapp_number" type="text" class="input-margin tooltipped" data-position="right" data-tooltip="Number">
|
157 |
<label for="whatsapp_number"><?php _e( 'Number', 'click-to-chat-for-whatsapp' ); ?></label>
|
158 |
<span class="helper-text ctc_wn_initial_zero" style="display: none;">zero may not needed to add before the number</span>
|
159 |
</div>
|
144 |
|
145 |
<!-- country code -->
|
146 |
<div class="input-field col s3 m3 ctc_num_field">
|
147 |
+
<input name="ht_ctc_chat_options[cc]" value="<?= $cc ?>" id="whatsapp_cc" type="text" placeholder="+1 " class="input-margin tooltipped" data-position="left" data-tooltip="Country Code">
|
|
|
148 |
<label for="whatsapp_cc"><?php _e( 'Country Code', 'click-to-chat-for-whatsapp' ); ?></label>
|
|
|
|
|
149 |
</div>
|
150 |
|
151 |
<!-- number -->
|
152 |
<div class="input-field col s9 m7 ctc_num_field">
|
153 |
+
<input name="ht_ctc_chat_options[num]" value="<?= $num ?>" id="whatsapp_number" placeholder="23456789" type="text" class="input-margin tooltipped" data-position="right" data-tooltip="Number">
|
154 |
<label for="whatsapp_number"><?php _e( 'Number', 'click-to-chat-for-whatsapp' ); ?></label>
|
155 |
<span class="helper-text ctc_wn_initial_zero" style="display: none;">zero may not needed to add before the number</span>
|
156 |
</div>
|
new/admin/class-ht-ctc-admin-other-settings.php
CHANGED
@@ -742,7 +742,7 @@ class HT_CTC_Admin_Other_Settings {
|
|
742 |
<ol>Check Display Settings</ol>
|
743 |
</ul>
|
744 |
</p>
|
745 |
-
<!-- <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/
|
746 |
<br>
|
747 |
|
748 |
<?php
|
742 |
<ol>Check Display Settings</ol>
|
743 |
</ul>
|
744 |
</p>
|
745 |
+
<!-- <p class="description"><a target="_blank" href="https://holithemes.com/plugins/click-to-chat/link/">Basic Troubleshooting</a></p> -->
|
746 |
<br>
|
747 |
|
748 |
<?php
|
new/admin/class-ht-ctc-admin-scripts.php
CHANGED
@@ -13,6 +13,13 @@ if ( ! class_exists( 'HT_CTC_Admin_Scripts' ) ) :
|
|
13 |
|
14 |
class HT_CTC_Admin_Scripts {
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
// Register css styles, javascript files only on 'click-to-chat' page
|
18 |
function register_scripts_admin($hook) {
|
@@ -49,14 +56,21 @@ class HT_CTC_Admin_Scripts {
|
|
49 |
return;
|
50 |
}
|
51 |
|
|
|
52 |
|
53 |
}
|
54 |
|
55 |
-
|
56 |
|
57 |
-
$
|
|
|
|
|
58 |
|
59 |
-
|
|
|
|
|
|
|
60 |
|
|
|
61 |
|
62 |
endif; // END class_exists check
|
13 |
|
14 |
class HT_CTC_Admin_Scripts {
|
15 |
|
16 |
+
public function __construct() {
|
17 |
+
$this->hooks();
|
18 |
+
}
|
19 |
+
|
20 |
+
public function hooks() {
|
21 |
+
add_action('admin_enqueue_scripts', [$this, 'register_scripts_admin'] );
|
22 |
+
}
|
23 |
|
24 |
// Register css styles, javascript files only on 'click-to-chat' page
|
25 |
function register_scripts_admin($hook) {
|
56 |
return;
|
57 |
}
|
58 |
|
59 |
+
$this->admin_var();
|
60 |
|
61 |
}
|
62 |
|
63 |
+
function admin_var() {
|
64 |
|
65 |
+
$ctc = [
|
66 |
+
'plugin_url' => HT_CTC_PLUGIN_DIR_URL
|
67 |
+
];
|
68 |
|
69 |
+
wp_localize_script( 'ctc_admin_js', 'ht_ctc_admin_var', $ctc );
|
70 |
+
}
|
71 |
+
|
72 |
+
}
|
73 |
|
74 |
+
new HT_CTC_Admin_Scripts();
|
75 |
|
76 |
endif; // END class_exists check
|
new/inc/assets/js/app.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(f){f(function(){var a=window.location.href,o=void 0!==document.title?document.title:"",_=void 0!==screen.width&&1024<screen.width?"no":"yes",s="",c={};function n(t){return c[t]||!1}function i(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,r="";if("undefined"!=typeof ht_ctc_chat_var)r=ht_ctc_chat_var,e(),h();else{try{document.querySelector(".ht_ctc_chat_data")&&(t=f(".ht_ctc_chat_data").attr("data-settings"),r=JSON.parse(t))}catch(t){r={}}e(),h()}function e(){var t=document.querySelector(".ht_ctc_chat_data");t&&(s=f(".ht_ctc_chat_data").attr("data-no_number"),t.remove())}function h(){var e;document.dispatchEvent(new CustomEvent("ht_ctc_event_settings",{detail:{ctc:r}})),(e=document.querySelector(".ht-ctc-chat"))&&(document.dispatchEvent(new CustomEvent("ht_ctc_event_chat")),function(t){"yes"==r.schedule?document.dispatchEvent(new CustomEvent("ht_ctc_event_display",{detail:{ctc:r,display_chat:l,ht_ctc_chat:t}})):l(t)}(e),e.addEventListener("click",function(){f(".ht_ctc_chat_greetings_box").length||m(e)}),f(".ht_ctc_chat_greetings_box").length&&f(document).on("click",".ht_ctc_chat_style",function(t){f(".ht_ctc_chat_greetings_box").hasClass("ctc_greetings_opened")?d("user_closed"):u("user_opened")}),f(document).on("click",".ctc_greetings_close_btn",function(t){d("user_closed")}),f(document).on("click",".ht_ctc_chat_greetings_box_link",function(t){t.preventDefault(),!document.querySelector("#ctc_opt")||f("#ctc_opt").is(":checked")||n("g_optin")?m(e):f(".ctc_opt_in").show(400).fadeOut("1").fadeIn("1"),document.dispatchEvent(new CustomEvent("ht_ctc_event_greetings"))}),document.querySelector("#ctc_opt")&&f("#ctc_opt").on("change",function(t){f("#ctc_opt").is(":checked")&&(f(".ctc_opt_in").hide(100),i("g_optin","y"),setTimeout(()=>{m(e)},500))})),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,a);e=encodeURIComponent(e),r.url_structure_d&&"yes"!==_?window.open("https://web.whatsapp.com/send?phone="+t+"&text="+e,"_blank","noopener"):window.open("https://wa.me/"+t+"?text="+e,"_blank","noopener"),p(this),v(t)}),f(document).on("click",".ctc_chat, #ctc_chat",function(t){m(this),f(this).hasClass("ctc_woo_place")&&t.preventDefault()}),f(document).on("click",'[href="#ctc_chat"]',function(t){t.preventDefault(),m(this)})}function u(t){f(".ctc_cta_stick").remove(),f(".ht_ctc_chat_greetings_box").show(70),f(".ht_ctc_chat_greetings_box").addClass("ctc_greetings_opened").removeClass("ctc_greetings_closed"),i("g_action",t),"user_opened"==t&&i("g_user_action",t)}function d(t){f(".ht_ctc_chat_greetings_box").hide(70),f(".ht_ctc_chat_greetings_box").addClass("ctc_greetings_closed").removeClass("ctc_greetings_opened"),i("g_action",t),"user_closed"==t&&i("g_user_action",t)}function l(t){var e;"yes"==_?"show"==r.dis_m&&((e=document.querySelector(".ht_ctc_desktop_chat"))&&e.remove(),t.style.cssText=r.pos_m+r.css,g(t)):"show"==r.dis_d&&((e=document.querySelector(".ht_ctc_mobile_chat"))&&e.remove(),t.style.cssText=r.pos_d+r.css,g(t))}function g(e){try{f(e).show(parseInt(r.se))}catch(t){e.style.display="block"}var t,c;!function(){if(f(".ht_ctc_chat_greetings_box").length){if(r.g_device){if("yes"!==_&&"mobile"==r.g_device)return f(".ht_ctc_chat_greetings_box").remove();if("yes"==_&&"desktop"==r.g_device)return f(".ht_ctc_chat_greetings_box").remove()}document.dispatchEvent(new CustomEvent("ht_ctc_event_after_chat_displayed",{detail:{ctc:r,greetings_open:u,greetings_close:d}})),r.g_init&&"open"==r.g_init&&"user_closed"!==n("g_user_action")&&u("init"),f(document).on("click",".ctc_greetings, #ctc_greetings",function(t){d("element"),u("element")})}}(),c=f(t=e).hasClass("ht_ctc_entry_animation")?1200:120,setTimeout(function(){t.classList.add("ht_ctc_animation",r.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 p(t){document.dispatchEvent(new CustomEvent("ht_ctc_event_analytics"));var e=r.number;t.classList.contains("ht-ctc-sc")&&(e=t.getAttribute("data-number"));var c="Click to Chat for WhatsApp",n="chat: "+e,t=o+", "+a;(r.ga||r.ga4)&&("undefined"!=typeof gtag?r.ga4?gtag("event","click to chat",{number:e,title:o,url:a}):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:o,url:a,event_category:c,event_label:t,event_action:n}),r.ads&&"undefined"!=typeof gtag_report_conversion&>ag_report_conversion(),r.fb&&"undefined"!=typeof fbq&&fbq("trackCustom","Click to Chat by HoliThemes",{Category:"Click to Chat for WhatsApp",return_type:"chat",ID:e,Title:o,URL:a})}function m(t){document.dispatchEvent(new CustomEvent("ht_ctc_event_number",{detail:{ctc:r}}));var e,c,n=r.number,o=r.pre_filled;t.hasAttribute("data-number")&&(n=t.getAttribute("data-number")),t.hasAttribute("data-pre_filled")&&(o=t.getAttribute("data-pre_filled")),o=o.replace(/\[url]/gi,a),o=encodeURIComponent(o),""!=n?(e="https://wa.me/"+n+"?text="+o,c=r.url_target_d||"_blank","yes"==_?r.url_structure_m&&(e="whatsapp://send?phone="+n+"&text="+o,c="_self"):r.url_structure_d&&(e="https://web.whatsapp.com/send?phone="+n+"&text="+o),o="popup"==c?"scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=
|
1 |
+
!function(f){f(function(){var a=window.location.href,o=void 0!==document.title?document.title:"",_=void 0!==screen.width&&1024<screen.width?"no":"yes",s="",c={};function n(t){return c[t]||!1}function i(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,r="";if("undefined"!=typeof ht_ctc_chat_var)r=ht_ctc_chat_var,e(),h();else{try{document.querySelector(".ht_ctc_chat_data")&&(t=f(".ht_ctc_chat_data").attr("data-settings"),r=JSON.parse(t))}catch(t){r={}}e(),h()}function e(){var t=document.querySelector(".ht_ctc_chat_data");t&&(s=f(".ht_ctc_chat_data").attr("data-no_number"),t.remove())}function h(){var e;document.dispatchEvent(new CustomEvent("ht_ctc_event_settings",{detail:{ctc:r}})),(e=document.querySelector(".ht-ctc-chat"))&&(document.dispatchEvent(new CustomEvent("ht_ctc_event_chat")),function(t){"yes"==r.schedule?document.dispatchEvent(new CustomEvent("ht_ctc_event_display",{detail:{ctc:r,display_chat:l,ht_ctc_chat:t}})):l(t)}(e),e.addEventListener("click",function(){f(".ht_ctc_chat_greetings_box").length||m(e)}),f(".ht_ctc_chat_greetings_box").length&&f(document).on("click",".ht_ctc_chat_style",function(t){f(".ht_ctc_chat_greetings_box").hasClass("ctc_greetings_opened")?d("user_closed"):u("user_opened")}),f(document).on("click",".ctc_greetings_close_btn",function(t){d("user_closed")}),f(document).on("click",".ht_ctc_chat_greetings_box_link",function(t){t.preventDefault(),!document.querySelector("#ctc_opt")||f("#ctc_opt").is(":checked")||n("g_optin")?m(e):f(".ctc_opt_in").show(400).fadeOut("1").fadeIn("1"),document.dispatchEvent(new CustomEvent("ht_ctc_event_greetings"))}),document.querySelector("#ctc_opt")&&f("#ctc_opt").on("change",function(t){f("#ctc_opt").is(":checked")&&(f(".ctc_opt_in").hide(100),i("g_optin","y"),setTimeout(()=>{m(e)},500))})),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,a);e=encodeURIComponent(e),r.url_structure_d&&"yes"!==_?window.open("https://web.whatsapp.com/send?phone="+t+"&text="+e,"_blank","noopener"):window.open("https://wa.me/"+t+"?text="+e,"_blank","noopener"),p(this),v(t)}),f(document).on("click",".ctc_chat, #ctc_chat",function(t){m(this),f(this).hasClass("ctc_woo_place")&&t.preventDefault()}),f(document).on("click",'[href="#ctc_chat"]',function(t){t.preventDefault(),m(this)})}function u(t){f(".ctc_cta_stick").remove(),f(".ht_ctc_chat_greetings_box").show(70),f(".ht_ctc_chat_greetings_box").addClass("ctc_greetings_opened").removeClass("ctc_greetings_closed"),i("g_action",t),"user_opened"==t&&i("g_user_action",t)}function d(t){f(".ht_ctc_chat_greetings_box").hide(70),f(".ht_ctc_chat_greetings_box").addClass("ctc_greetings_closed").removeClass("ctc_greetings_opened"),i("g_action",t),"user_closed"==t&&i("g_user_action",t)}function l(t){var e;"yes"==_?"show"==r.dis_m&&((e=document.querySelector(".ht_ctc_desktop_chat"))&&e.remove(),t.style.cssText=r.pos_m+r.css,g(t)):"show"==r.dis_d&&((e=document.querySelector(".ht_ctc_mobile_chat"))&&e.remove(),t.style.cssText=r.pos_d+r.css,g(t))}function g(e){try{f(e).show(parseInt(r.se))}catch(t){e.style.display="block"}var t,c;!function(){if(f(".ht_ctc_chat_greetings_box").length){if(r.g_device){if("yes"!==_&&"mobile"==r.g_device)return f(".ht_ctc_chat_greetings_box").remove();if("yes"==_&&"desktop"==r.g_device)return f(".ht_ctc_chat_greetings_box").remove()}document.dispatchEvent(new CustomEvent("ht_ctc_event_after_chat_displayed",{detail:{ctc:r,greetings_open:u,greetings_close:d}})),r.g_init&&"open"==r.g_init&&"user_closed"!==n("g_user_action")&&u("init"),f(document).on("click",".ctc_greetings, #ctc_greetings",function(t){d("element"),u("element")})}}(),c=f(t=e).hasClass("ht_ctc_entry_animation")?1200:120,setTimeout(function(){t.classList.add("ht_ctc_animation",r.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 p(t){document.dispatchEvent(new CustomEvent("ht_ctc_event_analytics"));var e=r.number;t.classList.contains("ht-ctc-sc")&&(e=t.getAttribute("data-number"));var c="Click to Chat for WhatsApp",n="chat: "+e,t=o+", "+a;(r.ga||r.ga4)&&("undefined"!=typeof gtag?r.ga4?gtag("event","click to chat",{number:e,title:o,url:a}):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:o,url:a,event_category:c,event_label:t,event_action:n}),r.ads&&"undefined"!=typeof gtag_report_conversion&>ag_report_conversion(),r.fb&&"undefined"!=typeof fbq&&fbq("trackCustom","Click to Chat by HoliThemes",{Category:"Click to Chat for WhatsApp",return_type:"chat",ID:e,Title:o,URL:a})}function m(t){document.dispatchEvent(new CustomEvent("ht_ctc_event_number",{detail:{ctc:r}}));var e,c,n=r.number,o=r.pre_filled;t.hasAttribute("data-number")&&(n=t.getAttribute("data-number")),t.hasAttribute("data-pre_filled")&&(o=t.getAttribute("data-pre_filled")),o=o.replace(/\[url]/gi,a),o=encodeURIComponent(o),""!=n?(e="https://wa.me/"+n+"?text="+o,c=r.url_target_d||"_blank","yes"==_?r.url_structure_m&&(e="whatsapp://send?phone="+n+"&text="+o,c="_self"):r.url_structure_d&&(e="https://web.whatsapp.com/send?phone="+n+"&text="+o),o="popup"==c?"scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=788,height=514,left=100,top=100":"noopener",window.open(e,c,o),p(t),v(n)):f(".ht-ctc-chat").html(s)}function v(t){var e,c;r.hook_url&&(e=r.hook_url,c={},r.hook_v&&(c=r.hook_v),document.dispatchEvent(new CustomEvent("ht_ctc_event_hook",{detail:{ctc:r,number:t}})),e=r.hook_url,c=r.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
@@ -480,7 +480,7 @@
|
|
480 |
}
|
481 |
|
482 |
// 3.specs - specs - if popup then add 'pop_window_features' else 'noopener'
|
483 |
-
var pop_window_features = 'scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=
|
484 |
var specs = ('popup' == url_target) ? pop_window_features : 'noopener';
|
485 |
console.log('-- specs: ' + specs + ' --');
|
486 |
|
480 |
}
|
481 |
|
482 |
// 3.specs - specs - if popup then add 'pop_window_features' else 'noopener'
|
483 |
+
var pop_window_features = 'scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=788,height=514,left=100,top=100';
|
484 |
var specs = ('popup' == url_target) ? pop_window_features : 'noopener';
|
485 |
console.log('-- specs: ' + specs + ' --');
|
486 |
|
new/inc/chat/class-ht-ctc-chat.php
CHANGED
@@ -291,6 +291,7 @@ class HT_CTC_Chat {
|
|
291 |
$on = "on=\"tap:AMP.navigateTo(url='$wame_link', target='_blank', opener='')\"";
|
292 |
|
293 |
wp_deregister_script( 'ht_ctc_app_js' );
|
|
|
294 |
}
|
295 |
}
|
296 |
|
@@ -310,8 +311,6 @@ class HT_CTC_Chat {
|
|
310 |
|
311 |
/**
|
312 |
* ctc
|
313 |
-
*
|
314 |
-
* v - plugin version
|
315 |
*/
|
316 |
$ctc = array(
|
317 |
|
291 |
$on = "on=\"tap:AMP.navigateTo(url='$wame_link', target='_blank', opener='')\"";
|
292 |
|
293 |
wp_deregister_script( 'ht_ctc_app_js' );
|
294 |
+
wp_deregister_script( 'ht_ctc_woo_js' );
|
295 |
}
|
296 |
}
|
297 |
|
311 |
|
312 |
/**
|
313 |
* ctc
|
|
|
|
|
314 |
*/
|
315 |
$ctc = array(
|
316 |
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Click to Chat ===
|
2 |
Requires at least: 4.6
|
3 |
-
Tested up to: 6.0.
|
4 |
Requires PHP: 5.6
|
5 |
Contributors: holithemes
|
6 |
-
Stable tag: 3.12
|
7 |
-
Tags: whatsapp, whatsapp business, click to chat, whatsapp chat, whatsapp support, whatsapp group, whatsapp
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -31,13 +31,12 @@ Add 'WhatsApp' or 'WhatsApp Business' Number. And let your website visitors cont
|
|
31 |
|
32 |
Select a Style that matches your Website design.
|
33 |
|
34 |
-
* 8 pre-defined style/designs
|
35 |
* Add your own Image/GIF
|
36 |
-
* Custom Element/Design
|
37 |
-
* Shortcodes
|
38 |
* Different Styles, Positions for Mobile, Desktop
|
39 |
-
*
|
40 |
-
* Select style and customize it to match the website design.
|
41 |
|
42 |
[list of Styles](https://holithemes.com/plugins/click-to-chat/list-of-styles/) | ✏️[Customize Styles](https://holithemes.com/plugins/click-to-chat/customize-styles/)
|
43 |
|
@@ -53,8 +52,8 @@ Convert any Element as a WhatsApp Chat Element by adding
|
|
53 |
* Class/ID name: 'ctc_chat' (or)
|
54 |
* Href/link: '#ctc_chat'
|
55 |
|
56 |
-
The custom design will navigate to WhatsApp based on plugin settings (WhatsApp Number, pre-filled message, .... ).
|
57 |
-
(e.g.
|
58 |
|
59 |
[Custom Element](https://holithemes.com/plugins/click-to-chat/custom-element/)
|
60 |
|
@@ -152,7 +151,8 @@ PRO:
|
|
152 |
* Styles
|
153 |
* Time Delay
|
154 |
* Scroll Delay
|
155 |
-
* Greetings Template
|
|
|
156 |
|
157 |
[Page-level settings](https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/)
|
158 |
|
@@ -309,7 +309,7 @@ Help by [Translating the plugin](https://translate.wordpress.org/projects/wp-plu
|
|
309 |
= From Dashboard ( WordPress admin ) =
|
310 |
* plugins -> Add New
|
311 |
* search for 'click to chat'
|
312 |
-
* click on Install Now and then
|
313 |
|
314 |
= using FTP or similar =
|
315 |
* Unzip "Click-to-Chat" file and
|
@@ -519,6 +519,14 @@ After Activate the plugin, add WhatsApp Number at plugin settings.
|
|
519 |
|
520 |
== Changelog ==
|
521 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
522 |
= 3.12 =
|
523 |
* New: URL Open Target window - New, Same, popup.
|
524 |
* URL structure for desktop: wa.me, web.whatsapp
|
1 |
=== Click to Chat ===
|
2 |
Requires at least: 4.6
|
3 |
+
Tested up to: 6.0.2
|
4 |
Requires PHP: 5.6
|
5 |
Contributors: holithemes
|
6 |
+
Stable tag: 3.12.2
|
7 |
+
Tags: whatsapp, whatsapp business, click to chat, whatsapp chat, whatsapp support, whatsapp group, whatsapp share, WhatsApp WooCommerce, whatsapp wordpress, whatsapp floating button, chat, holithemes
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
31 |
|
32 |
Select a Style that matches your Website design.
|
33 |
|
34 |
+
* 8 pre-defined customizable style/designs
|
35 |
* Add your own Image/GIF
|
36 |
+
* Custom Element/Design (convert any element as WhatsApp Chat element)
|
37 |
+
* Shortcodes (Add WhatsApp button/icon with inline the content)
|
38 |
* Different Styles, Positions for Mobile, Desktop
|
39 |
+
* Select the style and customize to match the website design
|
|
|
40 |
|
41 |
[list of Styles](https://holithemes.com/plugins/click-to-chat/list-of-styles/) | ✏️[Customize Styles](https://holithemes.com/plugins/click-to-chat/customize-styles/)
|
42 |
|
52 |
* Class/ID name: 'ctc_chat' (or)
|
53 |
* Href/link: '#ctc_chat'
|
54 |
|
55 |
+
The custom design will navigate to WhatsApp based on plugin settings (WhatsApp Number, pre-filled message, Analytics, .... ).
|
56 |
+
(e.g. menu item, button, image, link - just add ctc_chat as a class name)
|
57 |
|
58 |
[Custom Element](https://holithemes.com/plugins/click-to-chat/custom-element/)
|
59 |
|
151 |
* Styles
|
152 |
* Time Delay
|
153 |
* Scroll Delay
|
154 |
+
* Greetings Template
|
155 |
+
* Greetings Header, Main, Bottom Content
|
156 |
|
157 |
[Page-level settings](https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/)
|
158 |
|
309 |
= From Dashboard ( WordPress admin ) =
|
310 |
* plugins -> Add New
|
311 |
* search for 'click to chat'
|
312 |
+
* click on Install Now and then Activate.
|
313 |
|
314 |
= using FTP or similar =
|
315 |
* Unzip "Click-to-Chat" file and
|
519 |
|
520 |
== Changelog ==
|
521 |
|
522 |
+
= 3.12.2 =
|
523 |
+
* Enchantment: Greetings settings
|
524 |
+
* WhatsApp popup window width updated to display qr code in initial viewport
|
525 |
+
|
526 |
+
= 3.12.1 =
|
527 |
+
* WhatsApp popup window dimensions adjusted for better appearance
|
528 |
+
* Enchantment: compatibility with amp plugin
|
529 |
+
|
530 |
= 3.12 =
|
531 |
* New: URL Open Target window - New, Same, popup.
|
532 |
* URL structure for desktop: wa.me, web.whatsapp
|