Version Description
- Fix. WordPress compatibility
- New. Add WhatsApp phone number notification
Download this release
Release Info
Developer | quadlayers |
Plugin | WhatsApp Chat WP |
Version | 5.0.8 |
Comparing to | |
See all releases |
Code changes from version 5.0.7 to 5.0.8
- includes/notices.php +102 -85
- readme.txt +10 -5
- wp-whatsapp-chat.php +2 -2
includes/notices.php
CHANGED
@@ -2,91 +2,108 @@
|
|
2 |
|
3 |
class QLWAPP_Notices {
|
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 |
|
2 |
|
3 |
class QLWAPP_Notices {
|
4 |
|
5 |
+
protected static $instance;
|
6 |
+
|
7 |
+
public static function instance() {
|
8 |
+
if ( is_null( self::$instance ) ) {
|
9 |
+
self::$instance = new self();
|
10 |
+
self::$instance->init();
|
11 |
+
}
|
12 |
+
return self::$instance;
|
13 |
+
}
|
14 |
+
|
15 |
+
function init() {
|
16 |
+
add_filter( 'plugin_action_links_' . plugin_basename( QLWAPP_PLUGIN_FILE ), array( $this, 'add_action_links' ) );
|
17 |
+
add_action( 'admin_notices', array( $this, 'add_rating_notice' ) );
|
18 |
+
add_action( 'admin_notices', array( $this, 'add_number_notice' ) );
|
19 |
+
add_action( 'wp_ajax_qlwapp_dismiss_notice', array( $this, 'ajax_dismiss_notice' ) );
|
20 |
+
}
|
21 |
+
|
22 |
+
function ajax_dismiss_notice() {
|
23 |
+
|
24 |
+
if ( check_admin_referer( 'qlwapp_dismiss_notice', 'nonce' ) && isset( $_REQUEST['notice_id'] ) ) {
|
25 |
+
|
26 |
+
$notice_id = sanitize_key( $_REQUEST['notice_id'] );
|
27 |
+
|
28 |
+
update_user_meta( get_current_user_id(), $notice_id, true );
|
29 |
+
|
30 |
+
wp_send_json( $notice_id );
|
31 |
+
}
|
32 |
+
|
33 |
+
wp_die();
|
34 |
+
}
|
35 |
+
|
36 |
+
function add_number_notice() {
|
37 |
+
|
38 |
+
if ( class_exists( 'QLWAPP_Button' ) ) {
|
39 |
+
$button_model = new QLWAPP_Button();
|
40 |
+
$button = $button_model->get();
|
41 |
+
if ( ! $button['phone'] || QLWAPP_PHONE_NUMBER === $button['phone'] ) {
|
42 |
+
?>
|
43 |
+
<div id="qlwapp-admin-phone" class="qlwapp-notice notice notice-info is-dismissible">
|
44 |
+
<p><?php printf( esc_html__( '%s is almost ready.', 'wp-whatsapp-chat' ), QLWAPP_PLUGIN_NAME ); ?>
|
45 |
+
<?php printf( '<a href="%s">%s</a> %s', admin_url( 'admin.php?page=qlwapp_button' ), esc_html__( 'Add your WhatsApp phone number', 'wp-whatsapp-chat' ), esc_html__( 'and let visitors contact you via WhatsApp.', 'wp-whatsapp-chat.' ) ); ?>
|
46 |
+
</div>
|
47 |
+
<?php
|
48 |
+
}
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
function add_rating_notice() {
|
53 |
+
|
54 |
+
if ( ! get_transient( 'qlwapp-first-rating' ) && ! get_user_meta( get_current_user_id(), 'qlwapp-user-rating', true ) ) {
|
55 |
+
?>
|
56 |
+
<div id="qlwapp-admin-rating" class="qlwapp-notice notice is-dismissible" data-notice_id="qlwapp-user-rating">
|
57 |
+
<div class="notice-container" style="padding-top: 10px; padding-bottom: 10px; display: flex; justify-content: left; align-items: center;">
|
58 |
+
<div class="notice-image">
|
59 |
+
<img style="border-radius:50%;max-width: 90px;" src="<?php echo plugins_url( '/assets/backend/img/logo.jpg', QLWAPP_PLUGIN_FILE ); ?>" alt="<?php echo esc_html( QLWAPP_PLUGIN_NAME ); ?>>">
|
60 |
+
</div>
|
61 |
+
<div class="notice-content" style="margin-left: 15px;">
|
62 |
+
<p>
|
63 |
+
<?php printf( esc_html__( 'Hello! Thank you for choosing the %s plugin!', 'wp-whatsapp-chat' ), QLWAPP_PLUGIN_NAME ); ?>
|
64 |
+
<br/>
|
65 |
+
<?php esc_html_e( 'Could you please give it a 5-star rating on WordPress? We know its a big favor, but we\'ve worked very much and very hard to release this great product. Your feedback will boost our motivation and help us promote and continue to improve this product.', 'wp-whatsapp-chat' ); ?>
|
66 |
+
</p>
|
67 |
+
<a href="<?php echo esc_url( QLWAPP_REVIEW_URL ); ?>" class="button-primary" target="_blank">
|
68 |
+
<?php esc_html_e( 'Yes, of course!', 'wp-whatsapp-chat' ); ?>
|
69 |
+
</a>
|
70 |
+
<a href="<?php echo esc_url( QLWAPP_SUPPORT_URL ); ?>" class="button-secondary" target="_blank">
|
71 |
+
<?php esc_html_e( 'Report a bug', 'wp-whatsapp-chat' ); ?>
|
72 |
+
</a>
|
73 |
+
</div>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
<script>
|
77 |
+
(function ($) {
|
78 |
+
$('.qlwapp-notice').on('click', '.notice-dismiss', function (e) {
|
79 |
+
e.preventDefault();
|
80 |
+
var notice_id = $(e.delegateTarget).data('notice_id');
|
81 |
+
$.ajax({
|
82 |
+
type: 'POST',
|
83 |
+
url: ajaxurl,
|
84 |
+
data: {
|
85 |
+
notice_id: notice_id,
|
86 |
+
action: 'qlwapp_dismiss_notice',
|
87 |
+
nonce: '<?php echo wp_create_nonce( 'qlwapp_dismiss_notice' ); ?>'
|
88 |
+
},
|
89 |
+
success: function (response) {
|
90 |
+
console.log(response);
|
91 |
+
},
|
92 |
+
});
|
93 |
+
});
|
94 |
+
})(jQuery);
|
95 |
+
</script>
|
96 |
+
<?php
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
public function add_action_links( $links ) {
|
101 |
+
|
102 |
+
$links[] = '<a target="_blank" href="' . QLWAPP_PURCHASE_URL . '">' . esc_html__( 'Premium', 'wp-whatsapp-chat' ) . '</a>';
|
103 |
+
$links[] = '<a href="' . admin_url( 'admin.php?page=' . sanitize_title( QLWAPP_PREFIX ) ) . '">' . esc_html__( 'Settings', 'wp-whatsapp-chat' ) . '</a>';
|
104 |
+
|
105 |
+
return $links;
|
106 |
+
}
|
107 |
|
108 |
}
|
109 |
|
readme.txt
CHANGED
@@ -1,21 +1,22 @@
|
|
1 |
-
=== Social Chat ===
|
2 |
Contributors: quadlayers
|
3 |
Donate link: https://quadlayers.com/portfolio/whatsapp-chat/
|
4 |
-
Tags: whatsapp, whatsapp business, click to chat, whatsapp chat, whatsapp support, whatsapp group, whatsapp message,
|
|
|
5 |
Requires at least: 4.6
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 6.0.1
|
8 |
-
Stable tag: 5.0.
|
9 |
License: GPLv3
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
12 |
-
WhatsApp Chat allows your users to contact you through
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
[Premium](https://quadlayers.com/portfolio/whatsapp-chat/) | [Demo](https://quadlayers.com/whatsapp-chat/) | [Community](https://www.facebook.com/groups/quadlayers/)
|
17 |
|
18 |
-
WhatsApp Chat for WordPress allows your customers to open a conversation from your website directly to your "WhatsApp" or "WhatsApp Business" phone number. This plugin includes a Whatsapp button where you can include a pre-set message, which will be automatically be the first message in the conversation.
|
19 |
|
20 |
== Formerly WhatsApp Chat ==
|
21 |
This plugin was formerly known as "WhatsApp Chat". WordPress forced us on August 8, 2019 to change the name of the plugin due to use of the "WhatsApp" word in the name. We apologize for the problems that the downtime may have caused to you.
|
@@ -117,6 +118,10 @@ Don't use: +001-(555)1234567
|
|
117 |
|
118 |
== Changelog ==
|
119 |
|
|
|
|
|
|
|
|
|
120 |
= 5.0.7 =
|
121 |
* New. Admin WhatsApp Icon
|
122 |
|
1 |
+
=== WP Social Chat - Click To Chat App ===
|
2 |
Contributors: quadlayers
|
3 |
Donate link: https://quadlayers.com/portfolio/whatsapp-chat/
|
4 |
+
Tags: whatsapp, whatsapp business, click to chat, whatsapp chat, whatsapp support, whatsapp group, whatsapp message, whatsapp woocommerce, whatsapp wordpress, whatsapp floating button, whatsapp icon, whats app, wame, wp social chat, join chat, wp whatsapp
|
5 |
+
|
6 |
Requires at least: 4.6
|
7 |
Requires PHP: 5.6
|
8 |
Tested up to: 6.0.1
|
9 |
+
Stable tag: 5.0.8
|
10 |
License: GPLv3
|
11 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
12 |
|
13 |
+
WP WhatsApp Chat allows your users to contact you through WhatsApp App WhatsApp Web or WhatsApp Business with a single click.
|
14 |
|
15 |
== Description ==
|
16 |
|
17 |
[Premium](https://quadlayers.com/portfolio/whatsapp-chat/) | [Demo](https://quadlayers.com/whatsapp-chat/) | [Community](https://www.facebook.com/groups/quadlayers/)
|
18 |
|
19 |
+
WP WhatsApp Chat for WordPress allows your customers to click a button and open a conversation from your website directly to your "WhatsApp" or "WhatsApp Business" phone number. This plugin includes a Whatsapp button where you can include a pre-set message, which will be automatically be the first message in the conversation.
|
20 |
|
21 |
== Formerly WhatsApp Chat ==
|
22 |
This plugin was formerly known as "WhatsApp Chat". WordPress forced us on August 8, 2019 to change the name of the plugin due to use of the "WhatsApp" word in the name. We apologize for the problems that the downtime may have caused to you.
|
118 |
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= 5.0.8 =
|
122 |
+
* Fix. WordPress compatibility
|
123 |
+
* New. Add WhatsApp phone number notification
|
124 |
+
|
125 |
= 5.0.7 =
|
126 |
* New. Admin WhatsApp Icon
|
127 |
|
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
|
@@ -17,7 +17,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
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' );
|
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
|
8 |
* Author: QuadLayers
|
9 |
* Author URI: https://quadlayers.com
|
10 |
* License: GPLv3
|
17 |
}
|
18 |
|
19 |
define( 'QLWAPP_PLUGIN_NAME', 'Social Chat' );
|
20 |
+
define( 'QLWAPP_PLUGIN_VERSION', '5.0.8' );
|
21 |
define( 'QLWAPP_PLUGIN_FILE', __FILE__ );
|
22 |
define( 'QLWAPP_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR );
|
23 |
define( 'QLWAPP_PREFIX', 'qlwapp' );
|