Version Description
- Fix. WhatsApp premium compatibility
- Fix. Styles fixes
Download this release
Release Info
Developer | quadlayers |
Plugin | WhatsApp Chat WP |
Version | 6.1.0 |
Comparing to | |
See all releases |
Code changes from version 6.0.9 to 6.1.0
- includes/frontend.php +4 -41
- includes/models/Scheme.php +21 -22
- includes/view/backend/pages/scheme.php +92 -80
- readme.txt +5 -1
- wp-whatsapp-chat.php +2 -2
includes/frontend.php
CHANGED
@@ -47,51 +47,14 @@ if ( ! class_exists( 'QLWAPP_Frontend' ) ) {
|
|
47 |
unset( $scheme['_scheme_form_nonce'] );
|
48 |
foreach ( $scheme as $key => $value ) {
|
49 |
if ( $value != '' ) {
|
|
|
|
|
|
|
50 |
printf( '--%s-scheme-%s:%s;', QLWAPP_DOMAIN, esc_attr( $key ), esc_attr( $value ) );
|
51 |
}
|
52 |
}
|
53 |
?>
|
54 |
-
}
|
55 |
-
|
56 |
-
<?php
|
57 |
-
if ( $scheme['font-family'] ) :
|
58 |
-
?>
|
59 |
-
#qlwapp {
|
60 |
-
font-family: var(--qlwapp-scheme-font-family);
|
61 |
-
}
|
62 |
-
|
63 |
-
<?php endif; ?>
|
64 |
-
<?php
|
65 |
-
if ( $scheme['font-size'] ) :
|
66 |
-
?>
|
67 |
-
#qlwapp {
|
68 |
-
font-size: calc(var(--qlwapp-scheme-font-size)*1px);
|
69 |
-
}
|
70 |
-
|
71 |
-
<?php endif; ?>
|
72 |
-
<?php
|
73 |
-
if ( $scheme['brand'] ) :
|
74 |
-
?>
|
75 |
-
#qlwapp .qlwapp-toggle,
|
76 |
-
#qlwapp .qlwapp-box .qlwapp-header,
|
77 |
-
#qlwapp .qlwapp-box .qlwapp-user,
|
78 |
-
#qlwapp .qlwapp-box .qlwapp-user:before {
|
79 |
-
background-color: var(--qlwapp-scheme-brand);
|
80 |
-
}
|
81 |
-
|
82 |
-
<?php endif; ?>
|
83 |
-
<?php
|
84 |
-
if ( $scheme['text'] ) :
|
85 |
-
?>
|
86 |
-
#qlwapp .qlwapp-toggle,
|
87 |
-
#qlwapp .qlwapp-toggle .qlwapp-icon,
|
88 |
-
#qlwapp .qlwapp-toggle .qlwapp-text,
|
89 |
-
#qlwapp .qlwapp-box .qlwapp-header,
|
90 |
-
#qlwapp .qlwapp-box .qlwapp-user {
|
91 |
-
color: var(--qlwapp-scheme-text);
|
92 |
-
}
|
93 |
-
|
94 |
-
<?php endif; ?>
|
95 |
</style>
|
96 |
<?php
|
97 |
}
|
47 |
unset( $scheme['_scheme_form_nonce'] );
|
48 |
foreach ( $scheme as $key => $value ) {
|
49 |
if ( $value != '' ) {
|
50 |
+
if ( is_numeric( $value ) ) {
|
51 |
+
$value = "{$value}px";
|
52 |
+
}
|
53 |
printf( '--%s-scheme-%s:%s;', QLWAPP_DOMAIN, esc_attr( $key ), esc_attr( $value ) );
|
54 |
}
|
55 |
}
|
56 |
?>
|
57 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
</style>
|
59 |
<?php
|
60 |
}
|
includes/models/Scheme.php
CHANGED
@@ -1,30 +1,29 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
|
5 |
-
class QLWAPP_Scheme extends QLWAPP_Model
|
6 |
-
{
|
7 |
|
8 |
-
protected $table = 'scheme';
|
9 |
|
10 |
-
|
11 |
-
{
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
}
|
30 |
}
|
1 |
<?php
|
2 |
|
3 |
+
require_once QLWAPP_PLUGIN_DIR . 'includes/models/QLWAPP_Model.php';
|
4 |
|
5 |
+
class QLWAPP_Scheme extends QLWAPP_Model {
|
|
|
6 |
|
|
|
7 |
|
8 |
+
protected $table = 'scheme';
|
|
|
9 |
|
10 |
+
function get_args() {
|
11 |
+
$args = array(
|
12 |
+
'font-family' => 'inherit',
|
13 |
+
'font-size' => '18',
|
14 |
+
'icon-size' => '60',
|
15 |
+
'icon-font-size' => '24',
|
16 |
+
'brand' => '',
|
17 |
+
'text' => '',
|
18 |
+
'link' => '',
|
19 |
+
'message' => '',
|
20 |
+
'label' => '',
|
21 |
+
'name' => '',
|
22 |
+
);
|
23 |
+
return $args;
|
24 |
+
}
|
25 |
|
26 |
+
function save( $scheme = null ) {
|
27 |
+
return parent::save_data( $this->table, $scheme );
|
28 |
+
}
|
|
|
29 |
}
|
includes/view/backend/pages/scheme.php
CHANGED
@@ -1,81 +1,93 @@
|
|
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 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<div class="wrap about-wrap full-width-layout qlwrap">
|
2 |
+
<form method="post" id="qlwapp_scheme_form">
|
3 |
+
<table class="form-table">
|
4 |
+
<tbody>
|
5 |
+
<tr>
|
6 |
+
<th scope="row"><?php esc_html_e( 'Font Family', 'wp-whatsapp-chat' ); ?></th>
|
7 |
+
<td>
|
8 |
+
<select placeholder="<?php esc_html_e( 'Web Default', 'wp-whatsapp-chat' ); ?>" name="font-family" value="<?php echo esc_attr( $scheme['font-family'] ); ?>">
|
9 |
+
<option value="inherit" <?php selected( $scheme['font-family'], 'inherit' ); ?>><?php esc_html_e( 'Web Default', 'wp-whatsapp-chat' ); ?></option>
|
10 |
+
<option value="Arial" <?php selected( $scheme['font-family'], 'Arial' ); ?>>Arial (sans-serif)</option>
|
11 |
+
<option value="Verdana" <?php selected( $scheme['font-family'], 'Verdana' ); ?>>Verdana (sans-serif)</option>
|
12 |
+
<option value="Helvetica" <?php selected( $scheme['font-family'], 'Helvetica' ); ?>>Helvetica (sans-serif)</option>
|
13 |
+
<option value="Tahoma" <?php selected( $scheme['font-family'], 'Tahoma' ); ?>>Tahoma (sans-serif)</option>
|
14 |
+
<option value="Trebuchet MS" <?php selected( $scheme['font-family'], 'Trebuchet MS' ); ?>>Trebuchet MS (sans-serif)</option>
|
15 |
+
<option value="Times New Roman" <?php selected( $scheme['font-family'], 'Times New Roman' ); ?>>Times New Roman (serif)</option>
|
16 |
+
<option value="Georgia" <?php selected( $scheme['font-family'], 'Georgia' ); ?>>Georgia (serif)</option>
|
17 |
+
<option value="Garamond" <?php selected( $scheme['font-family'], 'Garamond' ); ?>>Garamond (serif)</option>
|
18 |
+
<option value="Courier New" <?php selected( $scheme['font-family'], 'Courier New' ); ?>>Courier New (monospace)</option>
|
19 |
+
<option value="Brush Script MT" <?php selected( $scheme['font-family'], 'Brush Script MT' ); ?>>Brush Script MT (cursive)</option>
|
20 |
+
<option value="Calibri" <?php selected( $scheme['font-family'], 'Calibri' ); ?>>Calibri (sans-serif)</option>
|
21 |
+
</select>
|
22 |
+
</td>
|
23 |
+
</tr>
|
24 |
+
<tr>
|
25 |
+
<th scope="row"><?php esc_html_e( 'Font Size', 'wp-whatsapp-chat' ); ?></th>
|
26 |
+
<td>
|
27 |
+
<input placeholder="<?php esc_html_e( 'In pixels', 'wp-whatsapp-chat' ); ?>" type="number" name="font-size" value="<?php echo esc_attr( $scheme['font-size'] ); ?>" />
|
28 |
+
</td>
|
29 |
+
</tr>
|
30 |
+
<tr>
|
31 |
+
<th scope="row"><?php esc_html_e( 'Background', 'wp-whatsapp-chat' ); ?></th>
|
32 |
+
<td>
|
33 |
+
<input class="qlwapp-color-field" type="text" name="brand" value="<?php echo esc_attr( $scheme['brand'] ); ?>" />
|
34 |
+
</td>
|
35 |
+
</tr>
|
36 |
+
<tr>
|
37 |
+
<th scope="row"><?php esc_html_e( 'Color', 'wp-whatsapp-chat' ); ?></th>
|
38 |
+
<td>
|
39 |
+
<input class="qlwapp-color-field" type="text" name="text" value="<?php echo esc_attr( $scheme['text'] ); ?>" />
|
40 |
+
</td>
|
41 |
+
</tr>
|
42 |
+
<tr class="qlwapp-premium-field">
|
43 |
+
<th scope="row"><?php esc_html_e( 'Icon Size', 'wp-whatsapp-chat' ); ?></th>
|
44 |
+
<td>
|
45 |
+
<input placeholder="<?php esc_html_e( 'In pixels', 'wp-whatsapp-chat' ); ?>" type="number" name="icon-size" value="<?php echo esc_attr( $scheme['icon-size'] ); ?>" />
|
46 |
+
</td>
|
47 |
+
</tr>
|
48 |
+
<tr class="qlwapp-premium-field">
|
49 |
+
<th scope="row"><?php esc_html_e( 'Icon Font Size', 'wp-whatsapp-chat' ); ?></th>
|
50 |
+
<td>
|
51 |
+
<input placeholder="<?php esc_html_e( 'In pixels', 'wp-whatsapp-chat' ); ?>" type="number" name="icon-font-size" value="<?php echo esc_attr( $scheme['icon-font-size'] ); ?>" />
|
52 |
+
</td>
|
53 |
+
</tr>
|
54 |
+
<tr class="qlwapp-premium-field">
|
55 |
+
<th scope="row"><?php esc_html_e( 'Link', 'wp-whatsapp-chat' ); ?></th>
|
56 |
+
<td>
|
57 |
+
<input class="qlwapp-color-field" type="link" name="link" value="<?php echo esc_attr( $scheme['link'] ); ?>" />
|
58 |
+
<p class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></p>
|
59 |
+
</td>
|
60 |
+
</tr>
|
61 |
+
<tr class="qlwapp-premium-field">
|
62 |
+
<th scope="row"><?php esc_html_e( 'Message', 'wp-whatsapp-chat' ); ?></th>
|
63 |
+
<td>
|
64 |
+
<input class="qlwapp-color-field" type="link" name="message" value="<?php echo esc_attr( $scheme['message'] ); ?>" />
|
65 |
+
<p class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></p>
|
66 |
+
</td>
|
67 |
+
</tr>
|
68 |
+
<tr class="qlwapp-premium-field">
|
69 |
+
<th scope="row"><?php esc_html_e( 'Label', 'wp-whatsapp-chat' ); ?></th>
|
70 |
+
<td>
|
71 |
+
<input class="qlwapp-color-field" type="link" name="label" value="<?php echo esc_attr( $scheme['label'] ); ?>" />
|
72 |
+
<p class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></p>
|
73 |
+
</td>
|
74 |
+
</tr>
|
75 |
+
<tr class="qlwapp-premium-field">
|
76 |
+
<th scope="row"><?php esc_html_e( 'Name', 'wp-whatsapp-chat' ); ?></th>
|
77 |
+
<td>
|
78 |
+
<input class="qlwapp-color-field" type="link" name="name" value="<?php echo esc_attr( $scheme['name'] ); ?>" />
|
79 |
+
<p class="description hidden"><small><?php esc_html_e( 'This is a premium feature', 'wp-whatsapp-chat' ); ?></small></p>
|
80 |
+
</td>
|
81 |
+
</tr>
|
82 |
+
</tbody>
|
83 |
+
</table>
|
84 |
+
<?php wp_nonce_field( 'qlwapp_save_scheme', 'qlwapp_scheme_form_nonce' ); ?>
|
85 |
+
<p class="submit">
|
86 |
+
<?php submit_button( esc_html__( 'Save', 'wp-whatsapp-chat' ), 'primary', 'submit', false ); ?>
|
87 |
+
<span class="settings-save-status">
|
88 |
+
<span class="saved"><?php esc_html_e( 'Saved successfully!' ); ?></span>
|
89 |
+
<span class="spinner" style="float: none"></span>
|
90 |
+
</span>
|
91 |
+
</p>
|
92 |
+
</form>
|
93 |
+
</div>
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: whatsapp, whatsapp business, click to chat, whatsapp chat, whatsapp suppor
|
|
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,10 @@ Don't use: +001-(555)1234567
|
|
133 |
|
134 |
== Changelog ==
|
135 |
|
|
|
|
|
|
|
|
|
136 |
= 6.0.9 =
|
137 |
* Fix. WordPress compatibility
|
138 |
|
6 |
Requires at least: 4.6
|
7 |
Requires PHP: 5.6
|
8 |
Tested up to: 6.0
|
9 |
+
Stable tag: 6.1.0
|
10 |
License: GPLv3
|
11 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
12 |
|
133 |
|
134 |
== Changelog ==
|
135 |
|
136 |
+
= 6.1.0 =
|
137 |
+
* Fix. WhatsApp premium compatibility
|
138 |
+
* Fix. Styles fixes
|
139 |
+
|
140 |
= 6.0.9 =
|
141 |
* Fix. WordPress compatibility
|
142 |
|
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.1.0
|
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.0' );
|
22 |
define( 'QLWAPP_PLUGIN_FILE', __FILE__ );
|
23 |
define( 'QLWAPP_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR );
|
24 |
define( 'QLWAPP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|