PluginProbe
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment / 2.0.10
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment v2.0.10
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/Admin/Admin.php +45 -5 1.0.22.0.10 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.10 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\Admin;
@@ -56,8 +56,10 @@
56 56 * @return void
57 57 */
58 58 private function initDependencies()
59 59 {
60 + new Media();
61 +
60 62 $this->library = firebox()->library;
61 63
62 64 // Update Notice
63 65 $valid_pages = [
@@ -63,8 +65,9 @@
63 65 $valid_pages = [
64 66 'firebox',
65 67 'firebox-analytics',
66 68 'firebox-import',
69 + 'firebox-submissions',
67 70 'firebox-settings'
68 71 ];
69 72 $updateNotice = new \FPFramework\Admin\Includes\UpdateNotice(
70 73 firebox()->plugin_slug,
@@ -96,9 +99,9 @@
96 99
97 100
98 101 add_action('plugin_action_links_' . plugin_basename(FBOX_PLUGIN_BASE_FILE), [$this, 'plugin_action_links']);
99 102
100 - add_action('fpframework/admin/template/footer/nav_links', [$this, 'add_admin_page_template_footer_nav_links']);
103 + add_action('fpframework/admin/template/footer/firebox/nav_links', [$this, 'add_admin_page_template_footer_nav_links']);
101 104
102 105 }
103 106
104 107
@@ -139,11 +142,33 @@
139 142 */
140 143 private function handleFilters()
141 144 {
142 145 add_filter('admin_body_class', [$this, 'setPluginPageBodyClass']);
146 + add_filter('plugin_row_meta' , [$this, 'addPluginMetaLinks'], 10, 4);
143 147 }
144 148
145 149 /**
150 + * Adds extra links to the plugins page.
151 + *
152 + * @param array $links
153 + * @param string $file
154 + * @param array $plugin_data
155 + * @param string $status
156 + *
157 + * @return array
158 + */
159 + public function addPluginMetaLinks($links, $file, $plugin_data, $status)
160 + {
161 + if ($file === FBOX_PLUGIN_BASENAME)
162 + {
163 + $links['rate'] = '<a href="https://wordpress.org/support/plugin/firebox/reviews/?filter=5#new-post" aria-label="' . esc_attr__(firebox()->_('FB_RATE_FIREBOX')) . '" target="_blank">' . esc_html__(firebox()->_('FB_RATE_FIREBOX')) . '</a>';
164 + $links['support'] = '<a href="https://www.fireplugins.com/contact?plugin=FireBox" aria-label="' . esc_attr__(fpframework()->_('FPF_SUPPORT')) . '" target="_blank">' . esc_html__(fpframework()->_('FPF_SUPPORT')) . '</a>';
165 + }
166 +
167 + return $links;
168 + }
169 +
170 + /**
146 171 * Sets a class to the body of the FireBox Admin Pages
147 172 *
148 173 * @return string
149 174 */
@@ -241,8 +266,11 @@
241 266 * @return void
242 267 */
243 268 public function registerStyles()
244 269 {
270 + // load dashicons
271 + wp_enqueue_style('dashicons');
272 +
245 273 // firebox main admin css
246 274 wp_register_style(
247 275 'firebox-admin',
248 276 FBOX_MEDIA_ADMIN_URL . 'css/firebox.css',
@@ -250,8 +278,15 @@
250 278 FBOX_VERSION,
251 279 false
252 280 );
253 281 wp_enqueue_style('firebox-admin');
282 +
283 + $css = '
284 + :root {
285 + --fpf-templates-library-header-logo: url(' . FBOX_MEDIA_ADMIN_URL . 'images/logo.svg);
286 + }
287 + ';
288 + wp_add_inline_style('firebox-admin', $css);
254 289 }
255 290
256 291 /**
257 292 * Registers admin scripts.
@@ -259,11 +294,16 @@
259 294 * @return void
260 295 */
261 296 public function registerScripts()
262 297 {
298 + wp_register_script('firebox-admin', false);
299 + wp_enqueue_script('firebox-admin');
300 +
263 301 $data = array(
264 - 'media_url' => FBOX_MEDIA_URL
302 + 'media_url' => FBOX_MEDIA_URL,
303 + 'admin_url' => get_admin_url(),
304 + 'submissions_page' => admin_url('admin.php?page=firebox-submissions')
265 305 );
266 306
267 - wp_localize_script('fpframework-admin', 'fbox_admin_js_object', $data);
307 + wp_localize_script('firebox-admin', 'fbox_admin_js_object', $data);
268 308 }
269 309 }