PluginProbe
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment / 2.1.14
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment v2.1.14
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 +44 -12 1.0.02.1.14 View file →
@@ -1,12 +1,12 @@
1 1 <?php
2 2 /**
3 3 * @package FireBox
4 - * @version 1.0.0 Free
4 + * @version 2.1.14 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 © 2024 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
@@ -128,10 +141,10 @@
128 141 $wp_admin_bar->add_menu(
129 142 [
130 143 'parent' => 'firebox-menu',
131 144 'id' => 'firebox-menu-all-boxes',
132 - 'title' => firebox()->_('FB_POPUPS'),
133 - 'href' => admin_url( 'edit.php?post_type=firebox' ),
145 + 'title' => firebox()->_('FB_CAMPAIGNS'),
146 + 'href' => admin_url('admin.php?page=firebox-campaigns')
134 147 ]
135 148 );
136 149 }
137 150
@@ -147,10 +160,10 @@
147 160 $wp_admin_bar->add_menu(
148 161 [
149 162 'parent' => 'firebox-menu',
150 163 'id' => 'firebox-menu-new-box',
151 - 'title' => firebox()->_('FB_NEW_POPUP'),
152 - 'href' => admin_url( 'post-new.php?post_type=firebox' ),
164 + 'title' => firebox()->_('FB_NEW_CAMPAIGN'),
165 + 'href' => admin_url('post-new.php?post_type=firebox')
153 166 ]
154 167 );
155 168 }
156 169
@@ -191,8 +204,27 @@
191 204 ]
192 205 );
193 206 }
194 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')
223 + ]
224 + );
225 + }
226 +
195 227
196 228 /**
197 229 * Render FireBox Upgrade Page
198 230 *
@@ -205,12 +237,12 @@
205 237 $wp_admin_bar->add_menu(
206 238 [
207 239 'parent' => 'firebox-menu',
208 240 'id' => 'firebox-menu-upgrade',
209 - 'title' => fpframework()->_('FPF_UPGRADE'),
241 + 'title' => fpframework()->_('FPF_UPGRADE_TO_PRO'),
210 242 'href' => FBOX_GO_PRO_URL,
211 243 'meta' => [
212 - 'class' => 'fb-yellow-link'
244 + 'class' => 'firebox-go-pro-yellow-link'
213 245 ]
214 246 ]
215 247 );
216 248 }