Version Description
- Fix. WordPress compatibility
Download this release
Release Info
Developer | quadlayers |
Plugin | WhatsApp Chat WP |
Version | 6.0.9 |
Comparing to | |
See all releases |
Code changes from version 6.0.8 to 6.0.9
- includes/models/Box.php +0 -1
- includes/models/Button.php +15 -17
- includes/models/Contact.php +18 -20
- includes/models/WooCommerce.php +4 -3
- includes/view/backend/pages/button.php +79 -91
- includes/view/backend/pages/contacts.php +80 -64
- includes/view/backend/pages/modals/contact/panel-contact.php +78 -76
- readme.txt +5 -2
- template/box.php +8 -8
- wp-whatsapp-chat.php +2 -2
includes/models/Box.php
CHANGED
@@ -23,7 +23,6 @@ class QLWAPP_Box extends QLWAPP_Model {
|
|
23 |
// 'header' => '<p><span style="font-size: 12px;line-height: 34px;vertical-align: bottom;letter-spacing: -0.2px">Powered by</span> <a href="' . QLWAPP_LANDING_URL . '" target="_blank" rel="noopener" style="font-size: 24px;line-height: 34px;font-family: Calibri;font-weight: bold;text-decoration: none;color: white">WhatsApp Chat</a></p>',
|
24 |
'footer' => '<p style="text-align: start;">WhatsApp Chat is free, download and try it now <a target="_blank" href="' . QLWAPP_LANDING_URL . '">here!</a></p>',
|
25 |
'response' => esc_html__( 'Write a response', 'wp-whatsapp-chat' ),
|
26 |
-
// ,'contactstimeout' => 'no'
|
27 |
);
|
28 |
return $args;
|
29 |
}
|
23 |
// 'header' => '<p><span style="font-size: 12px;line-height: 34px;vertical-align: bottom;letter-spacing: -0.2px">Powered by</span> <a href="' . QLWAPP_LANDING_URL . '" target="_blank" rel="noopener" style="font-size: 24px;line-height: 34px;font-family: Calibri;font-weight: bold;text-decoration: none;color: white">WhatsApp Chat</a></p>',
|
24 |
'footer' => '<p style="text-align: start;">WhatsApp Chat is free, download and try it now <a target="_blank" href="' . QLWAPP_LANDING_URL . '">here!</a></p>',
|
25 |
'response' => esc_html__( 'Write a response', 'wp-whatsapp-chat' ),
|
|
|
26 |
);
|
27 |
return $args;
|
28 |
}
|
includes/models/Button.php
CHANGED
@@ -9,20 +9,21 @@ class QLWAPP_Button extends QLWAPP_Model {
|
|
9 |
|
10 |
function get_args() {
|
11 |
$args = array(
|
12 |
-
'layout'
|
13 |
-
'box'
|
14 |
-
'position'
|
15 |
-
'text'
|
16 |
-
'message'
|
17 |
-
'icon'
|
18 |
-
'phone'
|
19 |
-
'developer'
|
20 |
-
'rounded'
|
21 |
-
'timefrom'
|
22 |
-
'timeto'
|
23 |
-
'timedays'
|
24 |
-
'timezone'
|
25 |
-
'
|
|
|
26 |
);
|
27 |
return $args;
|
28 |
}
|
@@ -40,9 +41,6 @@ class QLWAPP_Button extends QLWAPP_Model {
|
|
40 |
if ( isset( $settings['message'] ) ) {
|
41 |
$settings['message'] = sanitize_text_field( $settings['message'] );
|
42 |
}
|
43 |
-
// if (isset($settings['contactstimeout'])) {
|
44 |
-
// $settings['box']['contactstimeout'] = sanitize_text_field($settings['box']['contactstimeout']);
|
45 |
-
// }
|
46 |
if ( isset( $settings['icon'] ) ) {
|
47 |
$settings['icon'] = sanitize_html_class( $settings['icon'] );
|
48 |
}
|
9 |
|
10 |
function get_args() {
|
11 |
$args = array(
|
12 |
+
'layout' => 'button',
|
13 |
+
'box' => 'no',
|
14 |
+
'position' => 'bottom-right',
|
15 |
+
'text' => esc_html__( 'How can I help you?', 'wp-whatsapp-chat' ),
|
16 |
+
'message' => sprintf( esc_html__( 'Hello! I\'m testing the %1$s plugin %2$s', 'wp-whatsapp-chat' ), QLWAPP_PLUGIN_NAME, QLWAPP_LANDING_URL ),
|
17 |
+
'icon' => 'qlwapp-whatsapp-icon',
|
18 |
+
'phone' => QLWAPP_PHONE_NUMBER,
|
19 |
+
'developer' => 'no',
|
20 |
+
'rounded' => 'yes',
|
21 |
+
'timefrom' => '00:00',
|
22 |
+
'timeto' => '00:00',
|
23 |
+
'timedays' => array(),
|
24 |
+
'timezone' => qlwapp_get_current_timezone(),
|
25 |
+
'visibility' => 'readonly',
|
26 |
+
'timeout' => 'readonly', /* TODO: delete */
|
27 |
);
|
28 |
return $args;
|
29 |
}
|
41 |
if ( isset( $settings['message'] ) ) {
|
42 |
$settings['message'] = sanitize_text_field( $settings['message'] );
|
43 |
}
|
|
|
|
|
|
|
44 |
if ( isset( $settings['icon'] ) ) {
|
45 |
$settings['icon'] = sanitize_html_class( $settings['icon'] );
|
46 |
}
|
includes/models/Contact.php
CHANGED
@@ -12,25 +12,24 @@ class QLWAPP_Contact extends QLWAPP_Model {
|
|
12 |
|
13 |
$display_component_model = new Display_Component();
|
14 |
$args = array(
|
15 |
-
'id'
|
16 |
-
'order'
|
17 |
-
'active'
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
'
|
22 |
-
'
|
23 |
-
'
|
24 |
-
'
|
25 |
-
'
|
26 |
-
'
|
27 |
-
'
|
28 |
-
'
|
29 |
-
'
|
30 |
-
'
|
31 |
-
'
|
32 |
-
'
|
33 |
-
'display' => $display_component_model->get_args(),
|
34 |
);
|
35 |
|
36 |
return $args;
|
@@ -61,7 +60,6 @@ class QLWAPP_Contact extends QLWAPP_Model {
|
|
61 |
function save( $contact_data = null ) {
|
62 |
$contacts = $this->get_contacts();
|
63 |
$contacts[ $contact_data['id'] ] = wp_parse_args( $contact_data, $this->get_args() );
|
64 |
-
|
65 |
return $this->save_with_reorder( $contacts, 1 );
|
66 |
}
|
67 |
|
12 |
|
13 |
$display_component_model = new Display_Component();
|
14 |
$args = array(
|
15 |
+
'id' => null,
|
16 |
+
'order' => 1,
|
17 |
+
'active' => 1,
|
18 |
+
'chat' => true,
|
19 |
+
'auto_open' => false,
|
20 |
+
'avatar' => 'https://www.gravatar.com/avatar/00000000000000000000000000000000',
|
21 |
+
'phone' => '',
|
22 |
+
'firstname' => 'John',
|
23 |
+
'lastname' => 'Doe',
|
24 |
+
'label' => esc_html__( 'Support', 'wp-whatsapp-chat' ),
|
25 |
+
'message' => sprintf( esc_html__( 'Hello! I\'m testing the %1$s plugin %2$s', 'wp-whatsapp-chat' ), QLWAPP_PLUGIN_NAME, QLWAPP_LANDING_URL ),
|
26 |
+
'timefrom' => '00:00',
|
27 |
+
'timeto' => '00:00',
|
28 |
+
'timezone' => qlwapp_get_current_timezone(),
|
29 |
+
'visibility' => 'readonly',
|
30 |
+
'timeout' => 'readonly', /* TODO: delete */
|
31 |
+
'timedays' => array(),
|
32 |
+
'display' => $display_component_model->get_args(),
|
|
|
33 |
);
|
34 |
|
35 |
return $args;
|
60 |
function save( $contact_data = null ) {
|
61 |
$contacts = $this->get_contacts();
|
62 |
$contacts[ $contact_data['id'] ] = wp_parse_args( $contact_data, $this->get_args() );
|
|
|
63 |
return $this->save_with_reorder( $contacts, 1 );
|
64 |
}
|
65 |
|
includes/models/WooCommerce.php
CHANGED
@@ -21,7 +21,8 @@ class QLWAPP_WooCommerce extends QLWAPP_Model {
|
|
21 |
'timeto' => '00:00',
|
22 |
'timedays' => array(),
|
23 |
'timezone' => qlwapp_get_current_timezone(),
|
24 |
-
'
|
|
|
25 |
'position' => 'none',
|
26 |
'position_priority' => 10,
|
27 |
);
|
@@ -37,11 +38,11 @@ class QLWAPP_WooCommerce extends QLWAPP_Model {
|
|
37 |
$result = $this->get_all( $this->table );
|
38 |
|
39 |
// if ( isset( $result['text'] ) ) {
|
40 |
-
//
|
41 |
// }
|
42 |
|
43 |
// if ( isset( $result['message'] ) ) {
|
44 |
-
//
|
45 |
// }
|
46 |
|
47 |
return wp_parse_args( $result, $this->get_args() );
|
21 |
'timeto' => '00:00',
|
22 |
'timedays' => array(),
|
23 |
'timezone' => qlwapp_get_current_timezone(),
|
24 |
+
'visibility' => 'readonly',
|
25 |
+
'timeout' => 'readonly', /* TODO: delete */
|
26 |
'position' => 'none',
|
27 |
'position_priority' => 10,
|
28 |
);
|
38 |
$result = $this->get_all( $this->table );
|
39 |
|
40 |
// if ( isset( $result['text'] ) ) {
|
41 |
+
// $result['text'] = $this->replacements( $result['text'] );
|
42 |
// }
|
43 |
|
44 |
// if ( isset( $result['message'] ) ) {
|
45 |
+
// $result['message'] = $this->replacements( $result['message'] );
|
46 |
// }
|
47 |
|
48 |
return wp_parse_args( $result, $this->get_args() );
|
includes/view/backend/pages/button.php
CHANGED
@@ -1,161 +1,149 @@
|
|
1 |
<div class="wrap about-wrap full-width-layout qlwrap">
|
2 |
-
|
3 |
<table class="form-table">
|
4 |
-
|
5 |
<tr>
|
6 |
-
|
7 |
-
|
8 |
<select name="layout" class="qlwapp-select2">
|
9 |
-
|
10 |
-
|
11 |
</select>
|
12 |
<p class="description hidden"><?php esc_html_e( 'Switch to change the button layout.', 'wp-whatsapp-chat' ); ?></p>
|
13 |
-
|
14 |
</tr>
|
15 |
<tr>
|
16 |
-
|
17 |
-
|
18 |
<select name="box" class="qlwapp-select2">
|
19 |
-
|
20 |
-
|
21 |
</select>
|
22 |
-
|
23 |
</tr>
|
24 |
<tr class="qlwapp-phone-alert <?php echo esc_attr( $button['box'] == 'yes' ? '' : 'hidden' ); ?>">
|
25 |
-
|
26 |
-
|
27 |
<span style="display:block!important;" class="notice notice-error">
|
28 |
-
|
29 |
<?php printf( __( 'Contact box is enabled. Please set the contact phone number in the <a href="%s">contacts tab</a>', 'wp-whatsapp-chat' ), admin_url( 'admin.php?page=' . QLWAPP_DOMAIN . '_contacts' ) ); ?>.
|
30 |
-
|
31 |
</span>
|
32 |
-
|
33 |
</tr>
|
34 |
<tr>
|
35 |
-
|
36 |
-
|
37 |
<select name="rounded" class="qlwapp-select2">
|
38 |
-
|
39 |
-
|
40 |
</select>
|
41 |
<p class="description hidden"><?php esc_html_e( 'Add rounded border to the button.', 'wp-whatsapp-chat' ); ?></p>
|
42 |
-
|
43 |
</tr>
|
44 |
<tr>
|
45 |
-
|
46 |
-
|
47 |
<select name="position" class="qlwapp-select2">
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
</select>
|
53 |
<p class="description hidden"><?php esc_html_e( 'Switch to change the button position.', 'wp-whatsapp-chat' ); ?></p>
|
54 |
-
|
55 |
</tr>
|
56 |
<tr>
|
57 |
-
|
58 |
-
|
59 |
<div class="submit qlwapp-premium-field">
|
60 |
-
|
61 |
-
|
62 |
</div>
|
63 |
<input type="text" name="icon" placeholder="<?php echo esc_html( $button['icon'] ); ?>" value="<?php echo esc_attr( $button['icon'] ); ?>" class="qlwapp-input" />
|
64 |
-
|
65 |
</tr>
|
66 |
<tr>
|
67 |
-
|
68 |
-
|
69 |
<input type="text" name="text" placeholder="<?php echo esc_html( $button['text'] ); ?>" value="<?php echo esc_attr( $button['text'] ); ?>" class="qlwapp-input" />
|
70 |
<p class="description"><?php esc_html_e( 'Customize your button text.', 'wp-whatsapp-chat' ); ?></p>
|
71 |
-
|
72 |
</tr>
|
73 |
<tr>
|
74 |
-
|
75 |
-
|
76 |
<input type="text" name="phone" placeholder="" value="<?php echo esc_attr( $button['phone'] ); ?>" class="qlwapp-input <?php echo esc_attr( $button['box'] == 'yes' ? 'disabled' : '' ); ?>" required="required" />
|
77 |
<p class="description"><?php esc_html_e( 'Full phone number in international format. Only nnumbers.', 'wp-whatsapp-chat' ); ?></p>
|
78 |
-
|
79 |
</tr>
|
80 |
<tr>
|
81 |
-
|
82 |
-
|
83 |
<textarea maxlength="500" style="width:75%;height:50px;padding:8px;" name="message" placeholder="<?php echo esc_html( $button['message'] ); ?>"><?php echo esc_html( trim( $button['message'] ) ); ?></textarea>
|
84 |
<p class="description"><?php esc_html_e( 'Message that will automatically appear in the text field of a chat.:', 'wp-whatsapp-chat' ); ?></p>
|
85 |
<p class="description"><?php esc_html_e( 'You can use this vars:', 'wp-whatsapp-chat' ); ?><small><code><?php echo esc_html( qlwapp_get_replacements_text() ); ?></code></small></p>
|
86 |
</td>
|
87 |
</tr>
|
88 |
<tr>
|
89 |
-
|
90 |
-
|
91 |
<b><?php esc_html_e( 'From', 'wp-whatsapp-chat' ); ?></b>
|
92 |
<input type="time" name="timefrom" placeholder="<?php echo esc_html( $button['timefrom'] ); ?>" value="<?php echo esc_html( $button['timefrom'] ); ?>" />
|
93 |
<b><?php esc_html_e( 'To', 'wp-whatsapp-chat' ); ?></b>
|
94 |
<input type="time" name="timeto" placeholder="<?php echo esc_html( $button['timeto'] ); ?>" value="<?php echo esc_html( $button['timeto'] ); ?>" />
|
95 |
<p class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></p>
|
96 |
-
|
97 |
</tr>
|
98 |
<tr>
|
99 |
-
|
100 |
-
|
101 |
<select name="timezone" aria-describedby="timezone-description" required="" class="qlwapp-select2">
|
102 |
-
|
103 |
</select>
|
104 |
<p class="description"><small><?php esc_html_e( 'Hide button if the user is out of the available hours.', 'wp-whatsapp-chat' ); ?></small></p>
|
105 |
<p class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></p>
|
106 |
-
|
107 |
</tr>
|
108 |
<tr>
|
109 |
-
|
110 |
-
|
111 |
<select name="timedays[]" multiple style="height:100px;">
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
</select>
|
120 |
<p class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></p>
|
121 |
-
|
122 |
-
|
123 |
</tr>
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
// selected($button['timeout'], 'no');
|
140 |
-
?>
|
141 |
-
><?php esc_html_e( 'Do not show the button', 'wp-whatsapp-chat' ); ?></option>
|
142 |
-
</select>
|
143 |
-
<p class="description hidden"><small>
|
144 |
-
<?php
|
145 |
-
// esc_html_e('This is a premium feature', 'wp-whatsapp-chat');
|
146 |
-
?>
|
147 |
-
</small></p>
|
148 |
-
</td>
|
149 |
-
</tr> -->
|
150 |
-
</tbody>
|
151 |
</table>
|
152 |
<?php wp_nonce_field( 'qlwapp_save_button', 'qlwapp_button_form_nonce' ); ?>
|
153 |
<p class="submit">
|
154 |
-
|
155 |
-
|
156 |
<span class="saved"><?php esc_html_e( 'Saved successfully!' ); ?></span>
|
157 |
<span class="spinner" style="float: none"></span>
|
158 |
-
|
159 |
</p>
|
160 |
-
|
161 |
</div>
|
1 |
<div class="wrap about-wrap full-width-layout qlwrap">
|
2 |
+
<form id="qlwapp_button_form" method="post" action="options.php">
|
3 |
<table class="form-table">
|
4 |
+
<tbody>
|
5 |
<tr>
|
6 |
+
<th scope="row"><?php esc_html_e( 'Layout', 'wp-whatsapp-chat' ); ?></th>
|
7 |
+
<td>
|
8 |
<select name="layout" class="qlwapp-select2">
|
9 |
+
<option value="button" <?php selected( $button['layout'], 'button' ); ?>><?php esc_html_e( 'Button', 'wp-whatsapp-chat' ); ?></option>
|
10 |
+
<option value="bubble" <?php selected( $button['layout'], 'bubble' ); ?>><?php esc_html_e( 'Bubble', 'wp-whatsapp-chat' ); ?></option>
|
11 |
</select>
|
12 |
<p class="description hidden"><?php esc_html_e( 'Switch to change the button layout.', 'wp-whatsapp-chat' ); ?></p>
|
13 |
+
</td>
|
14 |
</tr>
|
15 |
<tr>
|
16 |
+
<th scope="row"><?php esc_html_e( 'Box', 'wp-whatsapp-chat' ); ?></th>
|
17 |
+
<td>
|
18 |
<select name="box" class="qlwapp-select2">
|
19 |
+
<option value="yes" <?php selected( $button['box'], 'yes' ); ?>><?php esc_html_e( 'Enable contact box', 'wp-whatsapp-chat' ); ?></option>
|
20 |
+
<option value="no" <?php selected( $button['box'], 'no' ); ?>><?php esc_html_e( 'Disable contact box', 'wp-whatsapp-chat' ); ?></option>
|
21 |
</select>
|
22 |
+
</td>
|
23 |
</tr>
|
24 |
<tr class="qlwapp-phone-alert <?php echo esc_attr( $button['box'] == 'yes' ? '' : 'hidden' ); ?>">
|
25 |
+
<th scope="row"></th>
|
26 |
+
<td>
|
27 |
<span style="display:block!important;" class="notice notice-error">
|
28 |
+
<p>
|
29 |
<?php printf( __( 'Contact box is enabled. Please set the contact phone number in the <a href="%s">contacts tab</a>', 'wp-whatsapp-chat' ), admin_url( 'admin.php?page=' . QLWAPP_DOMAIN . '_contacts' ) ); ?>.
|
30 |
+
</p>
|
31 |
</span>
|
32 |
+
</td>
|
33 |
</tr>
|
34 |
<tr>
|
35 |
+
<th scope="row"><?php esc_html_e( 'Rounded', 'wp-whatsapp-chat' ); ?></th>
|
36 |
+
<td>
|
37 |
<select name="rounded" class="qlwapp-select2">
|
38 |
+
<option value="yes" <?php selected( $button['rounded'], 'yes' ); ?>><?php esc_html_e( 'Add rounded border', 'wp-whatsapp-chat' ); ?></option>
|
39 |
+
<option value="no" <?php selected( $button['rounded'], 'no' ); ?>><?php esc_html_e( 'Remove rounded border', 'wp-whatsapp-chat' ); ?></option>
|
40 |
</select>
|
41 |
<p class="description hidden"><?php esc_html_e( 'Add rounded border to the button.', 'wp-whatsapp-chat' ); ?></p>
|
42 |
+
</td>
|
43 |
</tr>
|
44 |
<tr>
|
45 |
+
<th scope="row"><?php esc_html_e( 'Position', 'wp-whatsapp-chat' ); ?></th>
|
46 |
+
<td>
|
47 |
<select name="position" class="qlwapp-select2">
|
48 |
+
<option value="middle-left" <?php selected( $button['position'], 'middle-left' ); ?>><?php esc_html_e( 'Middle Left', 'wp-whatsapp-chat' ); ?></option>
|
49 |
+
<option value="middle-right" <?php selected( $button['position'], 'middle-right' ); ?>><?php esc_html_e( 'Middle Right', 'wp-whatsapp-chat' ); ?></option>
|
50 |
+
<option value="bottom-left" <?php selected( $button['position'], 'bottom-left' ); ?>><?php esc_html_e( 'Bottom Left', 'wp-whatsapp-chat' ); ?></option>
|
51 |
+
<option value="bottom-right" <?php selected( $button['position'], 'bottom-right' ); ?>><?php esc_html_e( 'Bottom Right', 'wp-whatsapp-chat' ); ?></option>
|
52 |
</select>
|
53 |
<p class="description hidden"><?php esc_html_e( 'Switch to change the button position.', 'wp-whatsapp-chat' ); ?></p>
|
54 |
+
</td>
|
55 |
</tr>
|
56 |
<tr>
|
57 |
+
<th scope="row"><?php esc_html_e( 'Icon', 'wp-whatsapp-chat' ); ?></th>
|
58 |
+
<td>
|
59 |
<div class="submit qlwapp-premium-field">
|
60 |
+
<?php submit_button( esc_html__( 'Add Icon', 'wp-whatsapp-chat' ), 'secondary', null, false, array( 'id' => 'qlwapp_icon_add' ) ); ?>
|
61 |
+
<p class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></p>
|
62 |
</div>
|
63 |
<input type="text" name="icon" placeholder="<?php echo esc_html( $button['icon'] ); ?>" value="<?php echo esc_attr( $button['icon'] ); ?>" class="qlwapp-input" />
|
64 |
+
</td>
|
65 |
</tr>
|
66 |
<tr>
|
67 |
+
<th scope="row"><?php esc_html_e( 'Text', 'wp-whatsapp-chat' ); ?></th>
|
68 |
+
<td>
|
69 |
<input type="text" name="text" placeholder="<?php echo esc_html( $button['text'] ); ?>" value="<?php echo esc_attr( $button['text'] ); ?>" class="qlwapp-input" />
|
70 |
<p class="description"><?php esc_html_e( 'Customize your button text.', 'wp-whatsapp-chat' ); ?></p>
|
71 |
+
</td>
|
72 |
</tr>
|
73 |
<tr>
|
74 |
+
<th scope="row"><?php esc_html_e( 'Phone', 'wp-whatsapp-chat' ); ?></th>
|
75 |
+
<td>
|
76 |
<input type="text" name="phone" placeholder="" value="<?php echo esc_attr( $button['phone'] ); ?>" class="qlwapp-input <?php echo esc_attr( $button['box'] == 'yes' ? 'disabled' : '' ); ?>" required="required" />
|
77 |
<p class="description"><?php esc_html_e( 'Full phone number in international format. Only nnumbers.', 'wp-whatsapp-chat' ); ?></p>
|
78 |
+
</td>
|
79 |
</tr>
|
80 |
<tr>
|
81 |
+
<th scope="row"><?php esc_html_e( 'Message', 'wp-whatsapp-chat' ); ?></th>
|
82 |
+
<td>
|
83 |
<textarea maxlength="500" style="width:75%;height:50px;padding:8px;" name="message" placeholder="<?php echo esc_html( $button['message'] ); ?>"><?php echo esc_html( trim( $button['message'] ) ); ?></textarea>
|
84 |
<p class="description"><?php esc_html_e( 'Message that will automatically appear in the text field of a chat.:', 'wp-whatsapp-chat' ); ?></p>
|
85 |
<p class="description"><?php esc_html_e( 'You can use this vars:', 'wp-whatsapp-chat' ); ?><small><code><?php echo esc_html( qlwapp_get_replacements_text() ); ?></code></small></p>
|
86 |
</td>
|
87 |
</tr>
|
88 |
<tr>
|
89 |
+
<th scope="row"><?php esc_html_e( 'Schedule', 'wp-whatsapp-chat' ); ?></th>
|
90 |
+
<td class="qlwapp-premium-field">
|
91 |
<b><?php esc_html_e( 'From', 'wp-whatsapp-chat' ); ?></b>
|
92 |
<input type="time" name="timefrom" placeholder="<?php echo esc_html( $button['timefrom'] ); ?>" value="<?php echo esc_html( $button['timefrom'] ); ?>" />
|
93 |
<b><?php esc_html_e( 'To', 'wp-whatsapp-chat' ); ?></b>
|
94 |
<input type="time" name="timeto" placeholder="<?php echo esc_html( $button['timeto'] ); ?>" value="<?php echo esc_html( $button['timeto'] ); ?>" />
|
95 |
<p class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></p>
|
96 |
+
</td>
|
97 |
</tr>
|
98 |
<tr>
|
99 |
+
<th scope="row"><?php esc_html_e( 'Timezone', 'wp-whatsapp-chat' ); ?></th>
|
100 |
+
<td class="qlwapp-premium-field">
|
101 |
<select name="timezone" aria-describedby="timezone-description" required="" class="qlwapp-select2">
|
102 |
+
<?php echo wp_timezone_choice( $button['timezone'], get_user_locale() ); ?>
|
103 |
</select>
|
104 |
<p class="description"><small><?php esc_html_e( 'Hide button if the user is out of the available hours.', 'wp-whatsapp-chat' ); ?></small></p>
|
105 |
<p class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></p>
|
106 |
+
</td>
|
107 |
</tr>
|
108 |
<tr>
|
109 |
+
<th scope="row"><?php esc_html_e( 'Available days', 'wp-whatsapp-chat' ); ?></th>
|
110 |
+
<td class="qlwapp-premium-field">
|
111 |
<select name="timedays[]" multiple style="height:100px;">
|
112 |
+
<option value="0" <?php echo in_array( '0', $button['timedays'] ) ? 'selected="selected"' : ''; ?>><?php esc_html_e( 'Sunday', 'wp-whatsapp-chat' ); ?></option>
|
113 |
+
<option value="1" <?php echo in_array( '1', $button['timedays'] ) ? 'selected="selected"' : ''; ?>><?php esc_html_e( 'Monday', 'wp-whatsapp-chat' ); ?></option>
|
114 |
+
<option value="2" <?php echo in_array( '2', $button['timedays'] ) ? 'selected="selected"' : ''; ?>><?php esc_html_e( 'Tuesday', 'wp-whatsapp-chat' ); ?></option>
|
115 |
+
<option value="3" <?php echo in_array( '3', $button['timedays'] ) ? 'selected="selected"' : ''; ?>><?php esc_html_e( 'Wednesday', 'wp-whatsapp-chat' ); ?></option>
|
116 |
+
<option value="4" <?php echo in_array( '4', $button['timedays'] ) ? 'selected="selected"' : ''; ?>><?php esc_html_e( 'Thursday', 'wp-whatsapp-chat' ); ?></option>
|
117 |
+
<option value="5" <?php echo in_array( '5', $button['timedays'] ) ? 'selected="selected"' : ''; ?>><?php esc_html_e( 'Friday', 'wp-whatsapp-chat' ); ?></option>
|
118 |
+
<option value="6" <?php echo in_array( '6', $button['timedays'] ) ? 'selected="selected"' : ''; ?>><?php esc_html_e( 'Saturday', 'wp-whatsapp-chat' ); ?></option>
|
119 |
</select>
|
120 |
<p class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></p>
|
121 |
+
</td>
|
122 |
+
</th>
|
123 |
</tr>
|
124 |
+
<tr>
|
125 |
+
<th scope="row">
|
126 |
+
<?php esc_html_e( 'Visibility', 'wp-whatsapp-chat' ); ?>
|
127 |
+
</th>
|
128 |
+
<td class="qlwapp-premium-field">
|
129 |
+
<select name="visibility" class="qlwapp-select2">
|
130 |
+
<option value="readonly" <?php selected( $button['visibility'], 'readonly' ); ?>><?php esc_html_e( 'Show the button as readonly', 'wp-whatsapp-chat' ); ?></option>
|
131 |
+
<option value="hidden" <?php selected( $button['visibility'], 'hidden' ); ?>><?php esc_html_e( 'Do not show the button', 'wp-whatsapp-chat' ); ?></option>
|
132 |
+
</select>
|
133 |
+
<p class="description hidden">
|
134 |
+
<small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small>
|
135 |
+
</p>
|
136 |
+
</td>
|
137 |
+
</tr>
|
138 |
+
</tbody>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
</table>
|
140 |
<?php wp_nonce_field( 'qlwapp_save_button', 'qlwapp_button_form_nonce' ); ?>
|
141 |
<p class="submit">
|
142 |
+
<?php submit_button( esc_html__( 'Save', 'wp-whatsapp-chat' ), 'primary', 'submit', false ); ?>
|
143 |
+
<span class="settings-save-status">
|
144 |
<span class="saved"><?php esc_html_e( 'Saved successfully!' ); ?></span>
|
145 |
<span class="spinner" style="float: none"></span>
|
146 |
+
</span>
|
147 |
</p>
|
148 |
+
</form>
|
149 |
</div>
|
includes/view/backend/pages/contacts.php
CHANGED
@@ -1,68 +1,84 @@
|
|
1 |
<div class="wrap about-wrap full-width-layout qlwrap">
|
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 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
66 |
</div>
|
67 |
|
68 |
-
<?php
|
1 |
<div class="wrap about-wrap full-width-layout qlwrap">
|
2 |
+
<form id="qlwapp_contacts_form" method="post">
|
3 |
+
<div class="submit qlwapp-premium-field">
|
4 |
+
<?php submit_button( esc_html__( '+ Contact', 'wp-whatsapp-chat' ), 'secondary', 'submit', false, array( 'id' => 'qlwapp_contact_add' ) ); ?>
|
5 |
+
<?php
|
6 |
+
submit_button(
|
7 |
+
esc_html__( 'Save reorder', 'wp-whatsapp-chat' ),
|
8 |
+
'primary',
|
9 |
+
'submit',
|
10 |
+
false,
|
11 |
+
array(
|
12 |
+
'id' => 'qlwapp_contact_order',
|
13 |
+
'disabled' => 'disabled',
|
14 |
+
)
|
15 |
+
);
|
16 |
+
?>
|
17 |
+
<span class="settings-save-status">
|
18 |
+
<span class="spinner"></span>
|
19 |
+
<span class="saved"><?php esc_html_e( 'Saved successfully!' ); ?></span>
|
20 |
+
</span>
|
21 |
+
</div>
|
22 |
|
23 |
+
<table id="qlwapp_contacts_table" class="form-table widefat striped">
|
24 |
+
<thead>
|
25 |
+
<tr>
|
26 |
+
<th style="text-align: center;"><?php esc_html_e( 'Order', 'wp-whatsapp-chat' ); ?></th>
|
27 |
+
<th><?php esc_html_e( 'Avatar', 'wp-whatsapp-chat' ); ?></th>
|
28 |
+
<th><?php esc_html_e( 'Phone', 'wp-whatsapp-chat' ); ?></th>
|
29 |
+
<th><?php esc_html_e( 'Name', 'wp-whatsapp-chat' ); ?></th>
|
30 |
+
<th><?php esc_html_e( 'Label', 'wp-whatsapp-chat' ); ?></th>
|
31 |
+
<th><?php esc_html_e( 'Chat', 'wp-whatsapp-chat' ); ?></th>
|
32 |
+
<th><?php esc_html_e( 'Message', 'wp-whatsapp-chat' ); ?></th>
|
33 |
+
<th><?php esc_html_e( 'Availability', 'wp-whatsapp-chat' ); ?></th>
|
34 |
+
<th><?php esc_html_e( 'Timezone', 'wp-whatsapp-chat' ); ?></th>
|
35 |
+
<th ><?php esc_html_e( 'Actions', 'wp-whatsapp-chat' ); ?></th>
|
36 |
+
</tr>
|
37 |
+
</thead>
|
38 |
+
<tbody class="ui-sortable">
|
39 |
+
<?php if ( count( $contacts ) ) : ?>
|
40 |
+
<?php
|
41 |
+
$position = 1;
|
42 |
+
foreach ( $contacts as $id => $contact ) {
|
43 |
+
?>
|
44 |
+
<tr class="
|
45 |
+
<?php
|
46 |
+
if ( $position > 1 ) {
|
47 |
+
echo 'qlwapp-premium-field';}
|
48 |
+
?>
|
49 |
+
" data-contact_id="<?php echo esc_attr( $id ); ?>" data-contact_position="<?php echo esc_attr( $position ); ?>">
|
50 |
+
<td class="sort ui-sortable-handle">
|
51 |
+
<div class="wc-item-reorder-nav">
|
52 |
+
<button type="button" class="wc-move-up " tabindex="-1" aria-hidden="true" aria-label="<?php // echo ///esc_attr(sprintf(__('Move the "%s" payment method up', 'wp-whatsapp-chat'), $contact['label'])); ?>"><?php esc_html_e( 'Move up', 'wp-whatsapp-chat' ); ?></button>
|
53 |
+
<button type="button" class="wc-move-down" tabindex="0" aria-hidden="false" aria-label="<?php // echo esc_attr(sprintf(__('Move the "%s" payment method down', 'wp-whatsapp-chat'), $field['label'])); ?>"><?php esc_html_e( 'Move down', 'wp-whatsapp-chat' ); ?></button>
|
54 |
+
<input type="hidden" name="contact_id[]" value="<?php echo esc_attr( $id ); ?>">
|
55 |
+
</div>
|
56 |
+
</td>
|
57 |
+
<td>
|
58 |
+
<img class="qlwapp-avatar" src="<?php echo esc_url( $contact['avatar'] ); ?>" alt="<?php echo esc_html( $contact['firstname'] . ', ' . $contact['lastname'] ); ?>" width="50" height="50" /> </td>
|
59 |
+
<td><?php echo qlwapp_format_phone( $contact['phone'] ); ?></td>
|
60 |
+
<td><?php echo esc_html( $contact['firstname'] . ', ' . $contact['lastname'] ); ?> </td>
|
61 |
+
<td><?php echo esc_html( $contact['label'] ); ?></td>
|
62 |
+
<td>
|
63 |
+
<i class="dashicons dashicons-<?php echo ( $contact['chat'] ? 'yes' : 'no' ); ?>"></i>
|
64 |
+
</td>
|
65 |
+
<td><?php echo wp_trim_words( substr( $contact['message'], 0, 36 ), 3 ); ?></td>
|
66 |
+
<td><?php echo sprintf( '%s to %s', $contact['timefrom'], $contact['timeto'] ); ?></td>
|
67 |
+
<td><?php echo esc_html( $contact['timezone'] ); ?></td>
|
68 |
+
<td>
|
69 |
+
<a class="qlwapp_settings_edit button" aria-label="<?php esc_html_e( 'Edit checkout field', 'wp-whatsapp-chat' ); ?>" href="javascript:;"><?php esc_html_e( 'Edit' ); ?></a>
|
70 |
+
<a class="qlwapp_settings_delete" aria-label="<?php esc_html_e( 'Edit checkout field', 'wp-whatsapp-chat' ); ?>" href="javascript:;"><?php esc_html_e( 'Delete' ); ?></a>
|
71 |
+
</td>
|
72 |
+
</tr>
|
73 |
+
<?php
|
74 |
+
$position++;
|
75 |
+
}
|
76 |
+
?>
|
77 |
+
</tbody>
|
78 |
+
<?php endif; ?>
|
79 |
+
</table>
|
80 |
+
<?php wp_nonce_field( 'qlwapp_delete_contact', 'qlwapp_delete_contact_nonce' ); ?>
|
81 |
+
</form>
|
82 |
</div>
|
83 |
|
84 |
+
<?php require_once 'modals/template-scripts.php'; ?>
|
includes/view/backend/pages/modals/contact/panel-contact.php
CHANGED
@@ -1,77 +1,79 @@
|
|
1 |
<div id="tab_panel_contact" class="panel qlwapp_options_panel ">
|
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 |
-
|
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 |
-
</div>
|
|
|
|
1 |
<div id="tab_panel_contact" class="panel qlwapp_options_panel ">
|
2 |
+
<div class="options_group">
|
3 |
+
<p class="form-field" style="
|
4 |
+
width: calc(50% - 30px);
|
5 |
+
float: left;
|
6 |
+
">
|
7 |
+
<label><?php esc_html_e( 'Firstname', 'wp-whatsapp-chat' ); ?></label>
|
8 |
+
<input type="text" name="firstname" placeholder="<?php echo esc_html( $contact_args['firstname'] ); ?>" value="{{data.firstname}}" />
|
9 |
+
</p>
|
10 |
+
<p class="form-field" style="
|
11 |
+
width: calc(50% - 30px);
|
12 |
+
float: right;
|
13 |
+
">
|
14 |
+
<label><?php esc_html_e( 'Lastname', 'wp-whatsapp-chat' ); ?></label>
|
15 |
+
<input type="text" name="lastname" placeholder="<?php echo esc_html( $contact_args['lastname'] ); ?>" value="{{data.lastname}}" />
|
16 |
+
</p>
|
17 |
+
</div>
|
18 |
+
<div class="options_group">
|
19 |
+
<p class="form-field" style="
|
20 |
+
width: calc(50% - 30px);
|
21 |
+
float: left;
|
22 |
+
">
|
23 |
+
<label><?php esc_html_e( 'Phone', 'wp-whatsapp-chat' ); ?></label>
|
24 |
+
<input type="text" name="phone" placeholder="<?php echo qlwapp_format_phone( $contact_args['phone'] ); ?>" value="{{data.phone}}" required="required" pattern="\d[0-9]{6,15}$" />
|
25 |
+
</p>
|
26 |
+
<p class="form-field" style="
|
27 |
+
width: calc(50% - 30px);
|
28 |
+
float: right;
|
29 |
+
">
|
30 |
+
<?php esc_html_e( 'Label', 'wp-whatsapp-chat' ); ?>
|
31 |
+
<input type="text" name="label" placeholder="<?php echo esc_html( $contact_args['label'] ); ?>" value="{{data.label}}" />
|
32 |
+
</p>
|
33 |
+
</div>
|
34 |
+
<div class="options_group">
|
35 |
+
<p class="form-field" style="
|
36 |
+
width: calc(50% - 30px);
|
37 |
+
float: left;
|
38 |
+
">
|
39 |
+
<label style="display: block"><?php esc_html_e( 'Available hours', 'wp-whatsapp-chat' ); ?></label>
|
40 |
+
<input type="time" name="timefrom" placeholder="<?php echo esc_html( $contact_args['timefrom'] ); ?>" value="{{data.timefrom}}" />
|
41 |
+
<?php esc_html_e( 'To', 'wp-whatsapp-chat' ); ?>
|
42 |
+
<input type="time" name="timeto" placeholder="<?php echo esc_html( $contact_args['timeto'] ); ?>" value="{{data.timeto}}" />
|
43 |
+
</p>
|
44 |
+
<p class="form-field" style="
|
45 |
+
width: calc(50% - 30px);
|
46 |
+
float: right;
|
47 |
+
">
|
48 |
+
<label><?php esc_html_e( 'Timezone', 'wp-whatsapp-chat' ); ?></label>
|
49 |
+
<select name="timezone" aria-describedby="timezone-description">
|
50 |
+
<?php echo preg_replace( '/(.*)value="([^"]*)"(.*)/', '$1value="$2"<# if ( data.timezone == "$2" ) { #> selected="selected"<# } #> $3', wp_timezone_choice( '__return_null' ) ); ?>
|
51 |
+
</select>
|
52 |
+
</p>
|
53 |
+
</div>
|
54 |
+
<div class="options_group">
|
55 |
+
<p class="form-field">
|
56 |
+
<label><?php esc_html_e( 'Visibility', 'wp-whatsapp-chat' ); ?></label>
|
57 |
+
<select name="visibility">
|
58 |
+
<option value="readonly" <# if( data.visibility=='readonly' ) { #> selected="selected"<# } #>><?php esc_html_e( 'Show the contact as readonly', 'wp-whatsapp-chat' ); ?></option>
|
59 |
+
<option value="hidden" <# if( data.visibility=='hidden' ) { #> selected="selected"<# } #>><?php esc_html_e( 'Do not show the contact', 'wp-whatsapp-chat' ); ?></option>
|
60 |
+
</select>
|
61 |
+
</p>
|
62 |
+
<p class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></p>
|
63 |
+
</div>
|
64 |
+
<div class="options_group">
|
65 |
+
<p class="form-field">
|
66 |
+
<label><?php esc_html_e( 'Available days', 'wp-whatsapp-chat' ); ?></label>
|
67 |
+
<select name="timedays[]" id="" multiple>
|
68 |
+
<option value="0" <# if( data.timedays.includes('0')==true ) { #> selected="selected"<# } #>><?php esc_html_e( 'Sunday', 'wp-whatsapp-chat' ); ?></option>
|
69 |
+
<option value="1" <# if( data.timedays.includes('1')==true ) { #> selected="selected"<# } #>><?php esc_html_e( 'Monday', 'wp-whatsapp-chat' ); ?></option>
|
70 |
+
<option value="2" <# if( data.timedays.includes('2')==true ) { #> selected="selected"<# } #>><?php esc_html_e( 'Tuesday', 'wp-whatsapp-chat' ); ?></option>
|
71 |
+
<option value="3" <# if( data.timedays.includes('3')==true ) { #> selected="selected"<# } #>><?php esc_html_e( 'Wednesday', 'wp-whatsapp-chat' ); ?></option>
|
72 |
+
<option value="4" <# if( data.timedays.includes('4')==true ) { #> selected="selected"<# } #>><?php esc_html_e( 'Thursday', 'wp-whatsapp-chat' ); ?></option>
|
73 |
+
<option value="5" <# if( data.timedays.includes('5')==true ) { #> selected="selected"<# } #>><?php esc_html_e( 'Friday', 'wp-whatsapp-chat' ); ?></option>
|
74 |
+
<option value="6" <# if( data.timedays.includes('6')==true ) { #> selected="selected"<# } #>><?php esc_html_e( 'Saturday', 'wp-whatsapp-chat' ); ?></option>
|
75 |
+
</select>
|
76 |
+
</p>
|
77 |
+
</div>
|
78 |
+
<div id="subpanel-contact-chat"></div>
|
79 |
+
</div>
|
readme.txt
CHANGED
@@ -5,8 +5,8 @@ Tags: whatsapp, whatsapp business, click to chat, whatsapp chat, whatsapp suppor
|
|
5 |
|
6 |
Requires at least: 4.6
|
7 |
Requires PHP: 5.6
|
8 |
-
Tested up to: 6.0
|
9 |
-
Stable tag: 6.0.
|
10 |
License: GPLv3
|
11 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
12 |
|
@@ -133,6 +133,9 @@ Don't use: +001-(555)1234567
|
|
133 |
|
134 |
== Changelog ==
|
135 |
|
|
|
|
|
|
|
136 |
= 6.0.8 =
|
137 |
* Fix. WordPress compatibility
|
138 |
|
5 |
|
6 |
Requires at least: 4.6
|
7 |
Requires PHP: 5.6
|
8 |
+
Tested up to: 6.0
|
9 |
+
Stable tag: 6.0.9
|
10 |
License: GPLv3
|
11 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
12 |
|
133 |
|
134 |
== Changelog ==
|
135 |
|
136 |
+
= 6.0.9 =
|
137 |
+
* Fix. WordPress compatibility
|
138 |
+
|
139 |
= 6.0.8 =
|
140 |
* Fix. WordPress compatibility
|
141 |
|
template/box.php
CHANGED
@@ -4,13 +4,13 @@
|
|
4 |
<div class="qlwapp-box">
|
5 |
<?php if ( ! empty( $box['header'] ) ) : ?>
|
6 |
<div class="qlwapp-header">
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
11 |
</div>
|
12 |
</div>
|
13 |
-
</div>
|
14 |
<?php endif; ?>
|
15 |
<div class="qlwapp-body">
|
16 |
<?php if ( isset( $contacts[0] ) ) : ?>
|
@@ -31,18 +31,18 @@
|
|
31 |
</div>
|
32 |
<?php if ( ! empty( $box['footer'] ) ) : ?>
|
33 |
<div class="qlwapp-footer">
|
34 |
-
|
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 |
-
|
42 |
<?php endif; ?>
|
43 |
<i class="qlwapp-close" data-action="close">×</i>
|
44 |
<?php if ( $button['text'] ) : ?>
|
45 |
-
|
46 |
<?php endif; ?>
|
47 |
</a>
|
48 |
</div>
|
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] ) ) : ?>
|
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>
|
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: 6.0.
|
8 |
* Author: QuadLayers
|
9 |
* Author URI: https://quadlayers.com
|
10 |
* License: GPLv3
|
@@ -18,7 +18,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
18 |
}
|
19 |
|
20 |
define( 'QLWAPP_PLUGIN_NAME', 'Social Chat' );
|
21 |
-
define( 'QLWAPP_PLUGIN_VERSION', '6.0.
|
22 |
define( 'QLWAPP_PLUGIN_FILE', __FILE__ );
|
23 |
define( 'QLWAPP_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR );
|
24 |
define( 'QLWAPP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
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: 6.0.9
|
8 |
* Author: QuadLayers
|
9 |
* Author URI: https://quadlayers.com
|
10 |
* License: GPLv3
|
18 |
}
|
19 |
|
20 |
define( 'QLWAPP_PLUGIN_NAME', 'Social Chat' );
|
21 |
+
define( 'QLWAPP_PLUGIN_VERSION', '6.0.9' );
|
22 |
define( 'QLWAPP_PLUGIN_FILE', __FILE__ );
|
23 |
define( 'QLWAPP_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR );
|
24 |
define( 'QLWAPP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|