WhatsApp Chat WP - Version 4.8.8

Version Description

  • New. QuadLayers dashboard widget
Download this release

Release Info

Developer quadlayers
Plugin Icon 128x128 WhatsApp Chat WP
Version 4.8.8
Comparing to
See all releases

Code changes from version 4.8.7 to 4.8.8

includes/quadlayers/widget.php ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class QL_Widget
4
+ {
5
+ protected static $instance;
6
+
7
+ public function __construct()
8
+ {
9
+ if (is_admin()) {
10
+ add_action('wp_network_dashboard_setup', [$this, 'add_dashboard_widget'], -10);
11
+ add_action('wp_dashboard_setup', [$this, 'add_dashboard_widget'], -10);
12
+ }
13
+ }
14
+
15
+ public function add_dashboard_widget()
16
+ {
17
+ wp_add_dashboard_widget(
18
+ 'quadlayers-dashboard-overview',
19
+ __('QuadLayers News', 'wp-whatsapp-chat'),
20
+ [$this, 'display_dashboard_widget'],
21
+ //null, //control_callback
22
+ //null, //callback_args
23
+ //null, //context
24
+ //'core'
25
+ );
26
+ }
27
+
28
+ public function display_dashboard_widget()
29
+ {
30
+ $rss = fetch_feed('https://quadlayers.com/news/feed/');
31
+
32
+ if (is_wp_error($rss)) {
33
+ printf('<p><strong>%s: </strong>%s</p>', __('Error', 'wp-whatsapp-chat'), $rss->get_error_message());
34
+ return;
35
+ }
36
+
37
+ if (!$rss->get_item_quantity()) {
38
+ printf('<ul><li>%s</li></ul>', __('An error has occurred, which probably means the feed is down. Try again later', 'wp-whatsapp-chat'));
39
+ $rss->__destruct();
40
+ unset($rss);
41
+ return;
42
+ }
43
+ ?>
44
+ <div>
45
+ <div>
46
+ <div style="margin-top: 11px;float: left;width: 70%;">
47
+ <?php esc_html_e('Hi! We are Quadlayers! Welcome to QuadLayers! We’re a team of international people who have been working in the WordPress sphere for the last ten years.', 'wp-whatsapp-chat'); ?>
48
+ <div style="margin-top: 11px; float: left; width: 70%;"><a href="<?php echo admin_url('admin.php?page=' . QLWAPP_DOMAIN . '_suggestions'); ?>" target="_blank" class="button button-secondary"><?php esc_html_e('More products', 'wp-whatsapp-chat'); ?></a></div>
49
+ </div>
50
+ <img style="width: 30%;margin-top: 11px;float: right; max-width: 95px;" src="<?php echo plugins_url('/assets/backend/img/quadlayers.jpg', QLWAPP_PLUGIN_FILE); ?>" />
51
+ </div>
52
+ <div style="clear: both;"></div>
53
+ </div>
54
+ <div style="margin: 16px -12px 0; padding: 12px 12px 0;border-top: 1px solid #eee;">
55
+ <ul>
56
+ <?php
57
+ foreach ($rss->get_items(0, 3) as $item) {
58
+ $link = $item->get_link();
59
+ while (stristr($link, 'http') !== $link) {
60
+ $link = substr($link, 1);
61
+ }
62
+
63
+ $link = esc_url(strip_tags($link . '?utm_source=ql_dashboard'));
64
+ $title = esc_html(trim(strip_tags($item->get_title())));
65
+
66
+ if (empty($title)) {
67
+ $title = __('Untitled', 'wp-whatsapp-chat');
68
+ }
69
+
70
+ $desc = html_entity_decode($item->get_description(), ENT_QUOTES, get_option('blog_charset'));
71
+ $desc = esc_attr(wp_trim_words($desc, 15, '...'));
72
+ $summary = $desc;
73
+ $summary = '<div class="rssSummary">' . $summary . '</div>';
74
+
75
+ $date = $item->get_date('U');
76
+ if ($date) {
77
+ $date = '<span class="rss-date">' . date_i18n(get_option('date_format'), $date) . '</span>';
78
+ }
79
+ $author = $item->get_author();
80
+ $author = ucfirst($author->get_name());
81
+ $author = ' <cite>' . esc_html(strip_tags($author)) . '</cite>';
82
+
83
+ printf(__('<li><a href="%s" target="_blank">%s </a>%s%s%s</li>', 'wp-whatsapp-chat'), $link, $title, $date, $summary, $author);
84
+ } ?>
85
+ </ul>
86
+ </div>
87
+ <div style="display: flex; justify-content: space-between;align-items: center;margin: 16px -12px 0;padding: 12px 12px 0; border-top: 1px solid #eee;">
88
+ <a href="https://quadlayers.com/blog/?utm_source=ql_dashboard" target="_blank"><?php esc_html_e('Read more like this on our blog', 'wp-whatsapp-chat') ?></a>
89
+ <a class="button-primary" href="https://quadlayers.com/?utm_source=ql_dashboard" target="_blank"><?php esc_html_e('QuadLayers', 'wp-whatsapp-chat') ?></a>
90
+ </div>
91
+ <?php
92
+ }
93
+
94
+ public static function instance()
95
+ {
96
+ if (!isset(self::$instance)) {
97
+ self::$instance = new self();
98
+ }
99
+ return self::$instance;
100
+ }
101
+ }
102
+
103
+
104
+ QL_Widget::instance();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://quadlayers.com/portfolio/whatsapp-chat/
4
  Tags: whatsapp, whatsapp chat, whatsapp business, whatsapp support, click to chat, whatsapp group, directly message whatsapp, floating whatsapp, whatsapp message, help desk
5
  Requires at least: 3.0
6
  Tested up to: 5.8
7
- Stable tag: 4.8.7
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -97,6 +97,9 @@ Don't use: +001-(555)1234567
97
 
98
  == Changelog ==
99
 
 
 
 
100
  = 4.8.7 =
101
  * New. QuadLayers dashboard widget
102
 
4
  Tags: whatsapp, whatsapp chat, whatsapp business, whatsapp support, click to chat, whatsapp group, directly message whatsapp, floating whatsapp, whatsapp message, help desk
5
  Requires at least: 3.0
6
  Tested up to: 5.8
7
+ Stable tag: 4.8.8
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
97
 
98
  == Changelog ==
99
 
100
+ = 4.8.8 =
101
+ * New. QuadLayers dashboard widget
102
+
103
  = 4.8.7 =
104
  * New. QuadLayers dashboard widget
105
 
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: 4.8.7
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', '4.8.7');
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: 4.8.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', '4.8.8');
21
  define('QLWAPP_PLUGIN_FILE', __FILE__);
22
  define('QLWAPP_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR);
23
  define('QLWAPP_PREFIX', 'qlwapp');