Version Description
- Fix: Cache issue - Hide based on device - now detects based on screen size
Download this release
Release Info
Developer | bhvreddy |
Plugin | Click to Chat for WhatsApp Chat |
Version | 2.8.3 |
Comparing to | |
See all releases |
Code changes from version 2.8.2 to 2.8.3
- click-to-chat.php +2 -2
- new/inc/assets/js/app.js +30 -19
- new/inc/chat/class-ht-ctc-chat.php +1 -0
- new/inc/group/class-ht-ctc-group.php +1 -0
- new/inc/share/class-ht-ctc-share.php +1 -0
- readme.txt +3 -0
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: 2.8.
|
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 |
// new interface - ctc - Version
|
19 |
if ( ! defined( 'HT_CTC_VERSION' ) ) {
|
20 |
-
define( 'HT_CTC_VERSION', '2.8.
|
21 |
}
|
22 |
|
23 |
// for previous interface - define HT_CCW_VERSION
|
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: 2.8.3
|
7 |
Author: HoliThemes
|
8 |
Author URI: https://holithemes.com/plugins/click-to-chat/
|
9 |
License: GPL2
|
17 |
|
18 |
// new interface - ctc - Version
|
19 |
if ( ! defined( 'HT_CTC_VERSION' ) ) {
|
20 |
+
define( 'HT_CTC_VERSION', '2.8.3' );
|
21 |
}
|
22 |
|
23 |
// for previous interface - define HT_CCW_VERSION
|
new/inc/assets/js/app.js
CHANGED
@@ -12,9 +12,19 @@ if (typeof screen.width !== "undefined" ) {
|
|
12 |
// post title
|
13 |
var post_title = (typeof document.title !== "undefined" ) ? document.title : '';
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
-
document.addEventListener('DOMContentLoaded', function() {
|
17 |
|
|
|
18 |
var ht_ctc_chat = document.querySelector('.ht-ctc-chat');
|
19 |
(ht_ctc_chat) ? hide_basedon_device(ht_ctc_chat) : '';
|
20 |
|
@@ -23,29 +33,30 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
23 |
|
24 |
var ht_ctc_group = document.querySelector('.ht-ctc-group');
|
25 |
(ht_ctc_group) ? hide_basedon_device(ht_ctc_group) : '';
|
|
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
}
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
}
|
40 |
}
|
|
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
|
48 |
-
});
|
49 |
|
50 |
|
51 |
|
12 |
// post title
|
13 |
var post_title = (typeof document.title !== "undefined" ) ? document.title : '';
|
14 |
|
15 |
+
function afterdom_loaded() {
|
16 |
+
document.addEventListener('DOMContentLoaded', function() {
|
17 |
+
ht_ctc();
|
18 |
+
});
|
19 |
+
}
|
20 |
+
afterdom_loaded();
|
21 |
+
|
22 |
+
function ht_ctc_loaded() {
|
23 |
+
afterdom_loaded();
|
24 |
+
}
|
25 |
|
|
|
26 |
|
27 |
+
function ht_ctc() {
|
28 |
var ht_ctc_chat = document.querySelector('.ht-ctc-chat');
|
29 |
(ht_ctc_chat) ? hide_basedon_device(ht_ctc_chat) : '';
|
30 |
|
33 |
|
34 |
var ht_ctc_group = document.querySelector('.ht-ctc-group');
|
35 |
(ht_ctc_group) ? hide_basedon_device(ht_ctc_group) : '';
|
36 |
+
}
|
37 |
|
38 |
+
|
39 |
+
// Hide based on device
|
40 |
+
function hide_basedon_device(p) {
|
41 |
+
if (is_mobile == 'yes') {
|
42 |
+
var display_mobile = p.getAttribute('data-display_mobile');
|
43 |
+
if ( 'show' == display_mobile ) {
|
44 |
+
display(p)
|
45 |
+
}
|
46 |
+
} else {
|
47 |
+
var display_desktop = p.getAttribute('data-display_desktop');
|
48 |
+
if ( 'show' == display_desktop ) {
|
49 |
+
display(p)
|
50 |
}
|
51 |
}
|
52 |
+
}
|
53 |
|
54 |
+
function display(p) {
|
55 |
+
// p.style.removeProperty('display');
|
56 |
+
// var x = p.style.getPropertyValue("display");
|
57 |
+
p.style.display = "block";
|
58 |
+
}
|
59 |
|
|
|
60 |
|
61 |
|
62 |
|
new/inc/chat/class-ht-ctc-chat.php
CHANGED
@@ -135,6 +135,7 @@ class HT_CTC_Chat {
|
|
135 |
>
|
136 |
<?php include $path; ?>
|
137 |
</div>
|
|
|
138 |
<?php
|
139 |
}
|
140 |
|
135 |
>
|
136 |
<?php include $path; ?>
|
137 |
</div>
|
138 |
+
<script>ht_ctc_loaded()</script>
|
139 |
<?php
|
140 |
}
|
141 |
|
new/inc/group/class-ht-ctc-group.php
CHANGED
@@ -99,6 +99,7 @@ class HT_CTC_Group {
|
|
99 |
>
|
100 |
<?php include $path; ?>
|
101 |
</div>
|
|
|
102 |
<?php
|
103 |
}
|
104 |
|
99 |
>
|
100 |
<?php include $path; ?>
|
101 |
</div>
|
102 |
+
<script>ht_ctc_loaded()</script>
|
103 |
<?php
|
104 |
}
|
105 |
|
new/inc/share/class-ht-ctc-share.php
CHANGED
@@ -108,6 +108,7 @@ class HT_CTC_Share {
|
|
108 |
>
|
109 |
<?php include $path; ?>
|
110 |
</div>
|
|
|
111 |
<?php
|
112 |
}
|
113 |
|
108 |
>
|
109 |
<?php include $path; ?>
|
110 |
</div>
|
111 |
+
<script>ht_ctc_loaded()</script>
|
112 |
<?php
|
113 |
}
|
114 |
|
readme.txt
CHANGED
@@ -316,6 +316,9 @@ After Activate the plugin, add WhatsApp Number at plugin settings.
|
|
316 |
|
317 |
== Changelog ==
|
318 |
|
|
|
|
|
|
|
319 |
= 2.8.2 =
|
320 |
* Display Styles after WhatsApp Number is added.
|
321 |
* Default sytles changed.
|
316 |
|
317 |
== Changelog ==
|
318 |
|
319 |
+
= 2.8.3 =
|
320 |
+
* Fix: Cache issue - Hide based on device - now detects based on screen size
|
321 |
+
|
322 |
= 2.8.2 =
|
323 |
* Display Styles after WhatsApp Number is added.
|
324 |
* Default sytles changed.
|