Version Description
- We're now fully compatible with WP-Rocket
Download this release
Release Info
Developer | galdub |
Plugin | Floating Chat Widget: Contact Chat Icons, Telegram Chat, Line, WeChat, Email, SMS, Call Button – Chaty |
Version | 2.0.5 |
Comparing to | |
See all releases |
Code changes from version 2.0.4 to 2.0.5
- assets/js/cht-front-script.js +1 -2
- cht-icons.php +2 -2
- frontend/class-frontend.php +1 -2
- readme.txt +5 -2
- views/widget.php +44 -36
assets/js/cht-front-script.js
CHANGED
@@ -24,8 +24,7 @@
|
|
24 |
i(11), t.exports = i(12)
|
25 |
}, 11: function (t, e) {
|
26 |
!function (t) {
|
27 |
-
var e = JSON.parse(
|
28 |
-
|
29 |
function i(t) {
|
30 |
for (var e = t + "=", i = document.cookie.split(";"), n = 0; n < i.length; n++) {
|
31 |
for (var a = i[n]; " " == a.charAt(0);)a = a.substring(1);
|
24 |
i(11), t.exports = i(12)
|
25 |
}, 11: function (t, e) {
|
26 |
!function (t) {
|
27 |
+
var e = JSON.parse(chaty_settings);
|
|
|
28 |
function i(t) {
|
29 |
for (var e = t + "=", i = document.cookie.split(";"), n = 0; n < i.length; n++) {
|
30 |
for (var a = i[n]; " " == a.charAt(0);)a = a.substring(1);
|
cht-icons.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Description: Chat with your website visitors via their favorite channels. Show a chat icon on the bottom of your site and communicate with your customers.
|
6 |
Author: Premio
|
7 |
Author URI: https://premio.io/downloads/chaty/
|
8 |
-
Version: 2.0.
|
9 |
License: GPL2
|
10 |
*/
|
11 |
|
@@ -22,7 +22,7 @@ define('CHT_INC', CHT_DIR . '/includes');
|
|
22 |
define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
|
23 |
define('CHT_PLUGIN_URL', plugins_url() . "/chaty/");
|
24 |
define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
|
25 |
-
define('CHT_VERSION', "2.0.
|
26 |
|
27 |
if (!function_exists('wp_doing_ajax')) {
|
28 |
function wp_doing_ajax()
|
5 |
Description: Chat with your website visitors via their favorite channels. Show a chat icon on the bottom of your site and communicate with your customers.
|
6 |
Author: Premio
|
7 |
Author URI: https://premio.io/downloads/chaty/
|
8 |
+
Version: 2.0.5
|
9 |
License: GPL2
|
10 |
*/
|
11 |
|
22 |
define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
|
23 |
define('CHT_PLUGIN_URL', plugins_url() . "/chaty/");
|
24 |
define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
|
25 |
+
define('CHT_VERSION', "2.0.5");
|
26 |
|
27 |
if (!function_exists('wp_doing_ajax')) {
|
28 |
function wp_doing_ajax()
|
frontend/class-frontend.php
CHANGED
@@ -294,7 +294,7 @@ class CHT_Frontend extends CHT_Admin_Base
|
|
294 |
};
|
295 |
endforeach;
|
296 |
endforeach;
|
297 |
-
return
|
298 |
}
|
299 |
|
300 |
public function insert_widget()
|
@@ -302,7 +302,6 @@ class CHT_Frontend extends CHT_Admin_Base
|
|
302 |
if ($this->canInsertWidget()):
|
303 |
include_once CHT_DIR . '/views/widget.php';
|
304 |
endif;
|
305 |
-
|
306 |
}
|
307 |
|
308 |
private function canInsertWidget()
|
294 |
};
|
295 |
endforeach;
|
296 |
endforeach;
|
297 |
+
return $arr;
|
298 |
}
|
299 |
|
300 |
public function insert_widget()
|
302 |
if ($this->canInsertWidget()):
|
303 |
include_once CHT_DIR . '/views/widget.php';
|
304 |
endif;
|
|
|
305 |
}
|
306 |
|
307 |
private function canInsertWidget()
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: galdub, tomeraharon, premio
|
3 |
Tags: whatsapp, facebook messenger, click to chat, chat, chat button, call now button
|
4 |
Requires at least: 3.1
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 2.0.
|
7 |
Plugin URI: https://premio.io/downloads/chaty/
|
8 |
|
9 |
FREE customizable live chat and call buttons. Let your visitors contact you via Facebook Messenger, Whatsapp, Telegram, Viber, Email, SMS and more.
|
@@ -132,6 +132,9 @@ Just follow our <a href="https://premio.io/wordpress-premio-pro-version-installa
|
|
132 |
|
133 |
== Changelog ==
|
134 |
|
|
|
|
|
|
|
135 |
= 2.0.4 =
|
136 |
* Fixed sticky issues for android and SMS display bug
|
137 |
|
2 |
Contributors: galdub, tomeraharon, premio
|
3 |
Tags: whatsapp, facebook messenger, click to chat, chat, chat button, call now button
|
4 |
Requires at least: 3.1
|
5 |
+
Tested up to: 5.2
|
6 |
+
Stable tag: 2.0.5
|
7 |
Plugin URI: https://premio.io/downloads/chaty/
|
8 |
|
9 |
FREE customizable live chat and call buttons. Let your visitors contact you via Facebook Messenger, Whatsapp, Telegram, Viber, Email, SMS and more.
|
132 |
|
133 |
== Changelog ==
|
134 |
|
135 |
+
= 2.0.5 =
|
136 |
+
* We're now fully compatible with WP-Rocket
|
137 |
+
|
138 |
= 2.0.4 =
|
139 |
* Fixed sticky issues for android and SMS display bug
|
140 |
|
views/widget.php
CHANGED
@@ -2,25 +2,26 @@
|
|
2 |
$social = $this->int_arr();
|
3 |
$cht_active = get_option("cht_active");
|
4 |
if(!empty($social) && $cht_active) {
|
5 |
-
$social = json_decode($social, true);
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
}?>
|
20 |
|
21 |
<?php $bg_color = $this->get_current_color();?>
|
22 |
-
<?php $len =
|
23 |
-
<?php $cta = $this->getCallToAction();
|
|
|
24 |
|
25 |
<?php
|
26 |
$positionSide = get_option('positionSide');
|
@@ -29,24 +30,31 @@ $cht_side_spacing = get_option('cht_side_spacing');
|
|
29 |
$cht_widget_size = get_option('cht_widget_size');
|
30 |
$cta = str_replace("'","'",$cta);
|
31 |
$cta = str_replace('"',""",$cta);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
?>
|
33 |
-
<script src="<?php echo CHT_PLUGIN_URL ?>assets/js/cht-front-script.js?<?php echo rand();?>" settings='
|
34 |
-
{
|
35 |
-
"object_settings":{
|
36 |
-
"isPRO": 0,
|
37 |
-
"position":"<?php echo (get_option('cht_position'));?>",
|
38 |
-
"social":<?php echo $this->int_arr() ?>,
|
39 |
-
"pos_side":"<?php echo empty($positionSide) ? 'right' : $positionSide ;?>",
|
40 |
-
"bot":"<?php echo ($cht_bottom_spacing) ? $cht_bottom_spacing : '25';?>",
|
41 |
-
"side": "<?php echo ($cht_side_spacing) ? $cht_side_spacing : '25';?>",
|
42 |
-
"device":"<?php echo $this->device();?>",
|
43 |
-
"color":"<?php echo ($bg_color) ? $bg_color : '#A886CD'; ?>",
|
44 |
-
"widget_size":"<?php echo ($cht_widget_size) ? $cht_widget_size: '54';?>",
|
45 |
-
"widget_type":"<?php echo get_option('widget_icon');?>",
|
46 |
-
"widget_img":"<?php echo $this->getCustomWidgetImg();?>",
|
47 |
-
"cta":"<?php echo addslashes($cta); ?>",
|
48 |
-
"link_active":"<?php echo get_option('cht_credit') ?>",
|
49 |
-
"active":"<?php echo ($cht_active && $len>2) ? 'true' : 'false' ?>"
|
50 |
-
}
|
51 |
-
}'>
|
52 |
-
</script>
|
2 |
$social = $this->int_arr();
|
3 |
$cht_active = get_option("cht_active");
|
4 |
if(!empty($social) && $cht_active) {
|
5 |
+
// $social = json_decode($social, true);
|
6 |
+
if (array_key_exists("facebook_messenger", $social)) {
|
7 |
+
?>
|
8 |
+
<div id="fb-root"></div>
|
9 |
+
<script>(function (d, s, id) {
|
10 |
+
var js, fjs = d.getElementsByTagName(s)[0];
|
11 |
+
if (d.getElementById(id)) return;
|
12 |
+
js = d.createElement(s);
|
13 |
+
js.id = id;
|
14 |
+
js.src = 'https://connect.facebook.net/locale/sdk.js#xfbml=1&version=v3.0';
|
15 |
+
fjs.parentNode.insertBefore(js, fjs);
|
16 |
+
}(document, 'script', 'facebook-jssdk'));
|
17 |
+
</script>
|
18 |
+
<?php }
|
19 |
}?>
|
20 |
|
21 |
<?php $bg_color = $this->get_current_color();?>
|
22 |
+
<?php $len = count($this->int_arr());?>
|
23 |
+
<?php $cta = $this->getCallToAction();
|
24 |
+
?>
|
25 |
|
26 |
<?php
|
27 |
$positionSide = get_option('positionSide');
|
30 |
$cht_widget_size = get_option('cht_widget_size');
|
31 |
$cta = str_replace("'","'",$cta);
|
32 |
$cta = str_replace('"',""",$cta);
|
33 |
+
|
34 |
+
$settings = array();
|
35 |
+
$settings['isPRO'] = 0;
|
36 |
+
$settings['position'] = get_option('cht_position');
|
37 |
+
$settings['social'] = $this->int_arr();
|
38 |
+
$settings['pos_side'] = empty($positionSide) ? 'right' : $positionSide;
|
39 |
+
$settings['bot'] = ($cht_bottom_spacing) ? $cht_bottom_spacing : '25';
|
40 |
+
$settings['side'] = ($cht_side_spacing) ? $cht_side_spacing : '25';
|
41 |
+
$settings['device'] = $this->device();
|
42 |
+
$settings['color'] = ($bg_color) ? $bg_color : '#A886CD';;
|
43 |
+
$settings['widget_size'] = ($cht_widget_size) ? $cht_widget_size: '54';
|
44 |
+
$settings['widget_type'] = get_option('widget_icon');
|
45 |
+
$settings['widget_img'] = $this->getCustomWidgetImg();
|
46 |
+
$settings['cta'] = addslashes($cta);
|
47 |
+
$settings['link_active'] = get_option('cht_credit');
|
48 |
+
$settings['active'] = ($cht_active && $len > 0 && $len < 3) ? "true" : "false";
|
49 |
+
$data = array();
|
50 |
+
$data['object_settings'] = $settings;
|
51 |
+
if($len > 0 && $len < 3) {
|
52 |
+
?>
|
53 |
+
<script>
|
54 |
+
var chaty_settings = '<?php echo json_encode($data) ?>';
|
55 |
+
</script>
|
56 |
+
<script src="<?php echo CHT_PLUGIN_URL ?>assets/js/cht-front-script.js?<?php echo rand(); ?>">
|
57 |
+
</script>
|
58 |
+
<?php
|
59 |
+
}
|
60 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|