PluginProbe
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment / 3.1.14
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment v3.1.14
3.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 All 123 releases
← All changes | autoload.php +22 -12 1.0.1 → 3.1.14 View file →
@@ -1,12 +1,12 @@
1 1 <?php
2 2 /**
3 3 * @package FireBox
4 - * @version 1.0.1 Free
5 - *
4 + * @version 3.1.14 Free
5 + *
6 6 * @author FirePlugins <[email protected]>
7 7 * @link https://www.fireplugins.com
8 - * @copyright Copyright © 2021 FirePlugins All Rights Reserved
8 + * @copyright Copyright © 2026 FirePlugins All Rights Reserved
9 9 * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
10 10 */
11 11
12 12 // If this file is called directly, abort.
@@ -18,24 +18,34 @@
18 18 if (!function_exists('firebox_autoloader'))
19 19 {
20 20 function firebox_autoloader($class)
21 21 {
22 + if (strpos($class, 'FireBox\\') !== 0)
23 + {
24 + return;
25 + }
26 +
22 27 // plugin namespaces
23 28 $firebox_namespaces = [
24 - 'FireBox\\Core\\' => [ __DIR__ . '/Inc/Core/' ],
25 - 'FireBox\\Testing\\' => [ dirname(__DIR__) . '/tests/' ],
29 + 'FireBox\\Core\\' => __DIR__ . '/Inc/Core/',
30 + 'FireBox\\Testing\\' => dirname(__DIR__) . '/tests/',
26 31 ];
27 32
28 - $class = firepluginsframework_fixClassBasedOnNamespace($firebox_namespaces, $class);
33 + foreach ($firebox_namespaces as $prefix => $dir)
34 + {
35 + if (strpos($class, $prefix) === 0)
36 + {
37 + $file = $dir . str_replace('\\', '/', substr($class, strlen($prefix))) . '.php';
29 38
30 - $file = str_replace(['\\'], ['/'], $class) . '.php';
39 + if (file_exists($file))
40 + {
41 + require_once $file;
42 + }
31 43
32 - if (file_exists($file))
33 - {
34 - require_once $file;
44 + return;
45 + }
35 46 }
36 47 }
37 48 }
38 49
39 50 // autoload classes
40 -spl_autoload_register('firebox_autoloader');
41 -?>
51 +spl_autoload_register('firebox_autoloader');