Version Description
- Show Tidio chat in top bar in admin
- Display Tidio chat at higher position in admin menu
Download this release
Release Info
Developer | kkopaczyktidio |
Plugin | Tidio Live Chat |
Version | 5.1.0 |
Comparing to | |
See all releases |
Code changes from version 5.0.0 to 5.1.0
- css/top-bar.css +8 -0
- readme.txt +6 -1
- src/Admin/TidioAdminDashboard.php +27 -1
- tidio-elements.php +1 -1
css/top-bar.css
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#wpadminbar li#wp-admin-bar-tidio .custom-icon {
|
2 |
+
float:left;
|
3 |
+
width:22px;
|
4 |
+
height:22px;
|
5 |
+
margin-left: 5px;
|
6 |
+
margin-top: 5px;
|
7 |
+
margin-right: 5px;
|
8 |
+
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: free live chat, live chat, chat, chatbot, livechat, tidio, widget, zendesk
|
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 5.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -198,6 +198,11 @@ Currently, Tidio is available in English and French. Other languages are in deve
|
|
198 |
|
199 |
== Changelog ==
|
200 |
|
|
|
|
|
|
|
|
|
|
|
201 |
= 5.0.0 =
|
202 |
|
203 |
- New integration flow based on OAuth
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 5.1.0
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
198 |
|
199 |
== Changelog ==
|
200 |
|
201 |
+
= 5.1.0 =
|
202 |
+
|
203 |
+
- Show Tidio chat in top bar in admin
|
204 |
+
- Display Tidio chat at higher position in admin menu
|
205 |
+
|
206 |
= 5.0.0 =
|
207 |
|
208 |
- New integration flow based on OAuth
|
src/Admin/TidioAdminDashboard.php
CHANGED
@@ -23,6 +23,8 @@ class TidioAdminDashboard
|
|
23 |
$this->iframeSetup = $iframeSetup;
|
24 |
|
25 |
add_action('admin_menu', [$this, 'addAdminMenuLink']);
|
|
|
|
|
26 |
}
|
27 |
|
28 |
public function addAdminMenuLink()
|
@@ -33,7 +35,8 @@ class TidioAdminDashboard
|
|
33 |
'manage_options',
|
34 |
TidioLiveChat::TIDIO_PLUGIN_NAME,
|
35 |
[$this, 'addAdminPage'],
|
36 |
-
'data:image/svg+xml;base64,' . self::TIDIO_ICON_BASE64
|
|
|
37 |
);
|
38 |
}
|
39 |
|
@@ -48,4 +51,27 @@ class TidioAdminDashboard
|
|
48 |
|
49 |
include $dir . '../../views/iframe.php';
|
50 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
23 |
$this->iframeSetup = $iframeSetup;
|
24 |
|
25 |
add_action('admin_menu', [$this, 'addAdminMenuLink']);
|
26 |
+
add_action('admin_bar_menu', [$this, 'addAdminBarItem'], 500);
|
27 |
+
add_action('admin_enqueue_scripts', [$this, 'topBarStyles']);
|
28 |
}
|
29 |
|
30 |
public function addAdminMenuLink()
|
35 |
'manage_options',
|
36 |
TidioLiveChat::TIDIO_PLUGIN_NAME,
|
37 |
[$this, 'addAdminPage'],
|
38 |
+
'data:image/svg+xml;base64,' . self::TIDIO_ICON_BASE64,
|
39 |
+
'99.12'
|
40 |
);
|
41 |
}
|
42 |
|
51 |
|
52 |
include $dir . '../../views/iframe.php';
|
53 |
}
|
54 |
+
|
55 |
+
public function addAdminBarItem(WP_Admin_Bar $adminBar)
|
56 |
+
{
|
57 |
+
$url = admin_url('admin.php?page=' . TidioLiveChat::TIDIO_PLUGIN_NAME);
|
58 |
+
|
59 |
+
$icon = '<span class="custom-icon" style="background-image:url(\'data:image/svg+xml;base64,'. self::TIDIO_ICON_BASE64.'\');"></span>';
|
60 |
+
|
61 |
+
$adminBar->add_node(
|
62 |
+
[
|
63 |
+
'id' => 'tidio',
|
64 |
+
'title' => $icon . ' <span class="ab-label">Tidio Chat</span>',
|
65 |
+
'href' => $url,
|
66 |
+
]
|
67 |
+
);
|
68 |
+
}
|
69 |
+
|
70 |
+
public function topBarStyles()
|
71 |
+
{
|
72 |
+
$dir = plugin_dir_path(__FILE__);
|
73 |
+
$pluginsUrl = plugins_url('css/top-bar.css', $dir . '../../..');
|
74 |
+
|
75 |
+
wp_enqueue_style('top_bar_css', $pluginsUrl);
|
76 |
+
}
|
77 |
}
|
tidio-elements.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
* Domain Path: /languages/
|
12 |
* License: GPL2
|
13 |
*/
|
14 |
-
define('TIDIOCHAT_VERSION', '5.
|
15 |
define('AFFILIATE_CONFIG_FILE_PATH', get_template_directory() . '/tidio_affiliate_ref_id.txt');
|
16 |
|
17 |
require_once __DIR__ . '/src/TidioLiveChatConfig.php';
|
11 |
* Domain Path: /languages/
|
12 |
* License: GPL2
|
13 |
*/
|
14 |
+
define('TIDIOCHAT_VERSION', '5.1.0');
|
15 |
define('AFFILIATE_CONFIG_FILE_PATH', get_template_directory() . '/tidio_affiliate_ref_id.txt');
|
16 |
|
17 |
require_once __DIR__ . '/src/TidioLiveChatConfig.php';
|