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 | firebox.php +76 -19 1.0.142.1.14 View file →
@@ -1,25 +1,24 @@
1 1 <?php
2 2 /**
3 3 * @package FireBox
4 - * @version 1.0.14 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 © 2022 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 * Plugin Name: FireBox
12 - * Plugin URI: https://www.fireplugins.com/firebox
12 + * Plugin URI: https://www.fireplugins.com/
13 13 * Description: WordPress Popup and leads generation plugin that converts visitors into subscribers & customers.
14 - * Version: 1.0.14
15 - * Author: FirePlugins Popup Plugin Team
14 + * Version: 2.1.14
15 + * Author: FireBox Popup Plugin Team
16 16 * Author URI: https://www.fireplugins.com/
17 17 * Text Domain: firebox
18 18 * Domain Path: /languages
19 19 * Requires at least: 5.4
20 - * Tested up to: 6.0
21 - * Requires PHP: 5.6.40
20 + * Requires PHP: 7.0
22 21 * License: GNU General Public License v2.0+
23 22 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
24 23 */
25 24
@@ -29,11 +28,19 @@
29 28 exit; // Exit if accessed directly.
30 29 }
31 30
32 31 // Load Framework
32 +if (!file_exists(dirname(__FILE__) . '/Inc/Framework/init.php'))
33 +{
34 + return;
35 +}
33 36 require_once dirname(__FILE__) . '/Inc/Framework/init.php';
34 37
35 38 // Plugin Autoloader
39 +if (!file_exists(dirname(__FILE__) . '/autoload.php'))
40 +{
41 + return;
42 +}
36 43 require_once dirname(__FILE__) . '/autoload.php';
37 44
38 45
39 46
@@ -39,9 +46,9 @@
39 46
40 47 // Plugin version
41 48 if (!defined('FBOX_VERSION'))
42 49 {
43 - define('FBOX_VERSION', '1.0.14');
50 + define('FBOX_VERSION', '2.1.14');
44 51 }
45 52
46 53 // Plugin License type (free/pro)
47 54 if (!defined('FBOX_LICENSE_TYPE'))
@@ -55,9 +62,9 @@
55 62
56 63 // PHP Minimm Version
57 64 if (!defined('FBOX_MINIMUM_PHP_VERSION'))
58 65 {
59 - define('FBOX_MINIMUM_PHP_VERSION', '5.6.40');
66 + define('FBOX_MINIMUM_PHP_VERSION', '7.0');
60 67 }
61 68
62 69
63 70 // Go Pro URL
@@ -62,17 +69,18 @@
62 69
63 70 // Go Pro URL
64 71 if (!defined('FBOX_GO_PRO_URL'))
65 72 {
66 - define('FBOX_GO_PRO_URL', 'https://www.fireplugins.com/firebox/upgrade');
73 + define('FBOX_GO_PRO_URL', 'https://www.fireplugins.com/firebox/upgrade?coupon=FREE2PRO&utm_source=Wordpress&utm_medium=upgradebutton&utm_campaign=freeversion');
67 74 }
68 75
69 76
77 +
78 +
70 79 // Plugin Documentation URL
71 80 if (!defined('FBOX_DOC_URL'))
72 81 {
73 - // TODO: define final URL
74 - define('FBOX_DOC_URL', 'https://www.fireplugins.com/docs/firebox');
82 + define('FBOX_DOC_URL', 'https://www.fireplugins.com/docs/firebox/');
75 83 }
76 84
77 85 // Plugin Folder Path
78 86 if (!defined('FBOX_PLUGIN_DIR'))
@@ -79,24 +87,30 @@
79 87 {
80 88 define('FBOX_PLUGIN_DIR', plugin_dir_path(__FILE__));
81 89 }
82 90
91 +// Plugin Release Date
92 +if (!defined('FBOX_RELEASE_DATE'))
93 +{
94 + define('FBOX_RELEASE_DATE', '2024-05-30');
95 +}
96 +
83 97 // Layouts Folder Path
84 98 if (!defined('FBOX_LAYOUTS_DIR'))
85 99 {
86 - define('FBOX_LAYOUTS_DIR', plugin_dir_path(__FILE__) . 'Inc/Core/Layouts/');
100 + define('FBOX_LAYOUTS_DIR', FBOX_PLUGIN_DIR . 'Inc/Core/Layouts/');
87 101 }
88 102
89 103 // Admin Layouts Folder Path
90 104 if (!defined('FBOX_ADMIN_LAYOUTS_DIR'))
91 105 {
92 - define('FBOX_ADMIN_LAYOUTS_DIR', plugin_dir_path(__FILE__) . 'Inc/Core/Layouts/admin/');
106 + define('FBOX_ADMIN_LAYOUTS_DIR', FBOX_PLUGIN_DIR . 'Inc/Core/Layouts/admin/');
93 107 }
94 108
95 109 // Public Layouts Folder Path
96 110 if (!defined('FBOX_PUBLIC_LAYOUTS_DIR'))
97 111 {
98 - define('FBOX_PUBLIC_LAYOUTS_DIR', plugin_dir_path(__FILE__) . 'Inc/Core/Layouts/public/');
112 + define('FBOX_PUBLIC_LAYOUTS_DIR', FBOX_PLUGIN_DIR . 'Inc/Core/Layouts/public/');
99 113 }
100 114
101 115 // Plugin Folder URL
102 116 if (!defined('FBOX_PLUGIN_URL'))
@@ -133,8 +147,13 @@
133 147 {
134 148 define('FBOX_BASE_FOLDER', dirname(__FILE__));
135 149 }
136 150
151 +if (!defined('FBOX_PLUGIN_BASENAME'))
152 +{
153 + define('FBOX_PLUGIN_BASENAME', plugin_basename(__FILE__));
154 +}
155 +
137 156 // Minimum PHP version check
138 157 if (!version_compare(PHP_VERSION, FBOX_MINIMUM_PHP_VERSION, '>='))
139 158 {
140 159 add_action('admin_notices', 'firebox_fail_php_version');
@@ -140,11 +159,46 @@
140 159 add_action('admin_notices', 'firebox_fail_php_version');
141 160 }
142 161 else
143 162 {
163 + // Migrator
164 + function firebox_upgrader_migrator_start($upgrader_object, $options)
165 + {
166 + if ($options['action'] === 'update' && $options['type'] === 'plugin' && isset($options['plugins']))
167 + {
168 + foreach ($options['plugins'] as $plugin)
169 + {
170 + if ($plugin !== plugin_basename(__FILE__))
171 + {
172 + continue;
173 + }
174 +
175 + $migrator = new \FireBox\Core\Migrator(get_option('firebox_version', '1.0.0'));
176 + $migrator->run();
177 + }
178 + }
179 + }
180 + add_action('upgrader_process_complete', 'firebox_upgrader_migrator_start', 10, 2);
181 +
182 + function firebox_init_migrator_start()
183 + {
184 + add_action('fpf_init', function() {
185 + $migrator = new \FireBox\Core\Migrator(get_option('firebox_version', '1.0.0'));
186 + $migrator->run();
187 + });
188 + }
189 + add_action('plugins_loaded', 'firebox_init_migrator_start', -1);
190 +
144 191 // Start Plugin
145 192 require_once dirname(__FILE__) . '/Inc/Core/Plugin.php';
146 193 firebox();
194 +
195 + if (is_admin())
196 + {
197 + // Run Activation/Deactivation procedures
198 + $maintenance = new \FireBox\Core\Admin\Maintenance(firebox()->hook_data);
199 + $maintenance->init();
200 + }
147 201 }
148 202
149 203 /**
150 204 * FireBox admin notice for minimum PHP version.
@@ -152,10 +206,13 @@
152 206 * Warning when the site doesn't have the minimum required PHP version.
153 207 *
154 208 * @return void
155 209 */
156 -function firebox_fail_php_version()
210 +if (!function_exists('firebox_fail_php_version'))
157 211 {
158 - $message = sprintf(fpframework()->_('FPF_PHP_VERSION_FAIL'), 'FireBox', FBOX_MINIMUM_PHP_VERSION);
159 - $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
160 - echo wp_kses_post( $html_message );
212 + function firebox_fail_php_version()
213 + {
214 + $message = sprintf(fpframework()->_('FPF_PHP_VERSION_FAIL'), 'FireBox', FBOX_MINIMUM_PHP_VERSION);
215 + $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
216 + echo wp_kses_post( $html_message );
217 + }
161 218 }