Version Description
- Fix. WhatsApp premium compatibility
Download this release
Release Info
Developer | quadlayers |
Plugin | WhatsApp Chat WP |
Version | 6.1.8 |
Comparing to | |
See all releases |
Code changes from version 6.1.7 to 6.1.8
- includes/models/Button.php +6 -1
- includes/models/Contact.php +2 -0
- includes/models/QLWAPP_Model.php +54 -55
- includes/view/backend/pages/button.php +166 -144
- includes/view/backend/pages/modals/contact/panel-contact-chat.php +7 -6
- includes/view/backend/pages/modals/contact/panel-contact.php +67 -32
- readme.txt +5 -1
- template/box.php +1 -1
- wp-whatsapp-chat.php +2 -2
includes/models/Button.php
CHANGED
@@ -15,7 +15,9 @@ class QLWAPP_Button extends QLWAPP_Model {
|
|
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',
|
@@ -47,7 +49,10 @@ class QLWAPP_Button extends QLWAPP_Model {
|
|
47 |
if ( isset( $settings['phone'] ) ) {
|
48 |
$settings['phone'] = qlwapp_format_phone( $settings['phone'] );
|
49 |
}
|
50 |
-
|
|
|
|
|
|
|
51 |
return $settings;
|
52 |
}
|
53 |
|
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 |
+
'type' => 'phone', // here we define the type of button, can be 'phone' or 'group'
|
19 |
'phone' => QLWAPP_PHONE_NUMBER,
|
20 |
+
'group' => '',
|
21 |
'developer' => 'no',
|
22 |
'rounded' => 'yes',
|
23 |
'timefrom' => '00:00',
|
49 |
if ( isset( $settings['phone'] ) ) {
|
50 |
$settings['phone'] = qlwapp_format_phone( $settings['phone'] );
|
51 |
}
|
52 |
+
if (isset($settings['group'])) {
|
53 |
+
$settings['group'] = sanitize_url($settings['group']);
|
54 |
+
}
|
55 |
+
|
56 |
return $settings;
|
57 |
}
|
58 |
|
includes/models/Contact.php
CHANGED
@@ -18,7 +18,9 @@ class QLWAPP_Contact extends QLWAPP_Model {
|
|
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' ),
|
18 |
'chat' => true,
|
19 |
'auto_open' => false,
|
20 |
'avatar' => 'https://www.gravatar.com/avatar/00000000000000000000000000000000',
|
21 |
+
'type' => 'phone', // here we define the type of button, can be 'phone' or 'group'
|
22 |
'phone' => '',
|
23 |
+
'group' => '',
|
24 |
'firstname' => 'John',
|
25 |
'lastname' => 'Doe',
|
26 |
'label' => esc_html__( 'Support', 'wp-whatsapp-chat' ),
|
includes/models/QLWAPP_Model.php
CHANGED
@@ -1,73 +1,72 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
|
5 |
class QLWAPP_Model {
|
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 |
}
|
1 |
<?php
|
2 |
|
3 |
+
require_once QLWAPP_PLUGIN_DIR . 'includes/helpers.php';
|
4 |
|
5 |
class QLWAPP_Model {
|
6 |
|
7 |
+
protected $qlwapp = null;
|
8 |
|
9 |
+
function options() {
|
10 |
+
$options = array();
|
11 |
+
$options['box'] = array();
|
12 |
+
$options['button'] = array();
|
13 |
+
$options['chat'] = array();
|
14 |
+
$options['contacts'] = array();
|
15 |
+
$options['display'] = array();
|
16 |
+
$options['scheme'] = array();
|
17 |
+
$options['woocommerce'] = array();
|
18 |
+
$options['license'] = array();
|
19 |
+
$options['settings'] = array();
|
20 |
+
return $options;
|
21 |
+
}
|
|
|
22 |
|
23 |
+
function get() {
|
24 |
|
25 |
+
$result = $this->get_all( $this->table );
|
26 |
+
return wp_parse_args( $result, $this->get_args() );
|
27 |
+
}
|
28 |
|
29 |
+
public function sanitize_value_data( $value_data, $args ) {
|
30 |
|
31 |
+
foreach ( $value_data as $key => $value ) {
|
32 |
|
33 |
+
if ( array_key_exists( $key, $args ) ) {
|
34 |
|
35 |
+
$type = $args[ $key ];
|
36 |
|
37 |
+
if ( is_null( $type ) && ! is_numeric( $value ) ) {
|
38 |
+
$value_data[ $key ] = intval( $value );
|
39 |
+
} elseif ( is_bool( $type ) && ! is_bool( $value ) ) {
|
40 |
+
$value_data[ $key ] = ( $value === 'true' || $value === '1' || $value === 1 );
|
41 |
+
} elseif ( is_string( $type ) && ! is_string( $value ) ) {
|
42 |
+
$value_data[ $key ] = strval( $value );
|
43 |
+
} elseif ( is_array( $type ) && ! is_array( $value ) ) {
|
44 |
+
$value_data[ $key ] = (array) $type;
|
45 |
+
}
|
46 |
+
} else {
|
47 |
+
unset( $value_data[ $key ] );
|
48 |
+
}
|
49 |
+
}
|
50 |
+
return $value_data;
|
51 |
+
}
|
52 |
|
53 |
+
function save_all( $qlwapp ) {
|
54 |
+
return update_option( 'qlwapp', $qlwapp );
|
55 |
+
}
|
56 |
|
57 |
+
function save_data( $key = null, $data = null ) {
|
58 |
+
$qlwapp = get_option( 'qlwapp' );
|
59 |
+
$qlwapp[ $key ] = $data;
|
60 |
+
return $this->save_all( $qlwapp );
|
61 |
+
}
|
62 |
|
63 |
+
function get_all( $key ) {
|
64 |
+
if ( ! $this->qlwapp ) {
|
65 |
+
$this->qlwapp = get_option( 'qlwapp', array() );
|
66 |
+
}
|
67 |
+
$this->qlwapp = wp_parse_args( $this->qlwapp, $this->options() );
|
68 |
+
$res = $this->qlwapp[ $key ];
|
69 |
+
return $res;
|
70 |
+
}
|
71 |
|
72 |
}
|
includes/view/backend/pages/button.php
CHANGED
@@ -1,149 +1,171 @@
|
|
1 |
<div class="wrap about-wrap full-width-layout qlwrap">
|
2 |
<form id="qlwapp_button_form" method="post" action="options.php">
|
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 |
</span>
|
32 |
-
|
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>
|
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">
|
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">
|
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">
|
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">
|
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 |
+
|
74 |
+
<tr class="qlwapp-premium-field">
|
75 |
+
<th scope="row"><?php esc_html_e( 'Type', 'wp-whatsapp-chat' ); ?></th>
|
76 |
+
<td>
|
77 |
+
<select name="type" class="<?php echo esc_attr( $button['box'] == 'yes' ? 'disabled' : '' ); ?>">
|
78 |
+
<option value="phone" <?php selected( $button['type'], 'phone' ); ?>><?php esc_html_e( 'Phone Number', 'wp-whatsapp-chat' ); ?></option>
|
79 |
+
<option value="group" <?php selected( $button['type'], 'group' ); ?>><?php esc_html_e( 'Group Link', 'wp-whatsapp-chat' ); ?></option>
|
80 |
+
</select>
|
81 |
+
</td>
|
82 |
+
<p class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></p>
|
83 |
+
</tr>
|
84 |
+
|
85 |
+
<tr class="<?php echo $button['type'] != 'phone' ? 'hidden' : ''; ?>">
|
86 |
+
<th scope="row"><?php esc_html_e( 'Phone', 'wp-whatsapp-chat' ); ?></th>
|
87 |
+
<td>
|
88 |
+
<input type="text" name="phone" placeholder="" value="<?php echo esc_attr( $button['phone'] ); ?>" class="qlwapp-input <?php echo esc_attr( $button['box'] == 'yes' ? 'disabled' : '' ); ?>" />
|
89 |
+
<p class="description"><?php esc_html_e( 'Full phone number in international format. Only nnumbers.', 'wp-whatsapp-chat' ); ?></p>
|
90 |
+
</td>
|
91 |
+
</tr>
|
92 |
+
|
93 |
+
<tr class="<?php echo $button['type'] != 'group' ? 'hidden' : ''; ?>">
|
94 |
+
<th scope="row"><?php esc_html_e( 'Group', 'wp-whatsapp-chat' ); ?></th>
|
95 |
+
<td>
|
96 |
+
<input type="text" name="group" placeholder="" value="<?php echo esc_attr( $button['group'] ); ?>" class="qlwapp-input <?php echo esc_attr( $button['box'] == 'yes' ? 'disabled' : '' ); ?>" />
|
97 |
+
<p class="description"><?php esc_html_e( '', 'wp-whatsapp-chat' ); ?></p>
|
98 |
+
</td>
|
99 |
+
</tr>
|
100 |
+
|
101 |
+
<tr>
|
102 |
+
<th scope="row"><?php esc_html_e( 'Message', 'wp-whatsapp-chat' ); ?></th>
|
103 |
+
<td>
|
104 |
+
<textarea class="<?php echo $button['type'] == 'group' ? 'disabled' : ''; ?>" 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>
|
105 |
+
<p class="description"><?php esc_html_e( 'Message that will automatically appear in the text field of a chat.:', 'wp-whatsapp-chat' ); ?></p>
|
106 |
+
<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>
|
107 |
+
</td>
|
108 |
+
</tr>
|
109 |
+
|
110 |
+
<tr>
|
111 |
+
<th scope="row"><?php esc_html_e( 'Schedule', 'wp-whatsapp-chat' ); ?></th>
|
112 |
+
<td class="qlwapp-premium-field">
|
113 |
+
<b><?php esc_html_e( 'From', 'wp-whatsapp-chat' ); ?></b>
|
114 |
+
<input type="time" name="timefrom" placeholder="<?php echo esc_html( $button['timefrom'] ); ?>" value="<?php echo esc_html( $button['timefrom'] ); ?>" />
|
115 |
+
<b><?php esc_html_e( 'To', 'wp-whatsapp-chat' ); ?></b>
|
116 |
+
<input type="time" name="timeto" placeholder="<?php echo esc_html( $button['timeto'] ); ?>" value="<?php echo esc_html( $button['timeto'] ); ?>" />
|
117 |
+
<p class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></p>
|
118 |
+
</td>
|
119 |
+
</tr>
|
120 |
+
<tr>
|
121 |
+
<th scope="row"><?php esc_html_e( 'Timezone', 'wp-whatsapp-chat' ); ?></th>
|
122 |
+
<td class="qlwapp-premium-field">
|
123 |
+
<select name="timezone" aria-describedby="timezone-description" required="">
|
124 |
+
<?php echo wp_timezone_choice( $button['timezone'], get_user_locale() ); ?>
|
125 |
+
</select>
|
126 |
+
<p class="description"><small><?php esc_html_e( 'Hide button if the user is out of the available hours.', 'wp-whatsapp-chat' ); ?></small></p>
|
127 |
+
<p class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></p>
|
128 |
+
</td>
|
129 |
+
</tr>
|
130 |
+
<tr>
|
131 |
+
<th scope="row"><?php esc_html_e( 'Available days', 'wp-whatsapp-chat' ); ?></th>
|
132 |
+
<td class="qlwapp-premium-field">
|
133 |
+
<select name="timedays[]" multiple style="height:100px;">
|
134 |
+
<option value="0" <?php echo in_array( '0', $button['timedays'] ) ? 'selected="selected"' : ''; ?>><?php esc_html_e( 'Sunday', 'wp-whatsapp-chat' ); ?></option>
|
135 |
+
<option value="1" <?php echo in_array( '1', $button['timedays'] ) ? 'selected="selected"' : ''; ?>><?php esc_html_e( 'Monday', 'wp-whatsapp-chat' ); ?></option>
|
136 |
+
<option value="2" <?php echo in_array( '2', $button['timedays'] ) ? 'selected="selected"' : ''; ?>><?php esc_html_e( 'Tuesday', 'wp-whatsapp-chat' ); ?></option>
|
137 |
+
<option value="3" <?php echo in_array( '3', $button['timedays'] ) ? 'selected="selected"' : ''; ?>><?php esc_html_e( 'Wednesday', 'wp-whatsapp-chat' ); ?></option>
|
138 |
+
<option value="4" <?php echo in_array( '4', $button['timedays'] ) ? 'selected="selected"' : ''; ?>><?php esc_html_e( 'Thursday', 'wp-whatsapp-chat' ); ?></option>
|
139 |
+
<option value="5" <?php echo in_array( '5', $button['timedays'] ) ? 'selected="selected"' : ''; ?>><?php esc_html_e( 'Friday', 'wp-whatsapp-chat' ); ?></option>
|
140 |
+
<option value="6" <?php echo in_array( '6', $button['timedays'] ) ? 'selected="selected"' : ''; ?>><?php esc_html_e( 'Saturday', 'wp-whatsapp-chat' ); ?></option>
|
141 |
+
</select>
|
142 |
+
<p class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></p>
|
143 |
+
</td>
|
144 |
+
</th>
|
145 |
+
</tr>
|
146 |
+
<tr>
|
147 |
+
<th scope="row">
|
148 |
+
<?php esc_html_e( 'Visibility', 'wp-whatsapp-chat' ); ?>
|
149 |
+
</th>
|
150 |
+
<td class="qlwapp-premium-field">
|
151 |
+
<select name="visibility">
|
152 |
+
<option value="readonly" <?php selected( $button['visibility'], 'readonly' ); ?>><?php esc_html_e( 'Show the button as readonly', 'wp-whatsapp-chat' ); ?></option>
|
153 |
+
<option value="hidden" <?php selected( $button['visibility'], 'hidden' ); ?>><?php esc_html_e( 'Do not show the button', 'wp-whatsapp-chat' ); ?></option>
|
154 |
+
</select>
|
155 |
+
<p class="description hidden">
|
156 |
+
<small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small>
|
157 |
+
</p>
|
158 |
+
</td>
|
159 |
+
</tr>
|
160 |
+
</tbody>
|
161 |
+
</table>
|
162 |
+
<?php wp_nonce_field( 'qlwapp_save_button', 'qlwapp_button_form_nonce' ); ?>
|
163 |
+
<p class="submit">
|
164 |
+
<?php submit_button( esc_html__( 'Save', 'wp-whatsapp-chat' ), 'primary', 'submit', false ); ?>
|
165 |
+
<span class="settings-save-status">
|
166 |
+
<span class="saved"><?php esc_html_e( 'Saved successfully!' ); ?></span>
|
167 |
+
<span class="spinner" style="float: none"></span>
|
168 |
</span>
|
169 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
</form>
|
171 |
</div>
|
includes/view/backend/pages/modals/contact/panel-contact-chat.php
CHANGED
@@ -12,12 +12,13 @@
|
|
12 |
</p>
|
13 |
</div>
|
14 |
<div class="options_group qlwapp-premium-field">
|
|
|
15 |
<p class="form-field">
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
</p>
|
23 |
</div>
|
12 |
</p>
|
13 |
</div>
|
14 |
<div class="options_group qlwapp-premium-field">
|
15 |
+
{{data.chat}}
|
16 |
<p class="form-field">
|
17 |
+
<label><?php esc_html_e( 'Chat', 'wp-whatsapp-chat' ); ?></label>
|
18 |
+
<input type="radio" class="media-modal-change media-modal-subview" name="chat" value="1" <# if(data.chat) {#> checked <#}#> />
|
19 |
+
<label><?php esc_html_e( 'Enabled', 'wp-whatsapp-chat' ); ?></label>
|
20 |
+
<input type="radio" class="media-modal-change media-modal-subview" name="chat" value="0" <# if(data.chat==false) {#> checked <#}#> />
|
21 |
+
<label><?php esc_html_e( 'Disabled', 'wp-whatsapp-chat' ); ?></label>
|
22 |
+
<span style="float: right;" class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></span>
|
23 |
</p>
|
24 |
</div>
|
includes/view/backend/pages/modals/contact/panel-contact.php
CHANGED
@@ -4,62 +4,75 @@
|
|
4 |
width: calc(50% - 30px);
|
5 |
float: left;
|
6 |
">
|
7 |
-
|
8 |
-
|
9 |
</p>
|
10 |
<p class="form-field" style="
|
11 |
width: calc(50% - 30px);
|
12 |
float: right;
|
13 |
">
|
14 |
-
|
15 |
-
|
16 |
</p>
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
25 |
</p>
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
</p>
|
33 |
-
|
34 |
-
|
35 |
<p class="form-field" style="
|
36 |
width: calc(50% - 30px);
|
37 |
float: left;
|
38 |
">
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
</p>
|
44 |
<p class="form-field" style="
|
45 |
width: calc(50% - 30px);
|
46 |
float: right;
|
47 |
">
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
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">
|
@@ -75,5 +88,27 @@
|
|
75 |
</select>
|
76 |
</p>
|
77 |
</div>
|
78 |
-
<div
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
</div>
|
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 |
+
|
19 |
+
<div class="options_group qlwapp-premium-field">
|
20 |
+
<p class="form-field">
|
21 |
+
<label><?php esc_html_e( 'Group', 'wp-whatsapp-chat' ); ?></label>
|
22 |
+
<input type="radio" class="media-modal-change media-modal-subview2" name="type" value="phone" <# if(data.type=='phone') {#> checked <#}#> />
|
23 |
+
<label><?php esc_html_e( 'Phone', 'wp-whatsapp-chat' ); ?></label>
|
24 |
+
<input type="radio" class="media-modal-change media-modal-subview2" name="type" value="group" <# if(data.type=='group') {#> checked <#}#> />
|
25 |
+
<label><?php esc_html_e( 'Group', 'wp-whatsapp-chat' ); ?></label>
|
26 |
+
<span style="float: right;" class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></span>
|
27 |
</p>
|
28 |
+
</div>
|
29 |
+
|
30 |
+
<div class="options_group">
|
31 |
+
<# if(data.type == 'phone' ) { #>
|
32 |
+
<p class="form-field" style="width: calc(50% - 30px);float: left;">
|
33 |
+
<label><?php esc_html_e( 'Phone', 'wp-whatsapp-chat' ); ?></label>
|
34 |
+
<input type="text" name="phone" placeholder="<?php echo qlwapp_format_phone( $contact_args['phone'] ); ?>" value="{{data.phone}}" pattern="\d[0-9]{6,15}$" />
|
35 |
+
</p>
|
36 |
+
<# } else { #>
|
37 |
+
<p class="form-field" style="width: calc(50% - 30px);float: left;">
|
38 |
+
<label><?php esc_html_e( 'Group', 'wp-whatsapp-chat' ); ?></label>
|
39 |
+
<input type="text" name="group" placeholder="<?php echo esc_url( $contact_args['group'] ); ?>" value="{{data.group}}" />
|
40 |
+
</p>
|
41 |
+
<# } #>
|
42 |
+
<p class="form-field" style="width: calc(50% - 30px); float: right;">
|
43 |
+
<?php esc_html_e( 'Label', 'wp-whatsapp-chat' ); ?>
|
44 |
+
<input type="text" name="label" placeholder="<?php echo esc_html( $contact_args['label'] ); ?>" value="{{data.label}}" />
|
45 |
</p>
|
46 |
+
</div>
|
47 |
+
<div class="options_group">
|
48 |
<p class="form-field" style="
|
49 |
width: calc(50% - 30px);
|
50 |
float: left;
|
51 |
">
|
52 |
+
<label style="display: block"><?php esc_html_e( 'Available hours', 'wp-whatsapp-chat' ); ?></label>
|
53 |
+
<input type="time" name="timefrom" placeholder="<?php echo esc_html( $contact_args['timefrom'] ); ?>" value="{{data.timefrom}}" />
|
54 |
+
<?php esc_html_e( 'To', 'wp-whatsapp-chat' ); ?>
|
55 |
+
<input type="time" name="timeto" placeholder="<?php echo esc_html( $contact_args['timeto'] ); ?>" value="{{data.timeto}}" />
|
56 |
</p>
|
57 |
<p class="form-field" style="
|
58 |
width: calc(50% - 30px);
|
59 |
float: right;
|
60 |
">
|
61 |
+
<label><?php esc_html_e( 'Timezone', 'wp-whatsapp-chat' ); ?></label>
|
62 |
+
<select name="timezone" aria-describedby="timezone-description">
|
63 |
+
<?php echo preg_replace( '/(.*)value="([^"]*)"(.*)/', '$1value="$2"<# if ( data.timezone == "$2" ) { #> selected="selected"<# } #> $3', wp_timezone_choice( '__return_null' ) ); ?>
|
64 |
+
</select>
|
65 |
</p>
|
66 |
</div>
|
67 |
+
<div class="options_group qlwapp-premium-field">
|
68 |
<p class="form-field">
|
69 |
<label><?php esc_html_e( 'Visibility', 'wp-whatsapp-chat' ); ?></label>
|
70 |
<select name="visibility">
|
71 |
<option value="readonly" <# if( data.visibility=='readonly' ) { #> selected="selected"<# } #>><?php esc_html_e( 'Show the contact as readonly', 'wp-whatsapp-chat' ); ?></option>
|
72 |
<option value="hidden" <# if( data.visibility=='hidden' ) { #> selected="selected"<# } #>><?php esc_html_e( 'Do not show the contact', 'wp-whatsapp-chat' ); ?></option>
|
73 |
+
</select>
|
74 |
+
<span class="description hidden"><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small>
|
75 |
</p>
|
|
|
76 |
</div>
|
77 |
<div class="options_group">
|
78 |
<p class="form-field">
|
88 |
</select>
|
89 |
</p>
|
90 |
</div>
|
91 |
+
<div class="options_group qlwapp-premium-field">
|
92 |
+
<p class="form-field">
|
93 |
+
<label><?php esc_html_e( 'Message', 'wp-whatsapp-chat' ); ?></label>
|
94 |
+
<textarea style="width:100%" name="message">{{ _.escapeHtml(data.message)}}</textarea>
|
95 |
+
<# if(data.chat == false) { #>
|
96 |
+
<span class="description"><small><?php esc_html_e( 'Default message sent to the contact number.', 'wp-whatsapp-chat' ); ?></small></span>
|
97 |
+
<# } else { #>
|
98 |
+
<span class="description"><small><?php esc_html_e( 'Welcome message sent to the user in the chat box.', 'wp-whatsapp-chat' ); ?></small></span>
|
99 |
+
<# } #>
|
100 |
+
<br/>
|
101 |
+
<span class="description"><small><?php esc_html_e( 'You can use this vars:', 'wp-whatsapp-chat' ); ?><code><?php echo esc_html( qlwapp_get_replacements_text() ); ?></code></small></span>
|
102 |
+
</p>
|
103 |
+
</div>
|
104 |
+
<div class="options_group qlwapp-premium-field">
|
105 |
+
<p class="form-field">
|
106 |
+
<label><?php esc_html_e( 'Chat', 'wp-whatsapp-chat' ); ?></label>
|
107 |
+
<input type="radio" class="media-modal-change media-modal-subview2" name="chat" value="1" <# if(data.chat) {#> checked <#}#> />
|
108 |
+
<label><?php esc_html_e( 'Enabled', 'wp-whatsapp-chat' ); ?></label>
|
109 |
+
<input type="radio" class="media-modal-change media-modal-subview2" name="chat" value="0" <# if(data.chat==false) {#> checked <#}#> />
|
110 |
+
<label><?php esc_html_e( 'Disabled', 'wp-whatsapp-chat' ); ?></label>
|
111 |
+
<span style="float: right;" class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></span>
|
112 |
+
</p>
|
113 |
+
</div>
|
114 |
</div>
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: whatsapp, whatsapp business, click to chat, whatsapp chat, woocommerce wha
|
|
5 |
Requires at least: 4.6
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 6.0
|
8 |
-
Stable tag: 6.1.
|
9 |
License: GPLv3
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -84,6 +84,7 @@ Finally, we’ve included an option that allows you to select between more than
|
|
84 |
> * Display WhatsApp Contacts business hours
|
85 |
> * Google Analytics v3 events
|
86 |
> * Google Analytics v4 events
|
|
|
87 |
|
88 |
== WhatsApp Button Installation ==
|
89 |
1. Go to the Plugins Menu in WordPress
|
@@ -134,6 +135,9 @@ Don't use: +001-(555)1234567
|
|
134 |
|
135 |
== Changelog ==
|
136 |
|
|
|
|
|
|
|
137 |
= 6.1.7 =
|
138 |
* Fix. WhatsApp premium compatibility
|
139 |
|
5 |
Requires at least: 4.6
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 6.0
|
8 |
+
Stable tag: 6.1.8
|
9 |
License: GPLv3
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
84 |
> * Display WhatsApp Contacts business hours
|
85 |
> * Google Analytics v3 events
|
86 |
> * Google Analytics v4 events
|
87 |
+
> * WhatsApp group support
|
88 |
|
89 |
== WhatsApp Button Installation ==
|
90 |
1. Go to the Plugins Menu in WordPress
|
135 |
|
136 |
== Changelog ==
|
137 |
|
138 |
+
= 6.1.8 =
|
139 |
+
* Fix. WhatsApp premium compatibility
|
140 |
+
|
141 |
= 6.1.7 =
|
142 |
* Fix. WhatsApp premium compatibility
|
143 |
|
template/box.php
CHANGED
@@ -37,7 +37,7 @@
|
|
37 |
</div>
|
38 |
<?php endif; ?>
|
39 |
|
40 |
-
<a class="
|
41 |
<?php if ($button['icon']) : ?>
|
42 |
<i class="qlwapp-icon <?php echo esc_attr($button['icon']); ?>"></i>
|
43 |
<?php endif; ?>
|
37 |
</div>
|
38 |
<?php endif; ?>
|
39 |
|
40 |
+
<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">
|
41 |
<?php if ($button['icon']) : ?>
|
42 |
<i class="qlwapp-icon <?php echo esc_attr($button['icon']); ?>"></i>
|
43 |
<?php endif; ?>
|
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.1.
|
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.1.
|
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.1.8
|
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.1.8' );
|
22 |
define( 'QLWAPP_PLUGIN_FILE', __FILE__ );
|
23 |
define( 'QLWAPP_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR );
|
24 |
define( 'QLWAPP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|