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 | firebox.php +49 -12 1.0.32.0.12 View file →
@@ -1,25 +1,23 @@
1 1 <?php
2 2 /**
3 3 * @package FireBox
4 - * @version 1.0.3 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 © 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 * Plugin Name: FireBox
12 12 * Plugin URI: https://www.fireplugins.com/firebox
13 13 * Description: WordPress Popup and leads generation plugin that converts visitors into subscribers & customers.
14 - * Version: 1.0.3
15 - * Stable tag: 1.0.3
16 - * Author: FirePlugins
14 + * Version: 2.0.12
15 + * Author: FirePlugins Popup Plugin Team
17 16 * Author URI: https://www.fireplugins.com/
18 17 * Text Domain: firebox
19 18 * Domain Path: /languages
20 19 * Requires at least: 5.4
21 - * Tested up to: 5.7
22 20 * Requires PHP: 5.6.40
23 21 * License: GNU General Public License v2.0+
24 22 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
25 23 */
@@ -40,9 +38,9 @@
40 38
41 39 // Plugin version
42 40 if (!defined('FBOX_VERSION'))
43 41 {
44 - define('FBOX_VERSION', '1.0.3');
42 + define('FBOX_VERSION', '2.0.12');
45 43 }
46 44
47 45 // Plugin License type (free/pro)
48 46 if (!defined('FBOX_LICENSE_TYPE'))
@@ -70,10 +68,9 @@
70 68
71 69 // Plugin Documentation URL
72 70 if (!defined('FBOX_DOC_URL'))
73 71 {
74 - // TODO: define final URL
75 - define('FBOX_DOC_URL', 'https://www.fireplugins.com/docs/firebox');
72 + define('FBOX_DOC_URL', 'https://www.fireplugins.com/docs/firebox/');
76 73 }
77 74
78 75 // Plugin Folder Path
79 76 if (!defined('FBOX_PLUGIN_DIR'))
@@ -83,21 +80,21 @@
83 80
84 81 // Layouts Folder Path
85 82 if (!defined('FBOX_LAYOUTS_DIR'))
86 83 {
87 - define('FBOX_LAYOUTS_DIR', plugin_dir_path(__FILE__) . 'Inc/Core/Layouts/');
84 + define('FBOX_LAYOUTS_DIR', FBOX_PLUGIN_DIR . 'Inc/Core/Layouts/');
88 85 }
89 86
90 87 // Admin Layouts Folder Path
91 88 if (!defined('FBOX_ADMIN_LAYOUTS_DIR'))
92 89 {
93 - define('FBOX_ADMIN_LAYOUTS_DIR', plugin_dir_path(__FILE__) . 'Inc/Core/Layouts/admin/');
90 + define('FBOX_ADMIN_LAYOUTS_DIR', FBOX_PLUGIN_DIR . 'Inc/Core/Layouts/admin/');
94 91 }
95 92
96 93 // Public Layouts Folder Path
97 94 if (!defined('FBOX_PUBLIC_LAYOUTS_DIR'))
98 95 {
99 - define('FBOX_PUBLIC_LAYOUTS_DIR', plugin_dir_path(__FILE__) . 'Inc/Core/Layouts/public/');
96 + define('FBOX_PUBLIC_LAYOUTS_DIR', FBOX_PLUGIN_DIR . 'Inc/Core/Layouts/public/');
100 97 }
101 98
102 99 // Plugin Folder URL
103 100 if (!defined('FBOX_PLUGIN_URL'))
@@ -134,8 +131,13 @@
134 131 {
135 132 define('FBOX_BASE_FOLDER', dirname(__FILE__));
136 133 }
137 134
135 +if (!defined('FBOX_PLUGIN_BASENAME'))
136 +{
137 + define('FBOX_PLUGIN_BASENAME', plugin_basename(__FILE__));
138 +}
139 +
138 140 // Minimum PHP version check
139 141 if (!version_compare(PHP_VERSION, FBOX_MINIMUM_PHP_VERSION, '>='))
140 142 {
141 143 add_action('admin_notices', 'firebox_fail_php_version');
@@ -141,11 +143,46 @@
141 143 add_action('admin_notices', 'firebox_fail_php_version');
142 144 }
143 145 else
144 146 {
147 + // Migrator
148 + function firebox_upgrader_migrator_start($upgrader_object, $options)
149 + {
150 + if ($options['action'] === 'update' && $options['type'] === 'plugin' && isset($options['plugins']))
151 + {
152 + foreach ($options['plugins'] as $plugin)
153 + {
154 + if ($plugin !== plugin_basename(__FILE__))
155 + {
156 + continue;
157 + }
158 +
159 + $migrator = new \FireBox\Core\Migrator(get_option('firebox_version', '1.0.0'));
160 + $migrator->run();
161 + }
162 + }
163 + }
164 + add_action('upgrader_process_complete', 'firebox_upgrader_migrator_start', 10, 2);
165 +
166 + function firebox_init_migrator_start()
167 + {
168 + add_action('fpf_init', function() {
169 + $migrator = new \FireBox\Core\Migrator(get_option('firebox_version', '1.0.0'));
170 + $migrator->run();
171 + });
172 + }
173 + add_action('plugins_loaded', 'firebox_init_migrator_start', -1);
174 +
145 175 // Start Plugin
146 176 require_once dirname(__FILE__) . '/Inc/Core/Plugin.php';
147 177 firebox();
178 +
179 + if (is_admin())
180 + {
181 + // Run Activation/Deactivation procedures
182 + $maintenance = new \FireBox\Core\Admin\Maintenance(firebox()->hook_data);
183 + $maintenance->init();
184 + }
148 185 }
149 186
150 187 /**
151 188 * FireBox admin notice for minimum PHP version.