PluginProbe
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment / 2.0.6
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment v2.0.6
3.1.13 3.1.12 3.1.11 3.1.10 3.1.9 3.1.8 3.1.7 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 All 122 releases
← All changes | Inc/Core/AdminBarMenu.php +40 -8 1.0.22.0.6 View file →
@@ -1,12 +1,12 @@
1 1 <?php
2 2 /**
3 3 * @package FireBox
4 - * @version 1.0.2 Free
4 + * @version 2.0.6 Free
5 5 *
6 6 * @author FirePlugins <info@fireplugins.com>
7 7 * @link https://www.fireplugins.com
8 - * @copyright Copyright © 2021 FirePlugins All Rights Reserved
8 + * @copyright Copyright © 2023 FirePlugins All Rights Reserved
9 9 * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
10 10 */
11 11
12 12 namespace FireBox\Core;
@@ -15,18 +15,30 @@
15 15 {
16 16 exit; // Exit if accessed directly.
17 17 }
18 18
19 +use FPFramework\Libs\Registry;
20 +use FireBox\Core\Helpers\BoxHelper;
21 +
19 22 class AdminBarMenu
20 23 {
21 24 public function __construct()
22 25 {
26 + $cParam = BoxHelper::getParams();
27 + $cParam = new Registry($cParam);
28 +
29 + // Ensure we have enabled the showing of the admin bar menu item
30 + if ($cParam->get('show_admin_bar_menu_item', '1') !== '1')
31 + {
32 + return;
33 + }
34 +
23 35 // add media to both front and back end
24 - add_action( 'wp_enqueue_scripts', [ $this, 'addMedia' ] );
25 - add_action( 'admin_enqueue_scripts', [ $this, 'addMedia' ] );
36 + add_action('wp_enqueue_scripts', [ $this, 'addMedia' ]);
37 + add_action('admin_enqueue_scripts', [ $this, 'addMedia' ]);
26 38
27 39 // add FireBox menu item on top admin bar
28 - add_action( 'admin_bar_menu', [ $this, 'register' ], 999 );
40 + add_action('admin_bar_menu', [ $this, 'register' ], 999);
29 41 }
30 42
31 43 /**
32 44 * Enqueue styles.
@@ -83,8 +95,9 @@
83 95 'main_menu',
84 96 'add_new_menu',
85 97 'all_popups_menu',
86 98 'analytics_menu',
99 + 'submissions_menu',
87 100 'support_menu',
88 101
89 102 'upgrade_menu',
90 103
@@ -110,9 +123,9 @@
110 123 $wp_admin_bar->add_menu(
111 124 [
112 125 'id' => 'firebox-menu',
113 126 'title' => $logo . firebox()->_('FB_PLUGIN_NAME'),
114 - 'href' => admin_url( 'admin.php?page=firebox' ),
127 + 'href' => admin_url('admin.php?page=firebox')
115 128 ]
116 129 );
117 130 }
118 131
@@ -129,9 +142,9 @@
129 142 [
130 143 'parent' => 'firebox-menu',
131 144 'id' => 'firebox-menu-all-boxes',
132 145 'title' => firebox()->_('FB_POPUPS'),
133 - 'href' => admin_url( 'edit.php?post_type=firebox' ),
146 + 'href' => admin_url('edit.php?post_type=firebox')
134 147 ]
135 148 );
136 149 }
137 150
@@ -148,9 +161,9 @@
148 161 [
149 162 'parent' => 'firebox-menu',
150 163 'id' => 'firebox-menu-new-box',
151 164 'title' => firebox()->_('FB_NEW_POPUP'),
152 - 'href' => admin_url( 'post-new.php?post_type=firebox' ),
165 + 'href' => admin_url('post-new.php?post_type=firebox')
153 166 ]
154 167 );
155 168 }
156 169
@@ -187,8 +200,27 @@
187 200 'parent' => 'firebox-menu',
188 201 'id' => 'firebox-menu-analytics',
189 202 'title' => fpframework()->_('FPF_ANALYTICS'),
190 203 'href' => admin_url('admin.php?page=firebox-analytics')
204 + ]
205 + );
206 + }
207 +
208 + /**
209 + * Render FireBox Submissions Page
210 + *
211 + * @param object $wp_admin_bar WordPress Admin Bar object.
212 + *
213 + * @return void
214 + */
215 + public function submissions_menu($wp_admin_bar)
216 + {
217 + $wp_admin_bar->add_menu(
218 + [
219 + 'parent' => 'firebox-menu',
220 + 'id' => 'firebox-menu-submissions',
221 + 'title' => fpframework()->_('FPF_SUBMISSIONS'),
222 + 'href' => admin_url('admin.php?page=firebox-submissions')
191 223 ]
192 224 );
193 225 }
194 226