Version Description
- WeChat clarification
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.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.9 to 2.1
- cht-icons.php +2 -2
- frontend/class-frontend.php +339 -334
- readme.txt +4 -1
- views/parts/section1.php +527 -522
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.
|
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.
|
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.1
|
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.1");
|
26 |
|
27 |
if (!function_exists('wp_doing_ajax')) {
|
28 |
function wp_doing_ajax()
|
frontend/class-frontend.php
CHANGED
@@ -1,334 +1,339 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace CHT\frontend;
|
4 |
-
|
5 |
-
use CHT\admin\CHT_Admin_Base;
|
6 |
-
use CHT\admin\CHT_Social_Icons;
|
7 |
-
|
8 |
-
require_once CHT_ADMIN_INC . '/class-admin-base.php';
|
9 |
-
require_once CHT_ADMIN_INC . '/class-social-icons.php';
|
10 |
-
|
11 |
-
class CHT_Frontend extends CHT_Admin_Base
|
12 |
-
{
|
13 |
-
/**
|
14 |
-
* CHT_Frontend constructor.
|
15 |
-
*/
|
16 |
-
public function __construct()
|
17 |
-
{
|
18 |
-
$this->socials = CHT_Social_Icons::get_instance()->get_icons_list();
|
19 |
-
if (wp_doing_ajax()) {
|
20 |
-
add_action('wp_ajax_choose_social', array($this, 'choose_social_handler'));
|
21 |
-
add_action('wp_ajax_remove_social', array($this, 'remove_social_handler'));
|
22 |
-
add_action('wp_ajax_add_token', array($this, 'add_token'));
|
23 |
-
add_action('wp_ajax_del_token', array($this, 'del_token'));
|
24 |
-
}
|
25 |
-
|
26 |
-
add_action('wp_enqueue_scripts', array($this, 'front_styles'));
|
27 |
-
add_action('wp_enqueue_scripts', array($this, 'front_scripts'));
|
28 |
-
add_action('wp_footer', array($this, 'insert_widget'));
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Function add token
|
33 |
-
*/
|
34 |
-
public function add_token()
|
35 |
-
{
|
36 |
-
check_ajax_referer('cht_nonce_ajax', 'nonce_code');
|
37 |
-
$token = (!empty($_POST['token'])) ? sanitize_text_field($_POST['token']) : null;
|
38 |
-
|
39 |
-
if ($token !== null) {
|
40 |
-
if ($this->is_pro($token)) {
|
41 |
-
update_option('cht_license_key', $token, 'no');
|
42 |
-
echo 'true';
|
43 |
-
wp_die();
|
44 |
-
}
|
45 |
-
}
|
46 |
-
echo '';
|
47 |
-
wp_die();
|
48 |
-
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Function add token
|
53 |
-
*/
|
54 |
-
public function del_token()
|
55 |
-
{
|
56 |
-
check_ajax_referer('cht_nonce_ajax', 'nonce_code');
|
57 |
-
if (!$this->is_pro()) {
|
58 |
-
update_option('cht_license_key', '', '');
|
59 |
-
}
|
60 |
-
echo '';
|
61 |
-
wp_die();
|
62 |
-
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
*
|
67 |
-
*/
|
68 |
-
public function choose_social_handler()
|
69 |
-
{
|
70 |
-
check_ajax_referer('cht_nonce_ajax', 'nonce_code');
|
71 |
-
$social = (!empty($_POST['social'])) ? sanitize_text_field($_POST['social']) : null;
|
72 |
-
$version = (!empty($_POST['version'])) ? sanitize_text_field($_POST['version']) : '';
|
73 |
-
|
74 |
-
if ($social !== null) {
|
75 |
-
foreach ($this->socials as $item) {
|
76 |
-
if ($item['slug'] == $social) {
|
77 |
-
break;
|
78 |
-
}
|
79 |
-
}
|
80 |
-
|
81 |
-
if (!$item) {
|
82 |
-
return;
|
83 |
-
}
|
84 |
-
|
85 |
-
// $token = ($this->is_pro()) ? 'pro' : 'free';
|
86 |
-
|
87 |
-
$social_opt = get_option('cht_social_' . $social);
|
88 |
-
if (empty($social_opt)) {
|
89 |
-
$social_opt = [
|
90 |
-
'value' => '',
|
91 |
-
'is_mobile' => 'checked',
|
92 |
-
'is_desktop' => 'checked'
|
93 |
-
];
|
94 |
-
} else {
|
95 |
-
$social_opt['is_desktop'] = isset($social_opt['is_desktop']) ? $social_opt['is_desktop'] : '';
|
96 |
-
$social_opt['is_mobile'] = isset($social_opt['is_mobile']) ? $social_opt['is_mobile'] : '';
|
97 |
-
}
|
98 |
-
|
99 |
-
$social_opt['title'] = $item['title'];
|
100 |
-
ob_start();
|
101 |
-
$status = 0;
|
102 |
-
?>
|
103 |
-
<li data-id="<?php echo $item['slug'] ?>" id="chaty-social-<?php echo $item['slug'] ?>">
|
104 |
-
<div class="channels-selected__item <?php echo ($status)?"img-active":"" ?> <?php echo ($this->is_pro()) ? 'pro' : 'free'; ?> 1 available">
|
105 |
-
<div class="chaty-default-settings">
|
106 |
-
<div class="move-icon">
|
107 |
-
<img src="<?php echo plugin_dir_url("") ?>/chaty/assets/images/move-icon.png">
|
108 |
-
</div>
|
109 |
-
<div class="icon icon-md active" data-title="<?php echo $item['title']; ?>">
|
110 |
-
<span class="default-chaty-icon custom-icon-<?php echo $item['slug'] ?> default_image_<?php echo $item['slug'] ?>" >
|
111 |
-
<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
|
112 |
-
<?php echo $item['svg']; ?>
|
113 |
-
</svg>
|
114 |
-
</span>
|
115 |
-
</div>
|
116 |
-
<div class="channels__input-box">
|
117 |
-
<input type="text"
|
118 |
-
class="channels__input"
|
119 |
-
name="cht_social_<?php echo esc_attr($item['slug']); ?>[value]"
|
120 |
-
value="<?php echo esc_attr($social_opt['value']); ?>"
|
121 |
-
data-gramm_editor="false"
|
122 |
-
id="<?php echo esc_attr($item['slug']); ?>"
|
123 |
-
>
|
124 |
-
</div>
|
125 |
-
<div>
|
126 |
-
<label class="channels__view"
|
127 |
-
for="<?php echo str_replace(' ', '_', esc_attr($this->del_space($item['slug']))); ?>Desktop">
|
128 |
-
<input type="checkbox"
|
129 |
-
id="<?php echo str_replace(' ', '_', esc_attr($this->del_space($item['slug']))); ?>Desktop"
|
130 |
-
class="channels__view-check js-chanel-icon js-chanel-desktop"
|
131 |
-
data-type="<?php echo str_replace(' ', '_', strtolower(esc_attr($this->del_space($item['slug'])))); ?>"
|
132 |
-
name="cht_social_<?php echo esc_attr($item['slug']); ?>[is_desktop]"
|
133 |
-
value="checked"
|
134 |
-
data-gramm_editor="false"
|
135 |
-
<?php echo isset($social_opt['is_desktop']) ? $social_opt['is_desktop'] : ''; ?>
|
136 |
-
>
|
137 |
-
<span class="channels__view-txt">Desktop</label>
|
138 |
-
</label>
|
139 |
-
<label class="channels__view"
|
140 |
-
for="<?php echo str_replace(' ', '_', esc_attr($this->del_space($item['slug']))); ?>Mobile">
|
141 |
-
<input type="checkbox"
|
142 |
-
id="<?php echo str_replace(' ', '_', esc_attr($this->del_space($item['slug']))); ?>Mobile"
|
143 |
-
class="channels__view-check js-chanel-icon js-chanel-mobile"
|
144 |
-
data-type="<?php echo str_replace(' ', '_', strtolower(esc_attr($this->del_space($item['slug'])))); ?>"
|
145 |
-
name="cht_social_<?php echo esc_attr($item['slug']); ?>[is_mobile]"
|
146 |
-
value="checked"
|
147 |
-
data-gramm_editor="false"
|
148 |
-
<?php echo isset($social_opt['is_mobile']) ? $social_opt['is_mobile'] : ''; ?>
|
149 |
-
>
|
150 |
-
<span class="channels__view-txt">Mobile</span>
|
151 |
-
</label>
|
152 |
-
</div>
|
153 |
-
<div class="chaty-settings" onclick="toggle_chaty_setting('<?php echo esc_attr($item['slug']); ?>')">
|
154 |
-
<a href="javascript:;"><span class="dashicons dashicons-admin-generic"></span></a>
|
155 |
-
</div>
|
156 |
-
<div class="input-example">
|
157 |
-
<?php _e('For example', CHT_OPT); ?>: <?php echo $item['example']; ?>
|
158 |
-
</div>
|
159 |
-
<?php if($item['slug'] == "Viber") { ?>
|
160 |
-
<div class="viber-help">
|
161 |
-
<span>Try to remove the "+" and your country code</span>
|
162 |
-
Doesn't work?
|
163 |
-
</div>
|
164 |
-
<?php } else if($item['slug'] == "Facebook_Messenger") { ?>
|
165 |
-
<div class="viber-help">
|
166 |
-
<span>Your Facebook page has to be available to all ages and countries (check your page's settings)</span>
|
167 |
-
Doesn't work?
|
168 |
-
</div>
|
169 |
-
<?php } ?>
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
</
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
</
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
</
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
//
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
}
|
257 |
-
|
258 |
-
public function
|
259 |
-
{
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
$val =
|
297 |
-
$val = str_replace("
|
298 |
-
$
|
299 |
-
|
300 |
-
|
301 |
-
$
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
}
|
321 |
-
|
322 |
-
private function
|
323 |
-
{
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace CHT\frontend;
|
4 |
+
|
5 |
+
use CHT\admin\CHT_Admin_Base;
|
6 |
+
use CHT\admin\CHT_Social_Icons;
|
7 |
+
|
8 |
+
require_once CHT_ADMIN_INC . '/class-admin-base.php';
|
9 |
+
require_once CHT_ADMIN_INC . '/class-social-icons.php';
|
10 |
+
|
11 |
+
class CHT_Frontend extends CHT_Admin_Base
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* CHT_Frontend constructor.
|
15 |
+
*/
|
16 |
+
public function __construct()
|
17 |
+
{
|
18 |
+
$this->socials = CHT_Social_Icons::get_instance()->get_icons_list();
|
19 |
+
if (wp_doing_ajax()) {
|
20 |
+
add_action('wp_ajax_choose_social', array($this, 'choose_social_handler'));
|
21 |
+
add_action('wp_ajax_remove_social', array($this, 'remove_social_handler'));
|
22 |
+
add_action('wp_ajax_add_token', array($this, 'add_token'));
|
23 |
+
add_action('wp_ajax_del_token', array($this, 'del_token'));
|
24 |
+
}
|
25 |
+
|
26 |
+
add_action('wp_enqueue_scripts', array($this, 'front_styles'));
|
27 |
+
add_action('wp_enqueue_scripts', array($this, 'front_scripts'));
|
28 |
+
add_action('wp_footer', array($this, 'insert_widget'));
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Function add token
|
33 |
+
*/
|
34 |
+
public function add_token()
|
35 |
+
{
|
36 |
+
check_ajax_referer('cht_nonce_ajax', 'nonce_code');
|
37 |
+
$token = (!empty($_POST['token'])) ? sanitize_text_field($_POST['token']) : null;
|
38 |
+
|
39 |
+
if ($token !== null) {
|
40 |
+
if ($this->is_pro($token)) {
|
41 |
+
update_option('cht_license_key', $token, 'no');
|
42 |
+
echo 'true';
|
43 |
+
wp_die();
|
44 |
+
}
|
45 |
+
}
|
46 |
+
echo '';
|
47 |
+
wp_die();
|
48 |
+
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Function add token
|
53 |
+
*/
|
54 |
+
public function del_token()
|
55 |
+
{
|
56 |
+
check_ajax_referer('cht_nonce_ajax', 'nonce_code');
|
57 |
+
if (!$this->is_pro()) {
|
58 |
+
update_option('cht_license_key', '', '');
|
59 |
+
}
|
60 |
+
echo '';
|
61 |
+
wp_die();
|
62 |
+
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
*
|
67 |
+
*/
|
68 |
+
public function choose_social_handler()
|
69 |
+
{
|
70 |
+
check_ajax_referer('cht_nonce_ajax', 'nonce_code');
|
71 |
+
$social = (!empty($_POST['social'])) ? sanitize_text_field($_POST['social']) : null;
|
72 |
+
$version = (!empty($_POST['version'])) ? sanitize_text_field($_POST['version']) : '';
|
73 |
+
|
74 |
+
if ($social !== null) {
|
75 |
+
foreach ($this->socials as $item) {
|
76 |
+
if ($item['slug'] == $social) {
|
77 |
+
break;
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
if (!$item) {
|
82 |
+
return;
|
83 |
+
}
|
84 |
+
|
85 |
+
// $token = ($this->is_pro()) ? 'pro' : 'free';
|
86 |
+
|
87 |
+
$social_opt = get_option('cht_social_' . $social);
|
88 |
+
if (empty($social_opt)) {
|
89 |
+
$social_opt = [
|
90 |
+
'value' => '',
|
91 |
+
'is_mobile' => 'checked',
|
92 |
+
'is_desktop' => 'checked'
|
93 |
+
];
|
94 |
+
} else {
|
95 |
+
$social_opt['is_desktop'] = isset($social_opt['is_desktop']) ? $social_opt['is_desktop'] : '';
|
96 |
+
$social_opt['is_mobile'] = isset($social_opt['is_mobile']) ? $social_opt['is_mobile'] : '';
|
97 |
+
}
|
98 |
+
|
99 |
+
$social_opt['title'] = $item['title'];
|
100 |
+
ob_start();
|
101 |
+
$status = 0;
|
102 |
+
?>
|
103 |
+
<li data-id="<?php echo $item['slug'] ?>" id="chaty-social-<?php echo $item['slug'] ?>">
|
104 |
+
<div class="channels-selected__item <?php echo ($status)?"img-active":"" ?> <?php echo ($this->is_pro()) ? 'pro' : 'free'; ?> 1 available">
|
105 |
+
<div class="chaty-default-settings">
|
106 |
+
<div class="move-icon">
|
107 |
+
<img src="<?php echo plugin_dir_url("") ?>/chaty/assets/images/move-icon.png">
|
108 |
+
</div>
|
109 |
+
<div class="icon icon-md active" data-title="<?php echo $item['title']; ?>">
|
110 |
+
<span class="default-chaty-icon custom-icon-<?php echo $item['slug'] ?> default_image_<?php echo $item['slug'] ?>" >
|
111 |
+
<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
|
112 |
+
<?php echo $item['svg']; ?>
|
113 |
+
</svg>
|
114 |
+
</span>
|
115 |
+
</div>
|
116 |
+
<div class="channels__input-box">
|
117 |
+
<input type="text"
|
118 |
+
class="channels__input"
|
119 |
+
name="cht_social_<?php echo esc_attr($item['slug']); ?>[value]"
|
120 |
+
value="<?php echo esc_attr($social_opt['value']); ?>"
|
121 |
+
data-gramm_editor="false"
|
122 |
+
id="<?php echo esc_attr($item['slug']); ?>"
|
123 |
+
>
|
124 |
+
</div>
|
125 |
+
<div>
|
126 |
+
<label class="channels__view"
|
127 |
+
for="<?php echo str_replace(' ', '_', esc_attr($this->del_space($item['slug']))); ?>Desktop">
|
128 |
+
<input type="checkbox"
|
129 |
+
id="<?php echo str_replace(' ', '_', esc_attr($this->del_space($item['slug']))); ?>Desktop"
|
130 |
+
class="channels__view-check js-chanel-icon js-chanel-desktop"
|
131 |
+
data-type="<?php echo str_replace(' ', '_', strtolower(esc_attr($this->del_space($item['slug'])))); ?>"
|
132 |
+
name="cht_social_<?php echo esc_attr($item['slug']); ?>[is_desktop]"
|
133 |
+
value="checked"
|
134 |
+
data-gramm_editor="false"
|
135 |
+
<?php echo isset($social_opt['is_desktop']) ? $social_opt['is_desktop'] : ''; ?>
|
136 |
+
>
|
137 |
+
<span class="channels__view-txt">Desktop</label>
|
138 |
+
</label>
|
139 |
+
<label class="channels__view"
|
140 |
+
for="<?php echo str_replace(' ', '_', esc_attr($this->del_space($item['slug']))); ?>Mobile">
|
141 |
+
<input type="checkbox"
|
142 |
+
id="<?php echo str_replace(' ', '_', esc_attr($this->del_space($item['slug']))); ?>Mobile"
|
143 |
+
class="channels__view-check js-chanel-icon js-chanel-mobile"
|
144 |
+
data-type="<?php echo str_replace(' ', '_', strtolower(esc_attr($this->del_space($item['slug'])))); ?>"
|
145 |
+
name="cht_social_<?php echo esc_attr($item['slug']); ?>[is_mobile]"
|
146 |
+
value="checked"
|
147 |
+
data-gramm_editor="false"
|
148 |
+
<?php echo isset($social_opt['is_mobile']) ? $social_opt['is_mobile'] : ''; ?>
|
149 |
+
>
|
150 |
+
<span class="channels__view-txt">Mobile</span>
|
151 |
+
</label>
|
152 |
+
</div>
|
153 |
+
<div class="chaty-settings" onclick="toggle_chaty_setting('<?php echo esc_attr($item['slug']); ?>')">
|
154 |
+
<a href="javascript:;"><span class="dashicons dashicons-admin-generic"></span></a>
|
155 |
+
</div>
|
156 |
+
<div class="input-example">
|
157 |
+
<?php _e('For example', CHT_OPT); ?>: <?php echo $item['example']; ?>
|
158 |
+
</div>
|
159 |
+
<?php if($item['slug'] == "Viber") { ?>
|
160 |
+
<div class="viber-help">
|
161 |
+
<span>Try to remove the "+" and your country code</span>
|
162 |
+
Doesn't work?
|
163 |
+
</div>
|
164 |
+
<?php } else if($item['slug'] == "Facebook_Messenger") { ?>
|
165 |
+
<div class="viber-help">
|
166 |
+
<span>Your Facebook page has to be available to all ages and countries (check your page's settings)</span>
|
167 |
+
Doesn't work?
|
168 |
+
</div>
|
169 |
+
<?php } else if($item['slug'] == "WeChat") { ?>
|
170 |
+
<div class="viber-help">
|
171 |
+
<span>Unfortunately, WeChat doesn't have a click-to-chat API, therefore we can only show your username on-click so visitors can look-up for it. We have a QR upload option available in the pro plan.</span>
|
172 |
+
Doesn't work?
|
173 |
+
</div>
|
174 |
+
<?php } ?>
|
175 |
+
</div>
|
176 |
+
<div class="chaty-advance-settings">
|
177 |
+
<div class="chaty-setting-col">
|
178 |
+
<label>Icon Appearance</label>
|
179 |
+
<div>
|
180 |
+
<input readonly type="text" name="" class="chaty-color-field" value="" style="background-color: <?php echo $item['color'] ?>" />
|
181 |
+
|
182 |
+
<a href="javascript:;" class="upload-chaty-icon"><span class="dashicons dashicons-upload"></span> Custom Image</a>
|
183 |
+
</div>
|
184 |
+
</div>
|
185 |
+
<div class="clear clearfix"></div>
|
186 |
+
<div class="chaty-setting-col">
|
187 |
+
<label>On Hover Text</label>
|
188 |
+
<div>
|
189 |
+
<input readonly type="text" name="" value="<?php echo $social_opt['title'] ?>">
|
190 |
+
</div>
|
191 |
+
</div>
|
192 |
+
<div class="clear clearfix"></div>
|
193 |
+
<?php if($item['slug'] == "Whatsapp") { ?>
|
194 |
+
<div class="clear clearfix"></div>
|
195 |
+
<div class="chaty-setting-col">
|
196 |
+
<label>Pre Set Message</label>
|
197 |
+
<div>
|
198 |
+
<input id="cht_social_message_<?php echo esc_attr($item['slug']); ?>" type="text" name="" value="" >
|
199 |
+
</div>
|
200 |
+
</div>
|
201 |
+
<?php } else if($item['slug'] == "Email") { ?>
|
202 |
+
<div class="clear clearfix"></div>
|
203 |
+
<div class="chaty-setting-col">
|
204 |
+
<label>Mail Subject</label>
|
205 |
+
<div>
|
206 |
+
<input id="cht_social_message_<?php echo esc_attr($item['slug']); ?>" type="text" name="" value="" >
|
207 |
+
</div>
|
208 |
+
</div>
|
209 |
+
<?php } else if($item['slug'] == "WeChat") { ?>
|
210 |
+
<div class="clear clearfix"></div>
|
211 |
+
<div class="chaty-setting-col">
|
212 |
+
<label>Upload QR Code</label>
|
213 |
+
<div>
|
214 |
+
<a class="cht-upload-image " id="upload_qr_code" href="javascript:;" >
|
215 |
+
<span class="dashicons dashicons-upload"></span>
|
216 |
+
</a>
|
217 |
+
</div>
|
218 |
+
</div>
|
219 |
+
<?php } ?>
|
220 |
+
<div class="chaty-pro-feature">
|
221 |
+
<a target="_blank" href="<?php echo $this->getUpgradeMenuItemUrl();?>">
|
222 |
+
<?php _e('Upgrade to Pro', CHT_OPT);?>
|
223 |
+
</a>
|
224 |
+
</div>
|
225 |
+
</div>
|
226 |
+
<button class="btn-cancel" data-social="<?php echo esc_attr($item['slug']); ?>">
|
227 |
+
<svg width="14" height="13" viewBox="0 0 14 13" fill="none"
|
228 |
+
xmlns="http://www.w3.org/2000/svg">
|
229 |
+
<rect width="15.6301" height="2.24494" rx="1.12247"
|
230 |
+
transform="translate(2.26764 0.0615997) rotate(45)" fill="white"/>
|
231 |
+
<rect width="15.6301" height="2.24494" rx="1.12247"
|
232 |
+
transform="translate(13.3198 1.649) rotate(135)" fill="white"/>
|
233 |
+
</svg>
|
234 |
+
</button>
|
235 |
+
</div>
|
236 |
+
</li>
|
237 |
+
<?php
|
238 |
+
$html = ob_get_clean();
|
239 |
+
|
240 |
+
echo json_encode($html);
|
241 |
+
}
|
242 |
+
|
243 |
+
|
244 |
+
wp_die();
|
245 |
+
}
|
246 |
+
|
247 |
+
public function remove_social_handler()
|
248 |
+
{
|
249 |
+
// $social = isset($_POST['social']) ? $_POST['social'] : '';
|
250 |
+
// if ($social) {
|
251 |
+
// $res = delete_option('cht_social_' . $social);
|
252 |
+
|
253 |
+
// echo $res;
|
254 |
+
// }
|
255 |
+
wp_die();
|
256 |
+
}
|
257 |
+
|
258 |
+
public function front_styles()
|
259 |
+
{
|
260 |
+
// wp_enqueue_style( 'cht_widget_style', plugins_url('../assets/css/cht-widget.css', __FILE__));
|
261 |
+
}
|
262 |
+
|
263 |
+
public function front_scripts()
|
264 |
+
{
|
265 |
+
wp_enqueue_script('cht_widget_scripts', plugins_url('../assets/js/cht-scripts-front.min.js', __FILE__), array('jquery'));
|
266 |
+
// wp_enqueue_script('cht_widget_server_scripts', plugins_url('../assets/js/server.js', __FILE__), array('jquery'));
|
267 |
+
|
268 |
+
}
|
269 |
+
|
270 |
+
public function int_arr()
|
271 |
+
{
|
272 |
+
|
273 |
+
$social = get_option('cht_numb_slug');
|
274 |
+
$social = explode(",", $social);
|
275 |
+
|
276 |
+
$arr = array();
|
277 |
+
foreach ($social as $key_soc):
|
278 |
+
foreach ($this->socials as $key => $social) :
|
279 |
+
if ($social['slug'] != $key_soc) {
|
280 |
+
continue;
|
281 |
+
}
|
282 |
+
if ($value = get_option('cht_social_' . $social['slug'])) {
|
283 |
+
if (!empty($value['value']) && (wp_is_mobile() ? isset($value['is_mobile']) : isset($value['is_desktop']))) {
|
284 |
+
if($social['slug'] == "Viber") {
|
285 |
+
$val = $value['value'];
|
286 |
+
$fc = substr($val, 0, 1);
|
287 |
+
if ($fc == "+") {
|
288 |
+
$length = -1 * (strlen($val) - 1);
|
289 |
+
$val = substr($val, $length);
|
290 |
+
}
|
291 |
+
if (!wp_is_mobile()) {
|
292 |
+
$val = "+" . $val;
|
293 |
+
}
|
294 |
+
$arr[mb_strtolower($social['slug'])] = $val;
|
295 |
+
} else if($social['slug'] == "Whatsapp") {
|
296 |
+
$val = $value['value'];
|
297 |
+
$val = str_replace("+","", $val);
|
298 |
+
$arr[mb_strtolower($social['slug'])] = $val;
|
299 |
+
} else if($social['slug'] == "Facebook_Messenger") {
|
300 |
+
$val = $value['value'];
|
301 |
+
$val = str_replace("facebook.com","m.me", $val);
|
302 |
+
$val = str_replace("www.","", $val);
|
303 |
+
$value['value'] = $val;
|
304 |
+
$arr[mb_strtolower($social['slug'])] = $value['value'];
|
305 |
+
} else {
|
306 |
+
$arr[mb_strtolower($social['slug'])] = $value['value'];
|
307 |
+
}
|
308 |
+
}
|
309 |
+
};
|
310 |
+
endforeach;
|
311 |
+
endforeach;
|
312 |
+
return $arr;
|
313 |
+
}
|
314 |
+
|
315 |
+
public function insert_widget()
|
316 |
+
{
|
317 |
+
if ($this->canInsertWidget()):
|
318 |
+
include_once CHT_DIR . '/views/widget.php';
|
319 |
+
endif;
|
320 |
+
}
|
321 |
+
|
322 |
+
private function canInsertWidget()
|
323 |
+
{
|
324 |
+
return get_option('cht_active') && $this->checkChannels();
|
325 |
+
}
|
326 |
+
|
327 |
+
private function checkChannels()
|
328 |
+
{
|
329 |
+
$social = explode(",", get_option('cht_numb_slug'));
|
330 |
+
$res = false;
|
331 |
+
foreach ($social as $name) {
|
332 |
+
$value = get_option('cht_social_' . strtolower($name));
|
333 |
+
$res = $res || !empty($value['value']) && (wp_is_mobile() ? isset($value['is_mobile']) : isset($value['is_desktop']));
|
334 |
+
}
|
335 |
+
return $res;
|
336 |
+
}
|
337 |
+
}
|
338 |
+
|
339 |
+
return new CHT_Frontend();
|
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
|
4 |
Requires at least: 3.1
|
5 |
Tested up to: 5.2
|
6 |
-
Stable tag: 2.
|
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.
|
@@ -139,6 +139,9 @@ Just follow our <a href="https://premio.io/wordpress-premio-pro-version-installa
|
|
139 |
|
140 |
== Changelog ==
|
141 |
|
|
|
|
|
|
|
142 |
= 2.0.9 =
|
143 |
* Typo fix
|
144 |
|
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.1
|
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.
|
139 |
|
140 |
== Changelog ==
|
141 |
|
142 |
+
= 2.1 =
|
143 |
+
* WeChat clarification
|
144 |
+
|
145 |
= 2.0.9 =
|
146 |
* Typo fix
|
147 |
|
views/parts/section1.php
CHANGED
@@ -1,522 +1,527 @@
|
|
1 |
-
<div class="preview-section-chaty">
|
2 |
-
<div class="preview" id="admin-preview">
|
3 |
-
<h2><?php _e('Preview', CHT_OPT); ?>:</h2>
|
4 |
-
|
5 |
-
<div class="page">
|
6 |
-
<div class="page-header">
|
7 |
-
<div class="circle"></div>
|
8 |
-
<div class="circle"></div>
|
9 |
-
<div class="circle"></div>
|
10 |
-
<svg width="33" height="38" viewBox="0 0 33 38" fill="none" xmlns="http://www.w3.org/2000/svg">
|
11 |
-
<g filter="url(#filter0_d)">
|
12 |
-
<ellipse cx="0.855225" cy="0.745508" rx="0.855225" ry="0.745508"
|
13 |
-
transform="translate(15.6492 13.0053) scale(1 -1)" fill="#828282"/>
|
14 |
-
</g>
|
15 |
-
<g filter="url(#filter1_d)">
|
16 |
-
<ellipse cx="0.855225" cy="0.745508" rx="0.855225" ry="0.745508"
|
17 |
-
transform="translate(15.6492 15.6891) scale(1 -1)" fill="#828282"/>
|
18 |
-
</g>
|
19 |
-
<g filter="url(#filter2_d)">
|
20 |
-
<ellipse cx="0.855225" cy="0.745508" rx="0.855225" ry="0.745508"
|
21 |
-
transform="translate(15.6492 18.373) scale(1 -1)" fill="#828282"/>
|
22 |
-
</g>
|
23 |
-
<defs>
|
24 |
-
<filter id="filter0_d" x="0.64917" y="0.514328" width="31.7105" height="31.491"
|
25 |
-
filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
26 |
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
27 |
-
<feColorMatrix in="SourceAlpha" type="matrix"
|
28 |
-
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
|
29 |
-
<feOffset dy="4"/>
|
30 |
-
<feGaussianBlur stdDeviation="7.5"/>
|
31 |
-
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
32 |
-
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
33 |
-
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
34 |
-
</filter>
|
35 |
-
<filter id="filter1_d" x="0.64917" y="3.1981" width="31.7105" height="31.491"
|
36 |
-
filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
37 |
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
38 |
-
<feColorMatrix in="SourceAlpha" type="matrix"
|
39 |
-
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
|
40 |
-
<feOffset dy="4"/>
|
41 |
-
<feGaussianBlur stdDeviation="7.5"/>
|
42 |
-
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
43 |
-
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
44 |
-
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
45 |
-
</filter>
|
46 |
-
<filter id="filter2_d" x="0.64917" y="5.88202" width="31.7105" height="31.491"
|
47 |
-
filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
48 |
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
49 |
-
<feColorMatrix in="SourceAlpha" type="matrix"
|
50 |
-
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
|
51 |
-
<feOffset dy="4"/>
|
52 |
-
<feGaussianBlur stdDeviation="7.5"/>
|
53 |
-
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
54 |
-
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
55 |
-
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
56 |
-
</filter>
|
57 |
-
</defs>
|
58 |
-
</svg>
|
59 |
-
</div>
|
60 |
-
|
61 |
-
|
62 |
-
<?php $position = $this->get_position_style(); ?>
|
63 |
-
<div class="page-body">
|
64 |
-
<div class="chaty-widget chaty-widget-icons-<?php if (get_option('cht_position') == "custom") {
|
65 |
-
echo get_option('positionSide');
|
66 |
-
} else {
|
67 |
-
echo get_option('cht_position');
|
68 |
-
} ?> " style="<?php echo $position; ?>">
|
69 |
-
<div class="icon icon-xs active tooltip-show tooltip"
|
70 |
-
data-title="<?php echo(get_option('cht_cta') ? get_option('cht_cta') : __('Contact Us')) ?>">
|
71 |
-
<i id="iconWidget">
|
72 |
-
<?php $bg_color = $this->get_current_color(); ?>
|
73 |
-
<?php $widgetIcon = esc_attr(get_option('widget_icon')); ?>
|
74 |
-
<?php if (esc_attr(get_option('widget_icon')) == 'chat-base'): ?>
|
75 |
-
<svg version="1.1" id="ch" xmlns="http://www.w3.org/2000/svg"
|
76 |
-
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54"
|
77 |
-
style="enable-background:new -496 507.7 54 54;" xml:space="preserve">
|
78 |
-
<style type="text/css">.st1 {
|
79 |
-
fill: #FFFFFF;
|
80 |
-
}
|
81 |
-
|
82 |
-
.st0 {
|
83 |
-
fill: #808080;
|
84 |
-
}</style>
|
85 |
-
<g>
|
86 |
-
<circle cx="-469" cy="534.7" r="27"
|
87 |
-
fill="<?php echo ($bg_color) ? $bg_color : '#A886CD'; ?>"/>
|
88 |
-
</g>
|
89 |
-
<path class="st1"
|
90 |
-
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"/>
|
91 |
-
<path class="st0"
|
92 |
-
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"/>
|
93 |
-
<path class="st0"
|
94 |
-
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"/>
|
95 |
-
</svg>
|
96 |
-
<?php endif; ?>
|
97 |
-
<?php if (esc_attr(get_option('widget_icon')) == 'chat-smile'): ?>
|
98 |
-
<svg version="1.1" id="smile" xmlns="http://www.w3.org/2000/svg"
|
99 |
-
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496.8 507.1 54 54"
|
100 |
-
style="enable-background:new -496.8 507.1 54 54;" xml:space="preserve">
|
101 |
-
<style type="text/css">.st1 {
|
102 |
-
fill: #FFFFFF;
|
103 |
-
}
|
104 |
-
|
105 |
-
.st2 {
|
106 |
-
fill: none;
|
107 |
-
stroke: #808080;
|
108 |
-
stroke-width: 1.5;
|
109 |
-
stroke-linecap: round;
|
110 |
-
stroke-linejoin: round;
|
111 |
-
}</style>
|
112 |
-
<g>
|
113 |
-
<circle cx="-469.8" cy="534.1" r="27"
|
114 |
-
fill="<?php echo ($bg_color) ? $bg_color : '#A886CD'; ?>"/>
|
115 |
-
</g>
|
116 |
-
<path class="st1"
|
117 |
-
d="M-459.5,523.5H-482c-2.1,0-3.7,1.7-3.7,3.7v13.1c0,2.1,1.7,3.7,3.7,3.7h19.3l5.4,5.4c0.2,0.2,0.4,0.2,0.7,0.2 c0.2,0,0.2,0,0.4,0c0.4-0.2,0.6-0.6,0.6-0.9v-21.5C-455.8,525.2-457.5,523.5-459.5,523.5z"/>
|
118 |
-
<path class="st2" d="M-476.5,537.3c2.5,1.1,8.5,2.1,13-2.7"/>
|
119 |
-
<path class="st2" d="M-460.8,534.5c-0.1-1.2-0.8-3.4-3.3-2.8"/>
|
120 |
-
</svg>
|
121 |
-
<?php endif; ?>
|
122 |
-
<?php if (esc_attr(get_option('widget_icon')) == 'chat-bubble'): ?>
|
123 |
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
|
124 |
-
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496.9 507.1 54 54"
|
125 |
-
style="enable-background:new -496.9 507.1 54 54;" xml:space="preserve">
|
126 |
-
<style type="text/css">.st1 {
|
127 |
-
fill: #FFFFFF;
|
128 |
-
}</style>
|
129 |
-
<g>
|
130 |
-
<circle cx="-469.9" cy="534.1" r="27"
|
131 |
-
fill="<?php echo ($bg_color) ? $bg_color : '#A886CD'; ?>"/>
|
132 |
-
</g>
|
133 |
-
<path class="st1" d="M-472.6,522.1h5.3c3,0,6,1.2,8.1,3.4c2.1,2.1,3.4,5.1,3.4,8.1c0,6-4.6,11-10.6,11.5v4.4c0,0.4-0.2,0.7-0.5,0.9
|
134 |
-
c-0.2,0-0.2,0-0.4,0c-0.2,0-0.5-0.2-0.7-0.4l-4.6-5c-3,0-6-1.2-8.1-3.4s-3.4-5.1-3.4-8.1C-484.1,527.2-478.9,522.1-472.6,522.1z
|
135 |
-
M-462.9,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-464.6,534.6-463.9,535.3-462.9,535.3z
|
136 |
-
M-469.9,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-471.7,534.6-471,535.3-469.9,535.3z
|
137 |
-
M-477,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-478.8,534.6-478.1,535.3-477,535.3z"/>
|
138 |
-
</svg>
|
139 |
-
|
140 |
-
<?php endif; ?>
|
141 |
-
|
142 |
-
<?php if (esc_attr(get_option('widget_icon')) == 'chat-db'): ?>
|
143 |
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
|
144 |
-
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.1 54 54"
|
145 |
-
style="enable-background:new -496 507.1 54 54;" xml:space="preserve">
|
146 |
-
<style type="text/css">.st1 {
|
147 |
-
fill: #FFFFFF;
|
148 |
-
}</style>
|
149 |
-
<g>
|
150 |
-
<circle cx="-469" cy="534.1" r="27"
|
151 |
-
fill="<?php echo ($bg_color) ? $bg_color : '#A886CD'; ?>"/>
|
152 |
-
</g>
|
153 |
-
<path class="st1" d="M-464.6,527.7h-15.6c-1.9,0-3.5,1.6-3.5,3.5v10.4c0,1.9,1.6,3.5,3.5,3.5h12.6l5,5c0.2,0.2,0.3,0.2,0.7,0.2
|
154 |
-
c0.2,0,0.2,0,0.3,0c0.3-0.2,0.5-0.5,0.5-0.9v-18.2C-461.1,529.3-462.7,527.7-464.6,527.7z"/>
|
155 |
-
<path class="st1" d="M-459.4,522.5H-475c-1.9,0-3.5,1.6-3.5,3.5h13.9c2.9,0,5.2,2.3,5.2,5.2v11.6l1.9,1.9c0.2,0.2,0.3,0.2,0.7,0.2
|
156 |
-
c0.2,0,0.2,0,0.3,0c0.3-0.2,0.5-0.5,0.5-0.9v-18C-455.9,524.1-457.5,522.5-459.4,522.5z"/>
|
157 |
-
</svg>
|
158 |
-
<?php endif; ?>
|
159 |
-
|
160 |
-
<?php if (esc_attr(get_option('widget_icon')) == 'chat-image'): ?>
|
161 |
-
<img src="<?php echo $this->getCustomWidgetImg(); ?>"/>
|
162 |
-
<?php else: ?>
|
163 |
-
<style type="text/css">.st1 {fill: #FFFFFF;}.st0{fill: #a886cd;}</style>
|
164 |
-
<g><circle cx="-469" cy="534.7" r="27" fill="<?php echo ($bg_color) ? $bg_color : '#A886CD'; ?>"/></g>
|
165 |
-
<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"/>
|
166 |
-
<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"/>
|
167 |
-
<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"/>
|
168 |
-
</svg>
|
169 |
-
<?php endif; ?>
|
170 |
-
|
171 |
-
</i>
|
172 |
-
<span class="tooltiptext" style='<?php if (get_option('cht_cta') == "") {
|
173 |
-
echo 'display:none';
|
174 |
-
} ?>'><?php $cta = nl2br(get_option('cht_cta'));
|
175 |
-
echo str_replace(array("\r", "\n"), "", $cta); ?></span>
|
176 |
-
</div>
|
177 |
-
|
178 |
-
</div>
|
179 |
-
</div>
|
180 |
-
</div>
|
181 |
-
<div class="switch-preview">
|
182 |
-
<input data-gramm_editor="false" type="radio" id="previewDesktop" name="switchPreview"
|
183 |
-
class="js-switch-preview switch-preview__input" checked="checked">
|
184 |
-
<label for="previewDesktop" class="switch-preview__label switch-preview__desktop">
|
185 |
-
<?php _e('Desktop', CHT_OPT); ?>
|
186 |
-
</label>
|
187 |
-
<input data-gramm_editor="false" type="radio" id="previewMobile" name="switchPreview"
|
188 |
-
class="js-switch-preview switch-preview__input">
|
189 |
-
<label for="previewMobile" class="switch-preview__label switch-preview__mobile">
|
190 |
-
<?php _e('Mobile', CHT_OPT); ?>
|
191 |
-
</label>
|
192 |
-
</div>
|
193 |
-
</div>
|
194 |
-
</div>
|
195 |
-
<section class="section one" <?php echo ($this->is_pro()) ? 'id="pro"' : ''; ?> xmlns="http://www.w3.org/1999/html">
|
196 |
-
|
197 |
-
<h1 class="section-title">
|
198 |
-
<strong><?php _e('Step', CHT_OPT); ?> 1:</strong> <?php _e('Choose your channels', CHT_OPT); ?>
|
199 |
-
</h1>
|
200 |
-
<?php $social_app = get_option('cht_numb_slug'); ?>
|
201 |
-
<?php $social_app = explode(",", $social_app); ?>
|
202 |
-
<?php $social_app = array_unique($social_app); ?>
|
203 |
-
|
204 |
-
<div class="channels-icons">
|
205 |
-
<?php if ($this->socials) : ?>
|
206 |
-
<?php foreach ($this->socials as $key => $social) : ?>
|
207 |
-
<?php $value = get_option('cht_social_' . $social['slug']); ?>
|
208 |
-
<div class="icon icon-sm
|
209 |
-
<?php foreach ($social_app as $key_soc): ?>
|
210 |
-
<?php if ($key_soc == $social['slug']) { ?>
|
211 |
-
active
|
212 |
-
<?php } ?>
|
213 |
-
<?php endforeach; ?>"
|
214 |
-
data-social="<?php echo esc_attr($social['slug']); ?>"
|
215 |
-
data-title="<?php echo strtolower(esc_attr($this->del_space($social['slug']))); ?>">
|
216 |
-
<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
|
217 |
-
<?php echo $social['svg']; ?>
|
218 |
-
</svg>
|
219 |
-
</div>
|
220 |
-
<?php echo ($key === 7) ? '<div class="col-12"></div>' : ''; ?>
|
221 |
-
<?php endforeach; ?>
|
222 |
-
<?php endif; ?>
|
223 |
-
</div>
|
224 |
-
<div class="popover" >
|
225 |
-
<a href="<?php echo $this->getUpgradeMenuItemUrl(); ?>">
|
226 |
-
<?php _e('Get unlimited channels in the Pro plan', CHT_OPT); ?>
|
227 |
-
<strong><?php _e('Upgrade Now', CHT_OPT); ?></strong>
|
228 |
-
</a>
|
229 |
-
</div>
|
230 |
-
<input data-gramm_editor="false" type="text" class="add_slug"
|
231 |
-
name="cht_numb_slug"
|
232 |
-
placeholder="test"
|
233 |
-
value="<?php echo esc_attr(get_option('cht_numb_slug')); ?>"
|
234 |
-
id="cht_numb_slug"
|
235 |
-
hidden>
|
236 |
-
|
237 |
-
<div class="channels-selected" id="channels-selected-list">
|
238 |
-
<ul id="channels-selected-list" class="channels-selected-list channels-selected">
|
239 |
-
<?php if ($this->socials) :
|
240 |
-
$social = get_option('cht_numb_slug'); ?>
|
241 |
-
<?php $social = explode(",", $social); ?>
|
242 |
-
<?php $social = array_unique($social); ?>
|
243 |
-
<?php foreach ($social as $key_soc): ?>
|
244 |
-
<?php foreach ($this->socials as $key => $social) : ?>
|
245 |
-
<?php if ($social['slug'] != $key_soc) {
|
246 |
-
continue;
|
247 |
-
} ?>
|
248 |
-
<?php $value = get_option('cht_social_' . $social['slug']) ?>
|
249 |
-
<?php
|
250 |
-
if (empty($value)) {
|
251 |
-
$value = [
|
252 |
-
'value' => '',
|
253 |
-
'is_mobile' => 'checked',
|
254 |
-
'is_desktop' => 'checked'
|
255 |
-
];
|
256 |
-
}
|
257 |
-
$value['title'] = $social['title'];
|
258 |
-
$status = 0;
|
259 |
-
if($social['slug'] == "Whatsapp"){
|
260 |
-
$val = $value['value'];
|
261 |
-
$val = str_replace("+","", $val);
|
262 |
-
$value['value'] = $val;
|
263 |
-
} else if($social['slug'] == "Facebook_Messenger"){
|
264 |
-
$val = $value['value'];
|
265 |
-
$val = str_replace("facebook.com","m.me", $val);
|
266 |
-
$val = str_replace("www.","", $val);
|
267 |
-
$value['value'] = $val;
|
268 |
-
}
|
269 |
-
?>
|
270 |
-
<li data-id="<?php echo $social['slug'] ?>" id="chaty-social-<?php echo $social['slug'] ?>">
|
271 |
-
<div class="channels-selected__item <?php echo ($status)?"img-active":"" ?> <?php echo ($this->is_pro()) ? 'pro' : 'free'; ?> 1 available">
|
272 |
-
<div class="chaty-default-settings">
|
273 |
-
<div class="move-icon">
|
274 |
-
<img src="<?php echo plugin_dir_url("") ?>/chaty/assets/images/move-icon.png">
|
275 |
-
</div>
|
276 |
-
<div class="icon icon-md active" data-title="<?php echo $social['title']; ?>">
|
277 |
-
<span class="default-chaty-icon custom-icon-<?php echo $social['slug'] ?> default_image_<?php echo $social['slug'] ?>" >
|
278 |
-
<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
|
279 |
-
<?php echo $social['svg']; ?>
|
280 |
-
</svg>
|
281 |
-
</span>
|
282 |
-
</div>
|
283 |
-
<div class="channels__input-box">
|
284 |
-
<input type="text"
|
285 |
-
class="channels__input"
|
286 |
-
name="cht_social_<?php echo esc_attr($social['slug']); ?>[value]"
|
287 |
-
value="<?php echo esc_attr($value['value']); ?>"
|
288 |
-
data-gramm_editor="false"
|
289 |
-
id="<?php echo esc_attr($social['slug']); ?>"
|
290 |
-
>
|
291 |
-
</div>
|
292 |
-
<div>
|
293 |
-
<label class="channels__view"
|
294 |
-
for="<?php echo str_replace(' ', '_', esc_attr($this->del_space($social['slug']))); ?>Desktop">
|
295 |
-
<input type="checkbox"
|
296 |
-
id="<?php echo str_replace(' ', '_', esc_attr($this->del_space($social['slug']))); ?>Desktop"
|
297 |
-
class="channels__view-check js-chanel-icon js-chanel-desktop"
|
298 |
-
data-type="<?php echo str_replace(' ', '_', strtolower(esc_attr($this->del_space($social['slug'])))); ?>"
|
299 |
-
name="cht_social_<?php echo esc_attr($social['slug']); ?>[is_desktop]"
|
300 |
-
value="checked"
|
301 |
-
data-gramm_editor="false"
|
302 |
-
<?php echo isset($value['is_desktop']) ? $value['is_desktop'] : ''; ?>
|
303 |
-
>
|
304 |
-
<span class="channels__view-txt">Desktop</label>
|
305 |
-
</label>
|
306 |
-
<label class="channels__view"
|
307 |
-
for="<?php echo str_replace(' ', '_', esc_attr($this->del_space($social['slug']))); ?>Mobile">
|
308 |
-
<input type="checkbox"
|
309 |
-
id="<?php echo str_replace(' ', '_', esc_attr($this->del_space($social['slug']))); ?>Mobile"
|
310 |
-
class="channels__view-check js-chanel-icon js-chanel-mobile"
|
311 |
-
data-type="<?php echo str_replace(' ', '_', strtolower(esc_attr($this->del_space($social['slug'])))); ?>"
|
312 |
-
name="cht_social_<?php echo esc_attr($social['slug']); ?>[is_mobile]"
|
313 |
-
value="checked"
|
314 |
-
data-gramm_editor="false"
|
315 |
-
<?php echo isset($value['is_mobile']) ? $value['is_mobile'] : ''; ?>
|
316 |
-
>
|
317 |
-
<span class="channels__view-txt">Mobile</span>
|
318 |
-
</label>
|
319 |
-
</div>
|
320 |
-
<div class="chaty-settings" onclick="toggle_chaty_setting('<?php echo esc_attr($social['slug']); ?>')">
|
321 |
-
<a href="javascript:;"><span class="dashicons dashicons-admin-generic"></span></a>
|
322 |
-
</div>
|
323 |
-
<div class="input-example">
|
324 |
-
<?php _e('For example', CHT_OPT); ?>: <?php echo $social['example']; ?>
|
325 |
-
</div>
|
326 |
-
<?php if($social['slug'] == "Viber") { ?>
|
327 |
-
<div class="viber-help">
|
328 |
-
<span>Try to remove the "+" and your country code</span>
|
329 |
-
Doesn't work?
|
330 |
-
</div>
|
331 |
-
<?php } else if($social['slug'] == "Facebook_Messenger") { ?>
|
332 |
-
<div class="viber-help">
|
333 |
-
<span>Your Facebook page has to be available to all ages and countries (check your page's settings)</span>
|
334 |
-
Doesn't work?
|
335 |
-
</div>
|
336 |
-
<?php } ?>
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
</
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
</
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
<
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
<a
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
<
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
<
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
<
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
</
|
522 |
-
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="preview-section-chaty">
|
2 |
+
<div class="preview" id="admin-preview">
|
3 |
+
<h2><?php _e('Preview', CHT_OPT); ?>:</h2>
|
4 |
+
|
5 |
+
<div class="page">
|
6 |
+
<div class="page-header">
|
7 |
+
<div class="circle"></div>
|
8 |
+
<div class="circle"></div>
|
9 |
+
<div class="circle"></div>
|
10 |
+
<svg width="33" height="38" viewBox="0 0 33 38" fill="none" xmlns="http://www.w3.org/2000/svg">
|
11 |
+
<g filter="url(#filter0_d)">
|
12 |
+
<ellipse cx="0.855225" cy="0.745508" rx="0.855225" ry="0.745508"
|
13 |
+
transform="translate(15.6492 13.0053) scale(1 -1)" fill="#828282"/>
|
14 |
+
</g>
|
15 |
+
<g filter="url(#filter1_d)">
|
16 |
+
<ellipse cx="0.855225" cy="0.745508" rx="0.855225" ry="0.745508"
|
17 |
+
transform="translate(15.6492 15.6891) scale(1 -1)" fill="#828282"/>
|
18 |
+
</g>
|
19 |
+
<g filter="url(#filter2_d)">
|
20 |
+
<ellipse cx="0.855225" cy="0.745508" rx="0.855225" ry="0.745508"
|
21 |
+
transform="translate(15.6492 18.373) scale(1 -1)" fill="#828282"/>
|
22 |
+
</g>
|
23 |
+
<defs>
|
24 |
+
<filter id="filter0_d" x="0.64917" y="0.514328" width="31.7105" height="31.491"
|
25 |
+
filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
26 |
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
27 |
+
<feColorMatrix in="SourceAlpha" type="matrix"
|
28 |
+
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
|
29 |
+
<feOffset dy="4"/>
|
30 |
+
<feGaussianBlur stdDeviation="7.5"/>
|
31 |
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
32 |
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
33 |
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
34 |
+
</filter>
|
35 |
+
<filter id="filter1_d" x="0.64917" y="3.1981" width="31.7105" height="31.491"
|
36 |
+
filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
37 |
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
38 |
+
<feColorMatrix in="SourceAlpha" type="matrix"
|
39 |
+
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
|
40 |
+
<feOffset dy="4"/>
|
41 |
+
<feGaussianBlur stdDeviation="7.5"/>
|
42 |
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
43 |
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
44 |
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
45 |
+
</filter>
|
46 |
+
<filter id="filter2_d" x="0.64917" y="5.88202" width="31.7105" height="31.491"
|
47 |
+
filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
48 |
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
49 |
+
<feColorMatrix in="SourceAlpha" type="matrix"
|
50 |
+
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
|
51 |
+
<feOffset dy="4"/>
|
52 |
+
<feGaussianBlur stdDeviation="7.5"/>
|
53 |
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
54 |
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
55 |
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
56 |
+
</filter>
|
57 |
+
</defs>
|
58 |
+
</svg>
|
59 |
+
</div>
|
60 |
+
|
61 |
+
|
62 |
+
<?php $position = $this->get_position_style(); ?>
|
63 |
+
<div class="page-body">
|
64 |
+
<div class="chaty-widget chaty-widget-icons-<?php if (get_option('cht_position') == "custom") {
|
65 |
+
echo get_option('positionSide');
|
66 |
+
} else {
|
67 |
+
echo get_option('cht_position');
|
68 |
+
} ?> " style="<?php echo $position; ?>">
|
69 |
+
<div class="icon icon-xs active tooltip-show tooltip"
|
70 |
+
data-title="<?php echo(get_option('cht_cta') ? get_option('cht_cta') : __('Contact Us')) ?>">
|
71 |
+
<i id="iconWidget">
|
72 |
+
<?php $bg_color = $this->get_current_color(); ?>
|
73 |
+
<?php $widgetIcon = esc_attr(get_option('widget_icon')); ?>
|
74 |
+
<?php if (esc_attr(get_option('widget_icon')) == 'chat-base'): ?>
|
75 |
+
<svg version="1.1" id="ch" xmlns="http://www.w3.org/2000/svg"
|
76 |
+
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54"
|
77 |
+
style="enable-background:new -496 507.7 54 54;" xml:space="preserve">
|
78 |
+
<style type="text/css">.st1 {
|
79 |
+
fill: #FFFFFF;
|
80 |
+
}
|
81 |
+
|
82 |
+
.st0 {
|
83 |
+
fill: #808080;
|
84 |
+
}</style>
|
85 |
+
<g>
|
86 |
+
<circle cx="-469" cy="534.7" r="27"
|
87 |
+
fill="<?php echo ($bg_color) ? $bg_color : '#A886CD'; ?>"/>
|
88 |
+
</g>
|
89 |
+
<path class="st1"
|
90 |
+
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"/>
|
91 |
+
<path class="st0"
|
92 |
+
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"/>
|
93 |
+
<path class="st0"
|
94 |
+
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"/>
|
95 |
+
</svg>
|
96 |
+
<?php endif; ?>
|
97 |
+
<?php if (esc_attr(get_option('widget_icon')) == 'chat-smile'): ?>
|
98 |
+
<svg version="1.1" id="smile" xmlns="http://www.w3.org/2000/svg"
|
99 |
+
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496.8 507.1 54 54"
|
100 |
+
style="enable-background:new -496.8 507.1 54 54;" xml:space="preserve">
|
101 |
+
<style type="text/css">.st1 {
|
102 |
+
fill: #FFFFFF;
|
103 |
+
}
|
104 |
+
|
105 |
+
.st2 {
|
106 |
+
fill: none;
|
107 |
+
stroke: #808080;
|
108 |
+
stroke-width: 1.5;
|
109 |
+
stroke-linecap: round;
|
110 |
+
stroke-linejoin: round;
|
111 |
+
}</style>
|
112 |
+
<g>
|
113 |
+
<circle cx="-469.8" cy="534.1" r="27"
|
114 |
+
fill="<?php echo ($bg_color) ? $bg_color : '#A886CD'; ?>"/>
|
115 |
+
</g>
|
116 |
+
<path class="st1"
|
117 |
+
d="M-459.5,523.5H-482c-2.1,0-3.7,1.7-3.7,3.7v13.1c0,2.1,1.7,3.7,3.7,3.7h19.3l5.4,5.4c0.2,0.2,0.4,0.2,0.7,0.2 c0.2,0,0.2,0,0.4,0c0.4-0.2,0.6-0.6,0.6-0.9v-21.5C-455.8,525.2-457.5,523.5-459.5,523.5z"/>
|
118 |
+
<path class="st2" d="M-476.5,537.3c2.5,1.1,8.5,2.1,13-2.7"/>
|
119 |
+
<path class="st2" d="M-460.8,534.5c-0.1-1.2-0.8-3.4-3.3-2.8"/>
|
120 |
+
</svg>
|
121 |
+
<?php endif; ?>
|
122 |
+
<?php if (esc_attr(get_option('widget_icon')) == 'chat-bubble'): ?>
|
123 |
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
|
124 |
+
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496.9 507.1 54 54"
|
125 |
+
style="enable-background:new -496.9 507.1 54 54;" xml:space="preserve">
|
126 |
+
<style type="text/css">.st1 {
|
127 |
+
fill: #FFFFFF;
|
128 |
+
}</style>
|
129 |
+
<g>
|
130 |
+
<circle cx="-469.9" cy="534.1" r="27"
|
131 |
+
fill="<?php echo ($bg_color) ? $bg_color : '#A886CD'; ?>"/>
|
132 |
+
</g>
|
133 |
+
<path class="st1" d="M-472.6,522.1h5.3c3,0,6,1.2,8.1,3.4c2.1,2.1,3.4,5.1,3.4,8.1c0,6-4.6,11-10.6,11.5v4.4c0,0.4-0.2,0.7-0.5,0.9
|
134 |
+
c-0.2,0-0.2,0-0.4,0c-0.2,0-0.5-0.2-0.7-0.4l-4.6-5c-3,0-6-1.2-8.1-3.4s-3.4-5.1-3.4-8.1C-484.1,527.2-478.9,522.1-472.6,522.1z
|
135 |
+
M-462.9,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-464.6,534.6-463.9,535.3-462.9,535.3z
|
136 |
+
M-469.9,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-471.7,534.6-471,535.3-469.9,535.3z
|
137 |
+
M-477,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-478.8,534.6-478.1,535.3-477,535.3z"/>
|
138 |
+
</svg>
|
139 |
+
|
140 |
+
<?php endif; ?>
|
141 |
+
|
142 |
+
<?php if (esc_attr(get_option('widget_icon')) == 'chat-db'): ?>
|
143 |
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
|
144 |
+
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.1 54 54"
|
145 |
+
style="enable-background:new -496 507.1 54 54;" xml:space="preserve">
|
146 |
+
<style type="text/css">.st1 {
|
147 |
+
fill: #FFFFFF;
|
148 |
+
}</style>
|
149 |
+
<g>
|
150 |
+
<circle cx="-469" cy="534.1" r="27"
|
151 |
+
fill="<?php echo ($bg_color) ? $bg_color : '#A886CD'; ?>"/>
|
152 |
+
</g>
|
153 |
+
<path class="st1" d="M-464.6,527.7h-15.6c-1.9,0-3.5,1.6-3.5,3.5v10.4c0,1.9,1.6,3.5,3.5,3.5h12.6l5,5c0.2,0.2,0.3,0.2,0.7,0.2
|
154 |
+
c0.2,0,0.2,0,0.3,0c0.3-0.2,0.5-0.5,0.5-0.9v-18.2C-461.1,529.3-462.7,527.7-464.6,527.7z"/>
|
155 |
+
<path class="st1" d="M-459.4,522.5H-475c-1.9,0-3.5,1.6-3.5,3.5h13.9c2.9,0,5.2,2.3,5.2,5.2v11.6l1.9,1.9c0.2,0.2,0.3,0.2,0.7,0.2
|
156 |
+
c0.2,0,0.2,0,0.3,0c0.3-0.2,0.5-0.5,0.5-0.9v-18C-455.9,524.1-457.5,522.5-459.4,522.5z"/>
|
157 |
+
</svg>
|
158 |
+
<?php endif; ?>
|
159 |
+
|
160 |
+
<?php if (esc_attr(get_option('widget_icon')) == 'chat-image'): ?>
|
161 |
+
<img src="<?php echo $this->getCustomWidgetImg(); ?>"/>
|
162 |
+
<?php else: ?>
|
163 |
+
<style type="text/css">.st1 {fill: #FFFFFF;}.st0{fill: #a886cd;}</style>
|
164 |
+
<g><circle cx="-469" cy="534.7" r="27" fill="<?php echo ($bg_color) ? $bg_color : '#A886CD'; ?>"/></g>
|
165 |
+
<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"/>
|
166 |
+
<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"/>
|
167 |
+
<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"/>
|
168 |
+
</svg>
|
169 |
+
<?php endif; ?>
|
170 |
+
|
171 |
+
</i>
|
172 |
+
<span class="tooltiptext" style='<?php if (get_option('cht_cta') == "") {
|
173 |
+
echo 'display:none';
|
174 |
+
} ?>'><?php $cta = nl2br(get_option('cht_cta'));
|
175 |
+
echo str_replace(array("\r", "\n"), "", $cta); ?></span>
|
176 |
+
</div>
|
177 |
+
|
178 |
+
</div>
|
179 |
+
</div>
|
180 |
+
</div>
|
181 |
+
<div class="switch-preview">
|
182 |
+
<input data-gramm_editor="false" type="radio" id="previewDesktop" name="switchPreview"
|
183 |
+
class="js-switch-preview switch-preview__input" checked="checked">
|
184 |
+
<label for="previewDesktop" class="switch-preview__label switch-preview__desktop">
|
185 |
+
<?php _e('Desktop', CHT_OPT); ?>
|
186 |
+
</label>
|
187 |
+
<input data-gramm_editor="false" type="radio" id="previewMobile" name="switchPreview"
|
188 |
+
class="js-switch-preview switch-preview__input">
|
189 |
+
<label for="previewMobile" class="switch-preview__label switch-preview__mobile">
|
190 |
+
<?php _e('Mobile', CHT_OPT); ?>
|
191 |
+
</label>
|
192 |
+
</div>
|
193 |
+
</div>
|
194 |
+
</div>
|
195 |
+
<section class="section one" <?php echo ($this->is_pro()) ? 'id="pro"' : ''; ?> xmlns="http://www.w3.org/1999/html">
|
196 |
+
|
197 |
+
<h1 class="section-title">
|
198 |
+
<strong><?php _e('Step', CHT_OPT); ?> 1:</strong> <?php _e('Choose your channels', CHT_OPT); ?>
|
199 |
+
</h1>
|
200 |
+
<?php $social_app = get_option('cht_numb_slug'); ?>
|
201 |
+
<?php $social_app = explode(",", $social_app); ?>
|
202 |
+
<?php $social_app = array_unique($social_app); ?>
|
203 |
+
|
204 |
+
<div class="channels-icons">
|
205 |
+
<?php if ($this->socials) : ?>
|
206 |
+
<?php foreach ($this->socials as $key => $social) : ?>
|
207 |
+
<?php $value = get_option('cht_social_' . $social['slug']); ?>
|
208 |
+
<div class="icon icon-sm
|
209 |
+
<?php foreach ($social_app as $key_soc): ?>
|
210 |
+
<?php if ($key_soc == $social['slug']) { ?>
|
211 |
+
active
|
212 |
+
<?php } ?>
|
213 |
+
<?php endforeach; ?>"
|
214 |
+
data-social="<?php echo esc_attr($social['slug']); ?>"
|
215 |
+
data-title="<?php echo strtolower(esc_attr($this->del_space($social['slug']))); ?>">
|
216 |
+
<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
|
217 |
+
<?php echo $social['svg']; ?>
|
218 |
+
</svg>
|
219 |
+
</div>
|
220 |
+
<?php echo ($key === 7) ? '<div class="col-12"></div>' : ''; ?>
|
221 |
+
<?php endforeach; ?>
|
222 |
+
<?php endif; ?>
|
223 |
+
</div>
|
224 |
+
<div class="popover" >
|
225 |
+
<a href="<?php echo $this->getUpgradeMenuItemUrl(); ?>">
|
226 |
+
<?php _e('Get unlimited channels in the Pro plan', CHT_OPT); ?>
|
227 |
+
<strong><?php _e('Upgrade Now', CHT_OPT); ?></strong>
|
228 |
+
</a>
|
229 |
+
</div>
|
230 |
+
<input data-gramm_editor="false" type="text" class="add_slug"
|
231 |
+
name="cht_numb_slug"
|
232 |
+
placeholder="test"
|
233 |
+
value="<?php echo esc_attr(get_option('cht_numb_slug')); ?>"
|
234 |
+
id="cht_numb_slug"
|
235 |
+
hidden>
|
236 |
+
|
237 |
+
<div class="channels-selected" id="channels-selected-list">
|
238 |
+
<ul id="channels-selected-list" class="channels-selected-list channels-selected">
|
239 |
+
<?php if ($this->socials) :
|
240 |
+
$social = get_option('cht_numb_slug'); ?>
|
241 |
+
<?php $social = explode(",", $social); ?>
|
242 |
+
<?php $social = array_unique($social); ?>
|
243 |
+
<?php foreach ($social as $key_soc): ?>
|
244 |
+
<?php foreach ($this->socials as $key => $social) : ?>
|
245 |
+
<?php if ($social['slug'] != $key_soc) {
|
246 |
+
continue;
|
247 |
+
} ?>
|
248 |
+
<?php $value = get_option('cht_social_' . $social['slug']) ?>
|
249 |
+
<?php
|
250 |
+
if (empty($value)) {
|
251 |
+
$value = [
|
252 |
+
'value' => '',
|
253 |
+
'is_mobile' => 'checked',
|
254 |
+
'is_desktop' => 'checked'
|
255 |
+
];
|
256 |
+
}
|
257 |
+
$value['title'] = $social['title'];
|
258 |
+
$status = 0;
|
259 |
+
if($social['slug'] == "Whatsapp"){
|
260 |
+
$val = $value['value'];
|
261 |
+
$val = str_replace("+","", $val);
|
262 |
+
$value['value'] = $val;
|
263 |
+
} else if($social['slug'] == "Facebook_Messenger"){
|
264 |
+
$val = $value['value'];
|
265 |
+
$val = str_replace("facebook.com","m.me", $val);
|
266 |
+
$val = str_replace("www.","", $val);
|
267 |
+
$value['value'] = $val;
|
268 |
+
}
|
269 |
+
?>
|
270 |
+
<li data-id="<?php echo $social['slug'] ?>" id="chaty-social-<?php echo $social['slug'] ?>">
|
271 |
+
<div class="channels-selected__item <?php echo ($status)?"img-active":"" ?> <?php echo ($this->is_pro()) ? 'pro' : 'free'; ?> 1 available">
|
272 |
+
<div class="chaty-default-settings">
|
273 |
+
<div class="move-icon">
|
274 |
+
<img src="<?php echo plugin_dir_url("") ?>/chaty/assets/images/move-icon.png">
|
275 |
+
</div>
|
276 |
+
<div class="icon icon-md active" data-title="<?php echo $social['title']; ?>">
|
277 |
+
<span class="default-chaty-icon custom-icon-<?php echo $social['slug'] ?> default_image_<?php echo $social['slug'] ?>" >
|
278 |
+
<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
|
279 |
+
<?php echo $social['svg']; ?>
|
280 |
+
</svg>
|
281 |
+
</span>
|
282 |
+
</div>
|
283 |
+
<div class="channels__input-box">
|
284 |
+
<input type="text"
|
285 |
+
class="channels__input"
|
286 |
+
name="cht_social_<?php echo esc_attr($social['slug']); ?>[value]"
|
287 |
+
value="<?php echo esc_attr($value['value']); ?>"
|
288 |
+
data-gramm_editor="false"
|
289 |
+
id="<?php echo esc_attr($social['slug']); ?>"
|
290 |
+
>
|
291 |
+
</div>
|
292 |
+
<div>
|
293 |
+
<label class="channels__view"
|
294 |
+
for="<?php echo str_replace(' ', '_', esc_attr($this->del_space($social['slug']))); ?>Desktop">
|
295 |
+
<input type="checkbox"
|
296 |
+
id="<?php echo str_replace(' ', '_', esc_attr($this->del_space($social['slug']))); ?>Desktop"
|
297 |
+
class="channels__view-check js-chanel-icon js-chanel-desktop"
|
298 |
+
data-type="<?php echo str_replace(' ', '_', strtolower(esc_attr($this->del_space($social['slug'])))); ?>"
|
299 |
+
name="cht_social_<?php echo esc_attr($social['slug']); ?>[is_desktop]"
|
300 |
+
value="checked"
|
301 |
+
data-gramm_editor="false"
|
302 |
+
<?php echo isset($value['is_desktop']) ? $value['is_desktop'] : ''; ?>
|
303 |
+
>
|
304 |
+
<span class="channels__view-txt">Desktop</label>
|
305 |
+
</label>
|
306 |
+
<label class="channels__view"
|
307 |
+
for="<?php echo str_replace(' ', '_', esc_attr($this->del_space($social['slug']))); ?>Mobile">
|
308 |
+
<input type="checkbox"
|
309 |
+
id="<?php echo str_replace(' ', '_', esc_attr($this->del_space($social['slug']))); ?>Mobile"
|
310 |
+
class="channels__view-check js-chanel-icon js-chanel-mobile"
|
311 |
+
data-type="<?php echo str_replace(' ', '_', strtolower(esc_attr($this->del_space($social['slug'])))); ?>"
|
312 |
+
name="cht_social_<?php echo esc_attr($social['slug']); ?>[is_mobile]"
|
313 |
+
value="checked"
|
314 |
+
data-gramm_editor="false"
|
315 |
+
<?php echo isset($value['is_mobile']) ? $value['is_mobile'] : ''; ?>
|
316 |
+
>
|
317 |
+
<span class="channels__view-txt">Mobile</span>
|
318 |
+
</label>
|
319 |
+
</div>
|
320 |
+
<div class="chaty-settings" onclick="toggle_chaty_setting('<?php echo esc_attr($social['slug']); ?>')">
|
321 |
+
<a href="javascript:;"><span class="dashicons dashicons-admin-generic"></span></a>
|
322 |
+
</div>
|
323 |
+
<div class="input-example">
|
324 |
+
<?php _e('For example', CHT_OPT); ?>: <?php echo $social['example']; ?>
|
325 |
+
</div>
|
326 |
+
<?php if($social['slug'] == "Viber") { ?>
|
327 |
+
<div class="viber-help">
|
328 |
+
<span>Try to remove the "+" and your country code</span>
|
329 |
+
Doesn't work?
|
330 |
+
</div>
|
331 |
+
<?php } else if($social['slug'] == "Facebook_Messenger") { ?>
|
332 |
+
<div class="viber-help">
|
333 |
+
<span>Your Facebook page has to be available to all ages and countries (check your page's settings)</span>
|
334 |
+
Doesn't work?
|
335 |
+
</div>
|
336 |
+
<?php } else if($social['slug'] == "WeChat") { ?>
|
337 |
+
<div class="viber-help">
|
338 |
+
<span>Unfortunately, WeChat doesn't have a click-to-chat API, therefore we can only show your username on-click so visitors can look-up for it. We have a QR upload option available in the pro plan.</span>
|
339 |
+
Doesn't work?
|
340 |
+
</div>
|
341 |
+
<?php } ?>
|
342 |
+
</div>
|
343 |
+
<div class="chaty-advance-settings">
|
344 |
+
<div class="chaty-setting-col">
|
345 |
+
<label>Icon Appearance</label>
|
346 |
+
<div>
|
347 |
+
<input readonly type="text" name="" class="chaty-color-field" value="" style="background-color: <?php echo $social['color'] ?>" />
|
348 |
+
<a href="javascript:;" class="upload-chaty-icon"><span class="dashicons dashicons-upload"></span> Custom Image</a>
|
349 |
+
</div>
|
350 |
+
</div>
|
351 |
+
<div class="clear clearfix"></div>
|
352 |
+
<div class="chaty-setting-col">
|
353 |
+
<label>On Hover Text</label>
|
354 |
+
<div>
|
355 |
+
<input readonly type="text" name="" value="<?php echo $value['title'] ?>">
|
356 |
+
</div>
|
357 |
+
</div>
|
358 |
+
<div class="clear clearfix"></div>
|
359 |
+
<?php if($social['slug'] == "Whatsapp") { ?>
|
360 |
+
<div class="clear clearfix"></div>
|
361 |
+
<div class="chaty-setting-col">
|
362 |
+
<label>Pre Set Message</label>
|
363 |
+
<div>
|
364 |
+
<input id="cht_social_message_<?php echo esc_attr($social['slug']); ?>" type="text" name="cht_social_<?php echo esc_attr($social['slug']); ?>[pre_set_message]" value="<?php echo isset($value['pre_set_message'])?$value['pre_set_message']:"" ?>" >
|
365 |
+
</div>
|
366 |
+
</div>
|
367 |
+
<?php } else if($social['slug'] == "Email") { ?>
|
368 |
+
<div class="clear clearfix"></div>
|
369 |
+
<div class="chaty-setting-col">
|
370 |
+
<label>Mail Subject</label>
|
371 |
+
<div>
|
372 |
+
<input id="cht_social_message_<?php echo esc_attr($social['slug']); ?>" type="text" name="" value="" >
|
373 |
+
</div>
|
374 |
+
</div>
|
375 |
+
<?php } else if($social['slug'] == "WeChat") { ?>
|
376 |
+
<div class="clear clearfix"></div>
|
377 |
+
<div class="chaty-setting-col">
|
378 |
+
<label>Upload QR Code</label>
|
379 |
+
<div>
|
380 |
+
<a class="cht-upload-image " id="upload_qr_code" href="javascript:;" >
|
381 |
+
<span class="dashicons dashicons-upload"></span>
|
382 |
+
</a>
|
383 |
+
</div>
|
384 |
+
</div>
|
385 |
+
<?php } ?>
|
386 |
+
<div class="chaty-pro-feature">
|
387 |
+
<a target="_blank" href="<?php echo $this->getUpgradeMenuItemUrl();?>">
|
388 |
+
<?php _e('Upgrade to Pro', CHT_OPT);?>
|
389 |
+
</a>
|
390 |
+
</div>
|
391 |
+
</div>
|
392 |
+
<button class="btn-cancel" data-social="<?php echo esc_attr($social['slug']); ?>">
|
393 |
+
<svg width="14" height="13" viewBox="0 0 14 13" fill="none"
|
394 |
+
xmlns="http://www.w3.org/2000/svg">
|
395 |
+
<rect width="15.6301" height="2.24494" rx="1.12247"
|
396 |
+
transform="translate(2.26764 0.0615997) rotate(45)" fill="white"/>
|
397 |
+
<rect width="15.6301" height="2.24494" rx="1.12247"
|
398 |
+
transform="translate(13.3198 1.649) rotate(135)" fill="white"/>
|
399 |
+
</svg>
|
400 |
+
</button>
|
401 |
+
</div>
|
402 |
+
</li>
|
403 |
+
<?php endforeach; ?>
|
404 |
+
<?php endforeach?>
|
405 |
+
<?php endif; ?>
|
406 |
+
<li class="chaty-cls-setting" data-id="" id="chaty-social-close">
|
407 |
+
<div class="channels-selected__item <?php echo ($this->is_pro()) ? 'pro' : 'free'; ?> 1 available">
|
408 |
+
<div class="chaty-default-settings">
|
409 |
+
<div class="move-icon">
|
410 |
+
<img src="<?php echo plugins_url() ?>/chaty/assets/images/move-icon.png" style="opacity:0"; />
|
411 |
+
</div>
|
412 |
+
<div class="icon icon-md active" data-title="close">
|
413 |
+
<span id="image_data_close">
|
414 |
+
<svg viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg"><ellipse cx="26" cy="26" rx="26" ry="26" fill="#A886CD"></ellipse><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"></rect><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"></rect></svg>
|
415 |
+
</span>
|
416 |
+
<span class="default_image_close" style="display: none;">
|
417 |
+
<svg viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg"><ellipse cx="26" cy="26" rx="26" ry="26" fill="#A886CD"></ellipse><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"></rect><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"></rect></svg>
|
418 |
+
</span>
|
419 |
+
</div>
|
420 |
+
<div class="channels__input-box cls-btn-settings">
|
421 |
+
<input type="text"
|
422 |
+
class="channels__input"
|
423 |
+
name=""
|
424 |
+
value="Hide"
|
425 |
+
data-gramm_editor="false"
|
426 |
+
readonly
|
427 |
+
>
|
428 |
+
<a target="_blank" href="<?php echo $this->getUpgradeMenuItemUrl();?>">
|
429 |
+
<?php _e('Upgrade to Pro', CHT_OPT);?>
|
430 |
+
</a>
|
431 |
+
</div>
|
432 |
+
<div class="chaty-settings cls-btn">
|
433 |
+
<a href="javascript:;"><span class="dashicons dashicons-admin-generic"></span></a>
|
434 |
+
</div>
|
435 |
+
<div class="input-example cls-btn-settings">
|
436 |
+
<?php _e('On hover Close button text', CHT_OPT); ?>
|
437 |
+
</div>
|
438 |
+
</div>
|
439 |
+
<button class="btn-cancel close-btn-set" data-social="<?php echo esc_attr($social['slug']); ?>">
|
440 |
+
<svg width="14" height="13" viewBox="0 0 14 13" fill="none"
|
441 |
+
xmlns="http://www.w3.org/2000/svg">
|
442 |
+
<rect width="15.6301" height="2.24494" rx="1.12247"
|
443 |
+
transform="translate(2.26764 0.0615997) rotate(45)" fill="white"/>
|
444 |
+
<rect width="15.6301" height="2.24494" rx="1.12247"
|
445 |
+
transform="translate(13.3198 1.649) rotate(135)" fill="white"/>
|
446 |
+
</svg>
|
447 |
+
</button>
|
448 |
+
</div>
|
449 |
+
</li>
|
450 |
+
</ul>
|
451 |
+
<div class="clear clearfix"></div>
|
452 |
+
<div class="channels-selected__item disabled" >
|
453 |
+
|
454 |
+
</div>
|
455 |
+
</div>
|
456 |
+
|
457 |
+
|
458 |
+
<button class="btn-save-sticky">
|
459 |
+
<span><?php _e('Save', CHT_OPT); ?></span>
|
460 |
+
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
461 |
+
<path
|
462 |
+
d="M21.5 0.5H0.5V27.5H27.5V6.5L21.5 0.5ZM14 24.5C11.51 24.5 9.5 22.49 9.5 20C9.5 17.51 11.51 15.5 14 15.5C16.49 15.5 18.5 17.51 18.5 20C18.5 22.49 16.49 24.5 14 24.5ZM18.5 9.5H3.5V3.5H18.5V9.5Z"
|
463 |
+
fill="white"/>
|
464 |
+
</svg>
|
465 |
+
</button>
|
466 |
+
|
467 |
+
|
468 |
+
<a class="btn-help"><?php _e('help', CHT_OPT); ?><span>?</span></a>
|
469 |
+
|
470 |
+
|
471 |
+
<div class="easy-modal" id="modal1">
|
472 |
+
<div class="easy-modal-inner">
|
473 |
+
<button class="easy-modal-close" title="Close">
|
474 |
+
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
475 |
+
<rect width="15.6301" height="2.24494" rx="1.12247" transform="translate(1.5874) rotate(45)"
|
476 |
+
fill="#4F4F4F"/>
|
477 |
+
<rect width="15.6301" height="2.24494" rx="1.12247"
|
478 |
+
transform="translate(12.6396 1.58742) rotate(135)" fill="#4F4F4F"/>
|
479 |
+
</svg>
|
480 |
+
</button>
|
481 |
+
|
482 |
+
<h2><?php _e('Upgrade', CHT_OPT); ?></h2>
|
483 |
+
|
484 |
+
<p class="text-center">
|
485 |
+
<?php _e('Unlock all Pro features for just', CHT_OPT); ?>
|
486 |
+
<strong class="text-primary">$2.39/<?php _e('month', CHT_OPT); ?></strong>
|
487 |
+
(<?php _e('paid annually', CHT_OPT); ?>)
|
488 |
+
</p>
|
489 |
+
|
490 |
+
<ul>
|
491 |
+
<li><?php _e('One website', CHT_OPT); ?></li>
|
492 |
+
<li><?php _e('Unlimited channels', CHT_OPT); ?></li>
|
493 |
+
<li><?php _e('Custom color (HEX code)', CHT_OPT); ?></li>
|
494 |
+
<li><?php _e('Custom location (X,Y)', CHT_OPT); ?></li>
|
495 |
+
<li><?php _e('Remove “Get widget” link', CHT_OPT); ?></li>
|
496 |
+
</ul>
|
497 |
+
|
498 |
+
<div class="form-horizontal__item">
|
499 |
+
<label><?php _e('Token number', CHT_OPT); ?>:</label>
|
500 |
+
|
501 |
+
<div>
|
502 |
+
<input data-gramm_editor="false" type="text" placeholder="XXXX-XXXX-XXXX">
|
503 |
+
</div>
|
504 |
+
</div>
|
505 |
+
|
506 |
+
<div class="text-center">
|
507 |
+
<button class="btn-red">
|
508 |
+
<?php _e('Upgrade Now', CHT_OPT); ?>
|
509 |
+
<svg width="17" height="19" viewBox="0 0 17 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
510 |
+
<path
|
511 |
+
d="M17.4674 7.42523L11.8646 0.128021C11.7548 0.128021 11.6449 0 11.4252 0C11.3154 0 11.0956 0 10.9858 0.128021L9.44777 1.92032C9.22806 2.17636 9.22806 2.56042 9.33791 2.81647L11.7548 6.017H0.549289C0.219716 6.017 0 6.27304 0 6.6571V9.21753C0 9.60159 0.219716 9.85763 0.549289 9.85763H11.8646L9.44777 13.0582C9.22806 13.3142 9.22806 13.6983 9.44777 13.9543L11.0956 15.6186C11.2055 15.7466 11.3154 15.7466 11.4252 15.7466C11.5351 15.7466 11.7548 15.6186 11.8646 15.4906L17.4674 8.19336C17.5772 8.06534 17.5772 7.68127 17.4674 7.42523Z"
|
512 |
+
transform="translate(0.701416 18.3653) rotate(-90)" fill="white"/>
|
513 |
+
</svg>
|
514 |
+
</button>
|
515 |
+
</div>
|
516 |
+
|
517 |
+
<div class="text-center">
|
518 |
+
<a href="#upgrade-modal" class="easy-modal-link"><?php _e('Change to free version', CHT_OPT); ?></a>
|
519 |
+
</div>
|
520 |
+
|
521 |
+
</div>
|
522 |
+
</div>
|
523 |
+
</section>
|
524 |
+
<script>
|
525 |
+
var PRO_PLUGIN_URL = "<?php echo CHT_PRO_URL ?>";
|
526 |
+
</script>
|
527 |
+
|