Version Description
Added an option to change the Hide text
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.4.6 |
Comparing to | |
See all releases |
Code changes from version 2.4.5 to 2.4.6
- admin/class-admin-base.php +9 -0
- assets/css/cht-style.css +1 -1
- assets/js/cht-front-script.js +5 -2
- cht-icons.php +4 -2
- readme.txt +6 -1
- views/parts/section1.php +4 -5
- views/widget.php +3 -0
admin/class-admin-base.php
CHANGED
@@ -52,6 +52,13 @@ class CHT_Admin_Base
|
|
52 |
add_action('wp_ajax_chaty_plugin_deactivate', array($this, 'chaty_plugin_deactivate'));
|
53 |
|
54 |
add_action("wp_ajax_chaty_update_status", array($this, 'chaty_update_status'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
|
57 |
public function chaty_update_status() {
|
@@ -539,6 +546,7 @@ class CHT_Admin_Base
|
|
539 |
add_settings_field('chaty_trigger_on_scroll', 'CTA trigger on scroll', '', $this->plugin_slug);
|
540 |
add_settings_field('chaty_trigger_on_page_scroll', 'CTA page scroll', '', $this->plugin_slug);
|
541 |
add_settings_field('cht_close_button', 'CTA close button', '', $this->plugin_slug);
|
|
|
542 |
|
543 |
// section three
|
544 |
add_settings_field('cht_active', 'Active', '', $this->plugin_slug);
|
@@ -590,6 +598,7 @@ class CHT_Admin_Base
|
|
590 |
register_setting($this->plugin_slug, 'chaty_trigger_on_scroll', 'chaty_sanitize_options');
|
591 |
register_setting($this->plugin_slug, 'chaty_trigger_on_page_scroll', 'chaty_sanitize_options');
|
592 |
register_setting($this->plugin_slug, 'cht_close_button', 'chaty_sanitize_options');
|
|
|
593 |
|
594 |
add_action('pre_update_option_cht_widget_img', array($this, 'uploadCustomWidget'), 10, 3);
|
595 |
|
52 |
add_action('wp_ajax_chaty_plugin_deactivate', array($this, 'chaty_plugin_deactivate'));
|
53 |
|
54 |
add_action("wp_ajax_chaty_update_status", array($this, 'chaty_update_status'));
|
55 |
+
|
56 |
+
/* load language files */
|
57 |
+
add_action( 'plugins_loaded', array( $this, 'chaty_text' ) );
|
58 |
+
}
|
59 |
+
|
60 |
+
public function chaty_text() {
|
61 |
+
load_plugin_textdomain("chaty", FALSE, dirname(plugin_basename(__FILE__)).'/languages/');
|
62 |
}
|
63 |
|
64 |
public function chaty_update_status() {
|
546 |
add_settings_field('chaty_trigger_on_scroll', 'CTA trigger on scroll', '', $this->plugin_slug);
|
547 |
add_settings_field('chaty_trigger_on_page_scroll', 'CTA page scroll', '', $this->plugin_slug);
|
548 |
add_settings_field('cht_close_button', 'CTA close button', '', $this->plugin_slug);
|
549 |
+
add_settings_field('cht_close_button_text', 'CTA close button text', '', $this->plugin_slug);
|
550 |
|
551 |
// section three
|
552 |
add_settings_field('cht_active', 'Active', '', $this->plugin_slug);
|
598 |
register_setting($this->plugin_slug, 'chaty_trigger_on_scroll', 'chaty_sanitize_options');
|
599 |
register_setting($this->plugin_slug, 'chaty_trigger_on_page_scroll', 'chaty_sanitize_options');
|
600 |
register_setting($this->plugin_slug, 'cht_close_button', 'chaty_sanitize_options');
|
601 |
+
register_setting($this->plugin_slug, 'cht_close_button_text', 'chaty_sanitize_options');
|
602 |
|
603 |
add_action('pre_update_option_cht_widget_img', array($this, 'uploadCustomWidget'), 10, 3);
|
604 |
|
assets/css/cht-style.css
CHANGED
@@ -3944,7 +3944,7 @@ a#upload_qr_code span {
|
|
3944 |
pointer-events: auto;
|
3945 |
}
|
3946 |
.chaty-settings.cls-btn {
|
3947 |
-
margin-left:
|
3948 |
}
|
3949 |
.section2 {
|
3950 |
padding: 25px 15px 30px;
|
3944 |
pointer-events: auto;
|
3945 |
}
|
3946 |
.chaty-settings.cls-btn {
|
3947 |
+
margin-left: 164px;
|
3948 |
}
|
3949 |
.section2 {
|
3950 |
padding: 25px 15px 30px;
|
assets/js/cht-front-script.js
CHANGED
@@ -54,7 +54,7 @@
|
|
54 |
var animationTimer;
|
55 |
var isWidgetEnabled = 0;
|
56 |
var e = chaty_settings;
|
57 |
-
var animationClass = ".i-trigger .chaty-widget-i svg, .i-trigger .chaty-widget-i .widget-img, .i-trigger .chaty-widget-i .facustom-icon";
|
58 |
|
59 |
function o(e) {
|
60 |
var i = "", n = 0;
|
@@ -144,7 +144,7 @@
|
|
144 |
default:
|
145 |
return '<svg version="1.1" id="ch" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54" style="enable-background:new -496 507.7 54 54;" xml:space="preserve">\n<style type="text/css">.st1 {fill: #FFFFFF;}.st0{fill: #808080;}</style>\n<g><circle cx="-469" cy="534.7" r="27" fill="' + t.object_settings.color + '"/></g>\n<path class="st1" d="M-459.9,523.7h-20.3c-1.9,0-3.4,1.5-3.4,3.4v15.3c0,1.9,1.5,3.4,3.4,3.4h11.4l5.9,4.9c0.2,0.2,0.3,0.2,0.5,0.2 h0.3c0.3-0.2,0.5-0.5,0.5-0.8v-4.2h1.7c1.9,0,3.4-1.5,3.4-3.4v-15.3C-456.5,525.2-458,523.7-459.9,523.7z"/>\n<path class="st0" d="M-477.7,530.5h11.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-11.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,530.8-478.2,530.5-477.7,530.5z"/>\n<path class="st0" d="M-477.7,533.5h7.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-7.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,533.9-478.2,533.5-477.7,533.5z"/>\n</svg>'
|
146 |
}
|
147 |
-
}(e), C = i("display_cta"), "" != d && "none" != C && (g += ' <div class="chaty-widget-i-title true"> ', g += d, g += "</div>"), g += "</div>", g += '<div class="chaty-widget-i i-trigger-close" data-title="Hide" style="background-color:' + e.object_settings.color + '">', g += '<svg viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">', g += '<ellipse cx="26" cy="26" rx="26" ry="26" fill="' + e.object_settings.color + '"/>', g += '<rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(18.35 15.6599) scale(0.998038 1.00196) rotate(45)" fill="white"/>', g += '<rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(37.5056 18.422) scale(0.998038 1.00196) rotate(135)" fill="white"/>', g += "</svg>", g += '<div class="chaty-widget-i-title">', g +=
|
148 |
|
149 |
} else {
|
150 |
var w = "";
|
@@ -451,6 +451,9 @@
|
|
451 |
|
452 |
if(chaty_settings.object_settings.animation_class != "") {
|
453 |
if(chaty_settings.object_settings.animation_class != "sheen") {
|
|
|
|
|
|
|
454 |
if (activeWidget > 1) {
|
455 |
jQuery(animationClass).removeClass("chaty-animation-" + chaty_settings.object_settings.animation_class).removeClass("start-now");
|
456 |
setTimeout(function () {
|
54 |
var animationTimer;
|
55 |
var isWidgetEnabled = 0;
|
56 |
var e = chaty_settings;
|
57 |
+
var animationClass = ".i-trigger .chaty-widget-i .svg, .i-trigger .chaty-widget-i .widget-img, .i-trigger .chaty-widget-i .facustom-icon";
|
58 |
|
59 |
function o(e) {
|
60 |
var i = "", n = 0;
|
144 |
default:
|
145 |
return '<svg version="1.1" id="ch" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54" style="enable-background:new -496 507.7 54 54;" xml:space="preserve">\n<style type="text/css">.st1 {fill: #FFFFFF;}.st0{fill: #808080;}</style>\n<g><circle cx="-469" cy="534.7" r="27" fill="' + t.object_settings.color + '"/></g>\n<path class="st1" d="M-459.9,523.7h-20.3c-1.9,0-3.4,1.5-3.4,3.4v15.3c0,1.9,1.5,3.4,3.4,3.4h11.4l5.9,4.9c0.2,0.2,0.3,0.2,0.5,0.2 h0.3c0.3-0.2,0.5-0.5,0.5-0.8v-4.2h1.7c1.9,0,3.4-1.5,3.4-3.4v-15.3C-456.5,525.2-458,523.7-459.9,523.7z"/>\n<path class="st0" d="M-477.7,530.5h11.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-11.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,530.8-478.2,530.5-477.7,530.5z"/>\n<path class="st0" d="M-477.7,533.5h7.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-7.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,533.9-478.2,533.5-477.7,533.5z"/>\n</svg>'
|
146 |
}
|
147 |
+
}(e), C = i("display_cta"), "" != d && "none" != C && (g += ' <div class="chaty-widget-i-title true"> ', g += d, g += "</div>"), g += "</div>", g += '<div class="chaty-widget-i i-trigger-close" data-title="Hide" style="background-color:' + e.object_settings.color + '">', g += '<svg viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">', g += '<ellipse cx="26" cy="26" rx="26" ry="26" fill="' + e.object_settings.color + '"/>', g += '<rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(18.35 15.6599) scale(0.998038 1.00196) rotate(45)" fill="white"/>', g += '<rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(37.5056 18.422) scale(0.998038 1.00196) rotate(135)" fill="white"/>', g += "</svg>", g += '<div class="chaty-widget-i-title">', g += e.object_settings.button_text, g += "</div>", g += "</div>", g += " </div>", 0 === n.length && (g += '<div class="get" style="position: absolute;width: 100%;text-align: center;display: block!important; opacity: 1 !important;visibility: visible !important; top:100%; margin-top:5px;"> <a rel="noopener" href="https://premio.io/downloads/chaty/?utm_source=wpplugin&domain='+CU+'" target="_blank" style=" font-size: 11px !important; top: -5px !important; position: relative !important; color: #222 !important; font-family: Lato, Helvetica, Arial, sans-serif; display: block !important; opacity: 1 !important; visibility: visible !important; " class="chaty-get-btn">Get Chaty</a></div>'), g += "</div>"
|
148 |
|
149 |
} else {
|
150 |
var w = "";
|
451 |
|
452 |
if(chaty_settings.object_settings.animation_class != "") {
|
453 |
if(chaty_settings.object_settings.animation_class != "sheen") {
|
454 |
+
jQuery(".i-trigger .chaty-widget-i svg").wrap(function() {
|
455 |
+
return "<div class='svg'></div>";
|
456 |
+
});
|
457 |
if (activeWidget > 1) {
|
458 |
jQuery(animationClass).removeClass("chaty-animation-" + chaty_settings.object_settings.animation_class).removeClass("start-now");
|
459 |
setTimeout(function () {
|
cht-icons.php
CHANGED
@@ -5,7 +5,9 @@
|
|
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 |
-
|
|
|
|
|
9 |
License: GPL2
|
10 |
*/
|
11 |
|
@@ -23,7 +25,7 @@ define('CHT_INC', CHT_DIR . '/includes');
|
|
23 |
define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
|
24 |
define('CHT_PLUGIN_URL', plugin_dir_url(__FILE__));
|
25 |
define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
|
26 |
-
define('CHT_VERSION', "2.4.
|
27 |
|
28 |
if (!function_exists('wp_doing_ajax')) {
|
29 |
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 |
+
Text Domain: chaty
|
9 |
+
Domain Path: /languages
|
10 |
+
Version: 2.4.6
|
11 |
License: GPL2
|
12 |
*/
|
13 |
|
25 |
define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
|
26 |
define('CHT_PLUGIN_URL', plugin_dir_url(__FILE__));
|
27 |
define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
|
28 |
+
define('CHT_VERSION', "2.4.6");
|
29 |
|
30 |
if (!function_exists('wp_doing_ajax')) {
|
31 |
function wp_doing_ajax()
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: galdub, tomeraharon, premio
|
|
3 |
Tags: whatsapp, facebook messenger, click to chat, chat, chat button, call now button, messenger, whatsapp button, chat icon, messenger chat icon, contact button, click to call
|
4 |
Requires at least: 3.1
|
5 |
Tested up to: 5.3
|
6 |
-
Stable tag: 2.4.
|
7 |
Plugin URI: https://premio.io/downloads/chaty/
|
8 |
|
9 |
Let your visitors contact you via Facebook Messenger, Whatsapp, Telegram, Viber, Email, Phone call, SMS and more with customizable chat & call buttons
|
@@ -17,6 +17,8 @@ Show a chat button on the bottom of your site and communicate with your customer
|
|
17 |
* Improve your customer support
|
18 |
* Direct customers to your store's location
|
19 |
|
|
|
|
|
20 |
= The ultimate click to chat and call now button =
|
21 |
Are you looking for a chat button or a click to call button? Want to make it easier for your potential customers to contact you via Facebook Messenger or Telegram?
|
22 |
|
@@ -194,6 +196,9 @@ Yes! You can even decide what chat buttons will show up on each device (desktop/
|
|
194 |
|
195 |
== Changelog ==
|
196 |
|
|
|
|
|
|
|
197 |
= 2.4.5 =
|
198 |
Email icon bug fixed
|
199 |
|
3 |
Tags: whatsapp, facebook messenger, click to chat, chat, chat button, call now button, messenger, whatsapp button, chat icon, messenger chat icon, contact button, click to call
|
4 |
Requires at least: 3.1
|
5 |
Tested up to: 5.3
|
6 |
+
Stable tag: 2.4.6
|
7 |
Plugin URI: https://premio.io/downloads/chaty/
|
8 |
|
9 |
Let your visitors contact you via Facebook Messenger, Whatsapp, Telegram, Viber, Email, Phone call, SMS and more with customizable chat & call buttons
|
17 |
* Improve your customer support
|
18 |
* Direct customers to your store's location
|
19 |
|
20 |
+
[youtube https://www.youtube.com/watch?v=uaqjRp3HAqU]
|
21 |
+
|
22 |
= The ultimate click to chat and call now button =
|
23 |
Are you looking for a chat button or a click to call button? Want to make it easier for your potential customers to contact you via Facebook Messenger or Telegram?
|
24 |
|
196 |
|
197 |
== Changelog ==
|
198 |
|
199 |
+
= 2.4.6 =
|
200 |
+
Added an option to change the Hide text
|
201 |
+
|
202 |
= 2.4.5 =
|
203 |
Email icon bug fixed
|
204 |
|
views/parts/section1.php
CHANGED
@@ -460,8 +460,10 @@
|
|
460 |
<?php
|
461 |
$is_pro = $this->is_pro();
|
462 |
$pro_class = ($is_pro)?"pro":"free";
|
|
|
|
|
463 |
?>
|
464 |
-
<li class="chaty-cls-setting"
|
465 |
<div class="channels-selected__item <?php esc_attr_e($pro_class) ?> 1 available">
|
466 |
<div class="chaty-default-settings">
|
467 |
<div class="move-icon">
|
@@ -477,10 +479,7 @@
|
|
477 |
</span>
|
478 |
</div>
|
479 |
<div class="channels__input-box cls-btn-settings">
|
480 |
-
<input type="text" class="channels__input" name="" value="
|
481 |
-
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl()); ?>">
|
482 |
-
<?php esc_attr_e('Upgrade to Pro', CHT_OPT);?>
|
483 |
-
</a>
|
484 |
</div>
|
485 |
<div class="chaty-settings cls-btn">
|
486 |
<a href="javascript:;"><span class="dashicons dashicons-admin-generic"></span></a>
|
460 |
<?php
|
461 |
$is_pro = $this->is_pro();
|
462 |
$pro_class = ($is_pro)?"pro":"free";
|
463 |
+
$text = get_option("cht_close_button_text");
|
464 |
+
$text = ($text === false)?"Hide":$text;
|
465 |
?>
|
466 |
+
<li class="chaty-cls-setting" id="chaty-social-close">
|
467 |
<div class="channels-selected__item <?php esc_attr_e($pro_class) ?> 1 available">
|
468 |
<div class="chaty-default-settings">
|
469 |
<div class="move-icon">
|
479 |
</span>
|
480 |
</div>
|
481 |
<div class="channels__input-box cls-btn-settings">
|
482 |
+
<input type="text" class="channels__input" name="cht_close_button_text" value="<?php echo esc_attr($text) ?>" data-gramm_editor="false" >
|
|
|
|
|
|
|
483 |
</div>
|
484 |
<div class="chaty-settings cls-btn">
|
485 |
<a href="javascript:;"><span class="dashicons dashicons-admin-generic"></span></a>
|
views/widget.php
CHANGED
@@ -45,6 +45,8 @@ $state = empty($state)?"click":$state;
|
|
45 |
|
46 |
$has_close_button = get_option("cht_close_button");
|
47 |
$has_close_button = empty($has_close_button)?"yes":$has_close_button;
|
|
|
|
|
48 |
|
49 |
$settings = array();
|
50 |
$settings['isPRO'] = 0;
|
@@ -73,6 +75,7 @@ $settings['on_page_scroll'] = $on_page_scroll;
|
|
73 |
$settings['page_scroll'] = $page_scroll;
|
74 |
$settings['display_state'] = $state;
|
75 |
$settings['has_close_button'] = $has_close_button;
|
|
|
76 |
$data = array();
|
77 |
$data['object_settings'] = $settings;
|
78 |
//echo "<pre>"; print_r($settings['social']); die;
|
45 |
|
46 |
$has_close_button = get_option("cht_close_button");
|
47 |
$has_close_button = empty($has_close_button)?"yes":$has_close_button;
|
48 |
+
$button_text = get_option("cht_close_button_text");
|
49 |
+
$button_text = ($button_text === false)?"Hide":$button_text;
|
50 |
|
51 |
$settings = array();
|
52 |
$settings['isPRO'] = 0;
|
75 |
$settings['page_scroll'] = $page_scroll;
|
76 |
$settings['display_state'] = $state;
|
77 |
$settings['has_close_button'] = $has_close_button;
|
78 |
+
$settings['button_text'] = $button_text;
|
79 |
$data = array();
|
80 |
$data['object_settings'] = $settings;
|
81 |
//echo "<pre>"; print_r($settings['social']); die;
|