Version Description
- Fix. Contact phone number use button number as default
- Fix. Contacts panel alert on first load
Download this release
Release Info
Developer | quadlayers |
Plugin | WhatsApp Chat WP |
Version | 5.0.4 |
Comparing to | |
See all releases |
Code changes from version 5.0.3 to 5.0.4
- includes/frontend.php +168 -171
- includes/models/Button.php +2 -2
- includes/models/Contact.php +14 -3
- readme.txt +6 -2
- template/box.php +49 -49
- wp-whatsapp-chat.php +23 -22
includes/frontend.php
CHANGED
@@ -1,173 +1,170 @@
|
|
1 |
<?php
|
2 |
-
if (!class_exists('QLWAPP_Frontend')) {
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
}
|
171 |
-
|
172 |
-
QLWAPP_Frontend::instance();
|
173 |
}
|
1 |
<?php
|
2 |
+
if ( ! class_exists( 'QLWAPP_Frontend' ) ) {
|
3 |
+
|
4 |
+
class QLWAPP_Frontend {
|
5 |
+
|
6 |
+
protected static $instance;
|
7 |
+
|
8 |
+
function add_js() {
|
9 |
+
$frontend = include_once QLWAPP_PLUGIN_DIR . 'assets/frontend/js/frontend.asset.php';
|
10 |
+
|
11 |
+
wp_enqueue_style( QLWAPP_DOMAIN, plugins_url( '/assets/frontend/css/frontend.css', QLWAPP_PLUGIN_FILE ), null, QLWAPP_PLUGIN_VERSION, 'all' );
|
12 |
+
wp_enqueue_script( QLWAPP_DOMAIN, plugins_url( '/assets/frontend/js/frontend.js', QLWAPP_PLUGIN_FILE ), $frontend['dependencies'], $frontend['version'], true );
|
13 |
+
}
|
14 |
+
|
15 |
+
function add_box() {
|
16 |
+
global $qlwapp;
|
17 |
+
|
18 |
+
if ( is_file( $file = apply_filters( 'qlwapp_box_template', QLWAPP_PLUGIN_DIR . 'template/box.php' ) ) ) {
|
19 |
+
include_once QLWAPP_PLUGIN_DIR . 'includes/models/Box.php';
|
20 |
+
include_once QLWAPP_PLUGIN_DIR . 'includes/models/Contact.php';
|
21 |
+
include_once QLWAPP_PLUGIN_DIR . 'includes/models/Display.php';
|
22 |
+
include_once QLWAPP_PLUGIN_DIR . 'includes/models/Button.php';
|
23 |
+
|
24 |
+
$box_model = new QLWAPP_Box();
|
25 |
+
$contact_model = new QLWAPP_Contact();
|
26 |
+
$button_model = new QLWAPP_Button();
|
27 |
+
$display_model = new QLWAPP_Display();
|
28 |
+
$display_service = new QLWAPP_DisplayServices_Controller();
|
29 |
+
|
30 |
+
$contacts = $contact_model->get_contacts_reorder();
|
31 |
+
$display = $display_model->get();
|
32 |
+
$button = $button_model->get();
|
33 |
+
$box = $box_model->get();
|
34 |
+
|
35 |
+
include_once $file;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
function add_frontend_css() {
|
40 |
+
$scheme_model = new QLWAPP_Scheme();
|
41 |
+
$scheme = $scheme_model->get();
|
42 |
+
?>
|
43 |
+
<style>
|
44 |
+
:root {
|
45 |
+
<?php
|
46 |
+
|
47 |
+
unset( $scheme['_wp_http_referer'] );
|
48 |
+
unset( $scheme['_scheme_form_nonce'] );
|
49 |
+
foreach ( $scheme as $key => $value ) {
|
50 |
+
if ( $value != '' ) {
|
51 |
+
printf( '--%s-scheme-%s:%s;', QLWAPP_DOMAIN, $key, $value );
|
52 |
+
}
|
53 |
+
}
|
54 |
+
?>
|
55 |
+
}
|
56 |
+
|
57 |
+
<?php
|
58 |
+
if ( $scheme['font-family'] ) :
|
59 |
+
?>
|
60 |
+
#qlwapp {
|
61 |
+
font-family: var(--qlwapp-scheme-font-family);
|
62 |
+
}
|
63 |
+
|
64 |
+
<?php endif; ?>
|
65 |
+
<?php
|
66 |
+
if ( $scheme['font-size'] ) :
|
67 |
+
?>
|
68 |
+
#qlwapp {
|
69 |
+
font-size: calc(var(--qlwapp-scheme-font-size)*1px);
|
70 |
+
}
|
71 |
+
|
72 |
+
<?php endif; ?>
|
73 |
+
<?php
|
74 |
+
if ( $scheme['brand'] ) :
|
75 |
+
?>
|
76 |
+
#qlwapp .qlwapp-toggle,
|
77 |
+
#qlwapp .qlwapp-box .qlwapp-header,
|
78 |
+
#qlwapp .qlwapp-box .qlwapp-user,
|
79 |
+
#qlwapp .qlwapp-box .qlwapp-user:before {
|
80 |
+
background-color: var(--qlwapp-scheme-brand);
|
81 |
+
}
|
82 |
+
|
83 |
+
<?php endif; ?>
|
84 |
+
<?php
|
85 |
+
if ( $scheme['text'] ) :
|
86 |
+
?>
|
87 |
+
#qlwapp .qlwapp-toggle,
|
88 |
+
#qlwapp .qlwapp-toggle .qlwapp-icon,
|
89 |
+
#qlwapp .qlwapp-toggle .qlwapp-text,
|
90 |
+
#qlwapp .qlwapp-box .qlwapp-header,
|
91 |
+
#qlwapp .qlwapp-box .qlwapp-user {
|
92 |
+
color: var(--qlwapp-scheme-text);
|
93 |
+
}
|
94 |
+
|
95 |
+
<?php endif; ?>
|
96 |
+
</style>
|
97 |
+
<?php
|
98 |
+
}
|
99 |
+
|
100 |
+
function box_display1( $show ) {
|
101 |
+
global $wp_query;
|
102 |
+
$display_model = new QLWAPP_Display();
|
103 |
+
$display = $display_model->get();
|
104 |
+
if ( is_customize_preview() ) {
|
105 |
+
return true;
|
106 |
+
}
|
107 |
+
$display_service = new QLWAPP_DisplayServices_Controller();
|
108 |
+
return $display_service->is_show_view( $display );
|
109 |
+
}
|
110 |
+
|
111 |
+
function do_shortcode( $atts, $content = null ) {
|
112 |
+
$button_model = new QLWAPP_Button();
|
113 |
+
$button = $button_model->get();
|
114 |
+
|
115 |
+
$atts = wp_parse_args( $atts, $button );
|
116 |
+
|
117 |
+
ob_start();
|
118 |
+
?>
|
119 |
+
<div style="width: auto;" id="qlwapp" class="qlwapp-js-ready <?php printf( 'qlwapp-%s qlwapp-%s', esc_attr( $atts['layout'] ), esc_attr( $atts['rounded'] === 'yes' ? 'rounded' : 'square' ) ); ?>">
|
120 |
+
<a class="qlwapp-toggle" data-action="open" data-phone="<?php echo esc_attr( $atts['phone'] ); ?>" data-message="<?php echo esc_html( $atts['message'] ); ?>" href="#" target="_blank">
|
121 |
+
<?php if ( $atts['icon'] ) : ?>
|
122 |
+
<i class="qlwapp-icon <?php echo esc_attr( $atts['icon'] ); ?>"></i>
|
123 |
+
<?php endif; ?>
|
124 |
+
<i class="qlwapp-close" data-action="close">×</i>
|
125 |
+
<?php if ( $atts['text'] ) : ?>
|
126 |
+
<span class="qlwapp-text"><?php echo esc_html( $content ); ?></span>
|
127 |
+
<?php endif; ?>
|
128 |
+
</a>
|
129 |
+
</div>
|
130 |
+
<?php
|
131 |
+
return ob_get_clean();
|
132 |
+
}
|
133 |
+
|
134 |
+
function display() {
|
135 |
+
include_once QLWAPP_PLUGIN_DIR . 'includes/models/QLWAPP_Model.php';
|
136 |
+
include_once QLWAPP_PLUGIN_DIR . 'includes/models/Display.php';
|
137 |
+
include_once QLWAPP_PLUGIN_DIR . 'includes/controllers/Display_services.php';
|
138 |
+
$display_model = new QLWAPP_Display();
|
139 |
+
$display = $display_model->get();
|
140 |
+
$display_service = new QLWAPP_DisplayServices_Controller();
|
141 |
+
|
142 |
+
if ( $display_service->is_show_view( $display ) ) {
|
143 |
+
|
144 |
+
do_action( 'qlwapp_load' );
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
function load() {
|
149 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'add_js' ) );
|
150 |
+
add_action( 'wp_head', array( $this, 'add_frontend_css' ), 200 );
|
151 |
+
add_action( 'wp_footer', array( $this, 'add_box' ) );
|
152 |
+
}
|
153 |
+
|
154 |
+
function init() {
|
155 |
+
add_action( 'template_redirect', array( $this, 'display' ) );
|
156 |
+
add_shortcode( 'whatsapp', array( $this, 'do_shortcode' ) );
|
157 |
+
add_action( 'qlwapp_load', array( $this, 'load' ) );
|
158 |
+
}
|
159 |
+
|
160 |
+
public static function instance() {
|
161 |
+
if ( ! isset( self::$instance ) ) {
|
162 |
+
self::$instance = new self();
|
163 |
+
self::$instance->init();
|
164 |
+
}
|
165 |
+
return self::$instance;
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
QLWAPP_Frontend::instance();
|
|
|
|
|
|
|
170 |
}
|
includes/models/Button.php
CHANGED
@@ -12,12 +12,12 @@ class QLWAPP_Button extends QLWAPP_Model
|
|
12 |
|
13 |
$args = array(
|
14 |
'layout' => 'button',
|
15 |
-
'box' => '
|
16 |
'position' => 'bottom-right',
|
17 |
'text' => esc_html__('How can I help you?', 'wp-whatsapp-chat'),
|
18 |
'message' => sprintf(esc_html__('Hello! I\'m testing the %s plugin %s', 'wp-whatsapp-chat'), QLWAPP_PLUGIN_NAME, QLWAPP_LANDING_URL),
|
19 |
'icon' => 'qlwapp-whatsapp-icon',
|
20 |
-
'phone' =>
|
21 |
'developer' => 'no',
|
22 |
'rounded' => 'yes',
|
23 |
'timefrom' => '00:00',
|
12 |
|
13 |
$args = array(
|
14 |
'layout' => 'button',
|
15 |
+
'box' => 'no',
|
16 |
'position' => 'bottom-right',
|
17 |
'text' => esc_html__('How can I help you?', 'wp-whatsapp-chat'),
|
18 |
'message' => sprintf(esc_html__('Hello! I\'m testing the %s plugin %s', 'wp-whatsapp-chat'), QLWAPP_PLUGIN_NAME, QLWAPP_LANDING_URL),
|
19 |
'icon' => 'qlwapp-whatsapp-icon',
|
20 |
+
'phone' => QLWAPP_PHONE_NUMBER,
|
21 |
'developer' => 'no',
|
22 |
'rounded' => 'yes',
|
23 |
'timefrom' => '00:00',
|
includes/models/Contact.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
include_once(QLWAPP_PLUGIN_DIR . 'includes/helpers.php');
|
4 |
-
|
5 |
include_once(QLWAPP_PLUGIN_DIR . 'includes/models/Display_Component.php');
|
6 |
|
7 |
class QLWAPP_Contact extends QLWAPP_Model {
|
@@ -20,7 +20,7 @@ class QLWAPP_Contact extends QLWAPP_Model {
|
|
20 |
'chat' => true,
|
21 |
'auto_open' => false,
|
22 |
'avatar' => 'https://www.gravatar.com/avatar/00000000000000000000000000000000',
|
23 |
-
'phone' => '
|
24 |
'firstname' => 'John',
|
25 |
'lastname' => 'Doe',
|
26 |
'label' => esc_html__('Support', 'wp-whatsapp-chat'),
|
@@ -119,11 +119,14 @@ class QLWAPP_Contact extends QLWAPP_Model {
|
|
119 |
}
|
120 |
|
121 |
function get_contact($id) {
|
122 |
-
$parent_id = @max(array_keys(array_column($contacts, 'id'), $id));
|
123 |
$contacts = $this->get_contacts();
|
124 |
return array_replace_recursive($this->get_args(), $contacts[$id]);
|
125 |
}
|
126 |
function get_contacts() {
|
|
|
|
|
|
|
127 |
$result = parent::get_all($this->table);
|
128 |
if ($result === NULL || count($result) === 0) {
|
129 |
$default = array();
|
@@ -135,6 +138,14 @@ class QLWAPP_Contact extends QLWAPP_Model {
|
|
135 |
$result[$id] = wp_parse_args($c, $this->get_args());
|
136 |
}
|
137 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
return $result;
|
139 |
}
|
140 |
|
1 |
<?php
|
2 |
|
3 |
include_once(QLWAPP_PLUGIN_DIR . 'includes/helpers.php');
|
4 |
+
include_once QLWAPP_PLUGIN_DIR . 'includes/models/Button.php';
|
5 |
include_once(QLWAPP_PLUGIN_DIR . 'includes/models/Display_Component.php');
|
6 |
|
7 |
class QLWAPP_Contact extends QLWAPP_Model {
|
20 |
'chat' => true,
|
21 |
'auto_open' => false,
|
22 |
'avatar' => 'https://www.gravatar.com/avatar/00000000000000000000000000000000',
|
23 |
+
'phone' => '',
|
24 |
'firstname' => 'John',
|
25 |
'lastname' => 'Doe',
|
26 |
'label' => esc_html__('Support', 'wp-whatsapp-chat'),
|
119 |
}
|
120 |
|
121 |
function get_contact($id) {
|
122 |
+
// $parent_id = @max(array_keys(array_column($contacts, 'id'), $id));
|
123 |
$contacts = $this->get_contacts();
|
124 |
return array_replace_recursive($this->get_args(), $contacts[$id]);
|
125 |
}
|
126 |
function get_contacts() {
|
127 |
+
|
128 |
+
$button_model = new QLWAPP_Button();
|
129 |
+
$button = $button_model->get();
|
130 |
$result = parent::get_all($this->table);
|
131 |
if ($result === NULL || count($result) === 0) {
|
132 |
$default = array();
|
138 |
$result[$id] = wp_parse_args($c, $this->get_args());
|
139 |
}
|
140 |
}
|
141 |
+
|
142 |
+
//Include the button phone number if the contact number is empty
|
143 |
+
foreach ($result as $id => $contact) {
|
144 |
+
if(!$contact['phone']) {
|
145 |
+
$result[$id]['phone'] = $button['phone'];
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
return $result;
|
150 |
}
|
151 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: quadlayers
|
|
3 |
Donate link: https://quadlayers.com/portfolio/whatsapp-chat/
|
4 |
Tags: whatsapp, whatsapp chat, whatsapp business, whatsapp support, click to chat, whatsapp group, directly message whatsapp, floating whatsapp, whatsapp message, help desk
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 5.0.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -97,6 +97,10 @@ Don't use: +001-(555)1234567
|
|
97 |
|
98 |
== Changelog ==
|
99 |
|
|
|
|
|
|
|
|
|
100 |
= 5.0.3 =
|
101 |
* Fix. WordPress compatibility
|
102 |
|
3 |
Donate link: https://quadlayers.com/portfolio/whatsapp-chat/
|
4 |
Tags: whatsapp, whatsapp chat, whatsapp business, whatsapp support, click to chat, whatsapp group, directly message whatsapp, floating whatsapp, whatsapp message, help desk
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 6.0
|
7 |
+
Stable tag: 5.0.4
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
97 |
|
98 |
== Changelog ==
|
99 |
|
100 |
+
= 5.0.4 =
|
101 |
+
* Fix. Contact phone number use button number as default
|
102 |
+
* Fix. Contacts panel alert on first load
|
103 |
+
|
104 |
= 5.0.3 =
|
105 |
* Fix. WordPress compatibility
|
106 |
|
template/box.php
CHANGED
@@ -1,49 +1,49 @@
|
|
1 |
-
<div id="qlwapp" class="qlwapp-free <?php printf(
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
</div>
|
1 |
+
<div id="qlwapp" class="qlwapp-free <?php printf( 'qlwapp-%s qlwapp-%s qlwapp-%s qlwapp-%s', esc_attr( $button['layout'] ), esc_attr( $button['position'] ), esc_attr( $display['devices'] ), esc_attr( $button['rounded'] === 'yes' ? 'rounded' : 'square' ) ); ?>">
|
2 |
+
<div class="qlwapp-container">
|
3 |
+
<?php if ( $button['box'] === 'yes' ) : ?>
|
4 |
+
<div class="qlwapp-box">
|
5 |
+
<?php if ( ! empty( $box['header'] ) ) : ?>
|
6 |
+
<div class="qlwapp-header">
|
7 |
+
<i class="qlwapp-close" data-action="close">×</i>
|
8 |
+
<div class="qlwapp-description">
|
9 |
+
<div class="qlwapp-description-container">
|
10 |
+
<?php echo wpautop( wp_kses_post( wpautop( $box['header'] ) ) ); ?>
|
11 |
+
</div>
|
12 |
+
</div>
|
13 |
+
</div>
|
14 |
+
<?php endif; ?>
|
15 |
+
<div class="qlwapp-body">
|
16 |
+
<?php if ( isset( $contacts[0] ) ) : ?>
|
17 |
+
<a class="qlwapp-account" data-action="open" data-phone="<?php echo qlwapp_format_phone( $contacts[0]['phone'] ); ?>" data-message="<?php echo esc_html( $button['message'] ); ?>" href="javascript:void(0);" target="_blank">
|
18 |
+
<?php if ( ! empty( $contacts[0]['avatar'] ) ) : ?>
|
19 |
+
<div class="qlwapp-avatar">
|
20 |
+
<div class="qlwapp-avatar-container">
|
21 |
+
<img alt="<?php printf( '%s %s', esc_html( $contacts[0]['firstname'] ), esc_html( $contacts[0]['lastname'] ) ); ?>" src="<?php echo esc_url( $contacts[0]['avatar'] ); ?>">
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
<?php endif; ?>
|
25 |
+
<div class="qlwapp-info">
|
26 |
+
<span class="qlwapp-label"><?php echo esc_html( $contacts[0]['label'] ); ?></span>
|
27 |
+
<span class="qlwapp-name"><?php printf( '%s %s', esc_html( $contacts[0]['firstname'] ), esc_html( $contacts[0]['lastname'] ) ); ?></span>
|
28 |
+
</div>
|
29 |
+
</a>
|
30 |
+
<?php endif; ?>
|
31 |
+
</div>
|
32 |
+
<?php if ( ! empty( $box['footer'] ) ) : ?>
|
33 |
+
<div class="qlwapp-footer">
|
34 |
+
<?php echo wpautop( wp_kses_post( $box['footer'] ) ); ?>
|
35 |
+
</div>
|
36 |
+
<?php endif; ?>
|
37 |
+
</div>
|
38 |
+
<?php endif; ?>
|
39 |
+
<a class="qlwapp-toggle" data-action="<?php echo ( $button['box'] === 'yes' ? 'box' : 'open' ); ?>" data-phone="<?php echo qlwapp_format_phone( $button['phone'] ); ?>" data-message="<?php echo esc_html( $button['message'] ); ?>" href="javascript:void(0);" target="_blank">
|
40 |
+
<?php if ( $button['icon'] ) : ?>
|
41 |
+
<i class="qlwapp-icon <?php echo esc_attr( $button['icon'] ); ?>"></i>
|
42 |
+
<?php endif; ?>
|
43 |
+
<i class="qlwapp-close" data-action="close">×</i>
|
44 |
+
<?php if ( $button['text'] ) : ?>
|
45 |
+
<span class="qlwapp-text"><?php echo esc_html( $button['text'] ); ?></span>
|
46 |
+
<?php endif; ?>
|
47 |
+
</a>
|
48 |
+
</div>
|
49 |
+
</div>
|
wp-whatsapp-chat.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Social Chat
|
5 |
* Description: Social Chat allows your visitors to contact you or your team through WhatsApp chat with a single click.
|
6 |
* Plugin URI: https://quadlayers.com/portfolio/whatsapp-chat/
|
7 |
-
* Version: 5.0.
|
8 |
* Author: QuadLayers
|
9 |
* Author URI: https://quadlayers.com
|
10 |
* License: GPLv3
|
@@ -12,31 +12,32 @@
|
|
12 |
* Text Domain: wp-whatsapp-chat
|
13 |
* Domain Path: /languages
|
14 |
*/
|
15 |
-
if (!defined('ABSPATH')) {
|
16 |
-
|
17 |
}
|
18 |
|
19 |
-
define('QLWAPP_PLUGIN_NAME', 'Social Chat');
|
20 |
-
define('QLWAPP_PLUGIN_VERSION', '5.0.
|
21 |
-
define('QLWAPP_PLUGIN_FILE', __FILE__);
|
22 |
-
define('QLWAPP_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR);
|
23 |
-
define('QLWAPP_PREFIX', 'qlwapp');
|
24 |
-
define('QLWAPP_DOMAIN', QLWAPP_PREFIX);
|
25 |
-
define('QLWAPP_WORDPRESS_URL', 'https://wordpress.org/plugins/wp-whatsapp-chat/');
|
26 |
-
define('QLWAPP_REVIEW_URL', 'https://wordpress.org/support/plugin/wp-whatsapp-chat/reviews/?filter=5#new-post');
|
27 |
-
define('QLWAPP_DEMO_URL', 'https://quadlayers.com/portfolio/whatsapp-chat/?utm_source=qlwapp_admin');
|
28 |
-
define('QLWAPP_PURCHASE_URL', QLWAPP_DEMO_URL);
|
29 |
-
define('QLWAPP_LANDING_URL', 'https://quadlayers.com/whatsapp-chat-landing/?utm_source=qlwapp_admin');
|
30 |
-
define('QLWAPP_SUPPORT_URL', 'https://quadlayers.com/account/support/?utm_source=qlwapp_admin');
|
31 |
-
define('QLWAPP_DOCUMENTATION_URL', 'https://quadlayers.com/documentation/whatsapp-chat/?utm_source=qlwapp_admin');
|
32 |
-
define('QLWAPP_GROUP_URL', 'https://www.facebook.com/groups/quadlayers');
|
|
|
33 |
|
34 |
-
if (!class_exists('QLWAPP')) {
|
35 |
-
|
36 |
}
|
37 |
|
38 |
-
if (!class_exists('QL_Widget')) {
|
39 |
-
|
40 |
}
|
41 |
|
42 |
-
register_activation_hook(QLWAPP_PLUGIN_FILE, array('QLWAPP', 'do_activation'));
|
4 |
* Plugin Name: Social Chat
|
5 |
* Description: Social Chat allows your visitors to contact you or your team through WhatsApp chat with a single click.
|
6 |
* Plugin URI: https://quadlayers.com/portfolio/whatsapp-chat/
|
7 |
+
* Version: 5.0.4
|
8 |
* Author: QuadLayers
|
9 |
* Author URI: https://quadlayers.com
|
10 |
* License: GPLv3
|
12 |
* Text Domain: wp-whatsapp-chat
|
13 |
* Domain Path: /languages
|
14 |
*/
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
16 |
+
die( '-1' );
|
17 |
}
|
18 |
|
19 |
+
define( 'QLWAPP_PLUGIN_NAME', 'Social Chat' );
|
20 |
+
define( 'QLWAPP_PLUGIN_VERSION', '5.0.4' );
|
21 |
+
define( 'QLWAPP_PLUGIN_FILE', __FILE__ );
|
22 |
+
define( 'QLWAPP_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR );
|
23 |
+
define( 'QLWAPP_PREFIX', 'qlwapp' );
|
24 |
+
define( 'QLWAPP_DOMAIN', QLWAPP_PREFIX );
|
25 |
+
define( 'QLWAPP_WORDPRESS_URL', 'https://wordpress.org/plugins/wp-whatsapp-chat/' );
|
26 |
+
define( 'QLWAPP_REVIEW_URL', 'https://wordpress.org/support/plugin/wp-whatsapp-chat/reviews/?filter=5#new-post' );
|
27 |
+
define( 'QLWAPP_DEMO_URL', 'https://quadlayers.com/portfolio/whatsapp-chat/?utm_source=qlwapp_admin' );
|
28 |
+
define( 'QLWAPP_PURCHASE_URL', QLWAPP_DEMO_URL );
|
29 |
+
define( 'QLWAPP_LANDING_URL', 'https://quadlayers.com/whatsapp-chat-landing/?utm_source=qlwapp_admin' );
|
30 |
+
define( 'QLWAPP_SUPPORT_URL', 'https://quadlayers.com/account/support/?utm_source=qlwapp_admin' );
|
31 |
+
define( 'QLWAPP_DOCUMENTATION_URL', 'https://quadlayers.com/documentation/whatsapp-chat/?utm_source=qlwapp_admin' );
|
32 |
+
define( 'QLWAPP_GROUP_URL', 'https://www.facebook.com/groups/quadlayers' );
|
33 |
+
define( 'QLWAPP_PHONE_NUMBER', '12019713894' );
|
34 |
|
35 |
+
if ( ! class_exists( 'QLWAPP' ) ) {
|
36 |
+
include_once QLWAPP_PLUGIN_DIR . 'includes/qlwapp.php';
|
37 |
}
|
38 |
|
39 |
+
if ( ! class_exists( 'QL_Widget' ) ) {
|
40 |
+
include_once QLWAPP_PLUGIN_DIR . 'includes/quadlayers/widget.php';
|
41 |
}
|
42 |
|
43 |
+
register_activation_hook( QLWAPP_PLUGIN_FILE, array( 'QLWAPP', 'do_activation' ) );
|