PluginProbe
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment / 2.0.12
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment v2.0.12
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/Plugin.php +26 -47 1.1.12.0.12 View file →
@@ -1,12 +1,12 @@
1 1 <?php
2 2 /**
3 3 * @package FireBox
4 - * @version 1.1.1 Free
4 + * @version 2.0.12 Free
5 5 *
6 6 * @author FirePlugins <info@fireplugins.com>
7 7 * @link https://www.fireplugins.com
8 - * @copyright Copyright © 2022 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
@@ -17,9 +17,8 @@
17 17 }
18 18
19 19 use FPFramework\Framework;
20 20 use FPFramework\Admin\Includes\MetaboxManager;
21 - use FPFramework\Libs\FPGeoIP;
22 21 use FPFramework\Base\Renderer;
23 22
24 23 use FireBox\Core\Admin\Admin;
25 24 use FireBox\Core\Admin\Includes\Library;
@@ -26,10 +25,10 @@
26 25 use FireBox\Core\Admin\Includes\Metaboxes as PluginMetaboxes;
27 26 use FireBox\Core\Admin\Includes\Cpts\Cpts;
28 27
29 28 use FireBox\Core\Admin\Analytics\Overview\Overview as AnalyticsOverview;
29 + use FireBox\Core\Admin\Analytics\Overview\Ajax as AnalyticsOverviewAjax;
30 30 use FireBox\Core\Admin\Menu\PluginMenu;
31 - use FireBox\Core\Admin\Maintenance;
32 31 use FireBox\Core\FB\Box;
33 32 use FireBox\Core\FB\Boxes;
34 33 use FireBox\Core\FB\Log;
35 34 use FireBox\Core\FB\Track;
@@ -92,15 +91,8 @@
92 91 */
93 92 public $metaboxes_manager;
94 93
95 94 /**
96 - * Maintenance
97 - *
98 - * @var Maintenance
99 - */
100 - public $maintenance;
101 -
102 - /**
103 95 * Box
104 96 *
105 97 * @var Box
106 98 */
@@ -120,22 +112,8 @@
120 112 */
121 113 public $menu;
122 114
123 115 /**
124 - * The geolocation class
125 - *
126 - * @var GeoIP
127 - */
128 - public $fpgeoip;
129 -
130 - /**
131 - * The REST API.
132 - *
133 - * @var RESTAPI
134 - */
135 - public $api;
136 -
137 - /**
138 116 * Helper Classes
139 117 *
140 118 * @var HelperMiddleware
141 119 */
@@ -175,8 +153,15 @@
175 153 * @var Log
176 154 */
177 155 public $log;
178 156
157 + /**
158 + * Analytics configuration.
159 + *
160 + * @var array
161 + */
162 + public $analytics_configuration;
163 +
179 164
180 165
181 166 /**
182 167 * Translations
@@ -189,10 +174,10 @@
189 174 * Tables used by Hook
190 175 *
191 176 * @var array
192 177 */
193 - private $hook_data = [
194 - 'tables' => [ 'firebox_logs' ],
178 + public $hook_data = [
179 + 'tables' => [ 'firebox_logs', 'firebox_logs_details', 'firebox_submissions', 'firebox_submission_meta' ],
195 180 'activation' => FBOX_PLUGIN_DIR . 'Inc/Core/Admin/sql/firebox.sql',
196 181 'uninstall' => FBOX_PLUGIN_DIR . 'Inc/Core/Admin/sql/uninstall.firebox.sql'
197 182 ];
198 183
@@ -255,8 +240,11 @@
255 240
256 241 // Admin
257 242 $this->admin = new Admin();
258 243
244 + // Library
245 + $this->library = new Library();
246 +
259 247 // Metaboxes
260 248 $this->metaboxes_manager = new MetaboxManager();
261 249 $this->plugin_metaboxes = new PluginMetaboxes();
262 250 $this->metaboxes_manager->init();
@@ -277,20 +265,10 @@
277 265
278 266 // show rate reminder after user has activated the plugin
279 267 add_action('activated_plugin', [$this, 'set_rate_reminder']);
280 268
281 - // adds plugin translation class to the framework set of translate classes
282 - add_filter('fpframework/set_translation_paths', [$this, 'setTranslationsPaths']);
283 -
284 269 // Widgets
285 270 $this->widgets = new Widgets();
286 -
287 - if (is_admin())
288 - {
289 - // Run Activation/Deactivation procedures
290 - $this->maintenance = new Maintenance($this->hook_data);
291 - $this->maintenance->init();
292 - }
293 271 }
294 272
295 273 /**
296 274 * Set rate reminder transient on plugin activation.
@@ -343,11 +321,8 @@
343 321 private function initCommons()
344 322 {
345 323 new AdminBarMenu();
346 324
347 - // Library
348 - $this->library = new Library();
349 -
350 325 // Tables
351 326 $this->tables = new Tables();
352 327
353 328 // Shortcodes
@@ -356,9 +331,10 @@
356 331 // Log
357 332 $this->log = new Log();
358 333
359 334 // REST API
360 - $this->api = new RESTAPI();
335 + new RESTAPI();
336 +
361 337
362 338 // Custom Post Types
363 339 $this->cpts = new Cpts();
364 340 $this->cpts->init();
@@ -371,11 +347,8 @@
371 347
372 348 // Boxes
373 349 $this->boxes = new Boxes();
374 350
375 - // FPGeo IP
376 - $this->fpgeoip = new FPGeoIP();
377 -
378 351 // Helper
379 352 $this->helper = new HelperMiddleware();
380 353
381 354 // Gutenberg Blocks
@@ -380,24 +353,30 @@
380 353
381 354 // Gutenberg Blocks
382 355 $this->blocks = new Blocks();
383 356
357 + new \FireBox\Core\Form\Ajax();
358 +
384 359 // Track
385 360 $this->track = new Track();
386 361
387 362 // Initialize Analytics
388 363 global $wpdb;
389 - $analytics_configuration = [
364 + $this->analytics_configuration = [
390 365 'boxes_table' => $wpdb->prefix . 'posts',
391 366 'logs_table' => firebox()->tables->boxlog->getFullTableName(),
392 367 'logs_details_table' => firebox()->tables->boxlogdetails->getFullTableName(),
368 + 'submissions_table' => firebox()->tables->submission->getFullTableName(),
369 + 'submissions_meta_table' => firebox()->tables->submissionmeta->getFullTableName(),
370 + 'nonce_name' => 'fb-analytics-nonce',
393 371 'nonce_value' => wp_create_nonce('fb-analytics-nonce'),
394 372 ];
373 +
395 374
396 375
397 -
398 376 // Initialize Analytics Overview
399 - $this->analytics_overview = new AnalyticsOverview($analytics_configuration);
377 + $this->analytics_overview = new AnalyticsOverview();
378 + $this->analytics_overview_ajax = new AnalyticsOverviewAjax();
400 379 }
401 380
402 381 /**
403 382 * Initializes FireBox Plugin with the required components