PluginProbe
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment / 2.1.4
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment v2.1.4
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/Frontend.php +8 -25 3.1.72.1.4 View file →
@@ -1,12 +1,12 @@
1 1 <?php
2 2 /**
3 3 * @package FireBox
4 - * @version 3.1.7 Free
4 + * @version 2.1.4 Free
5 5 *
6 6 * @author FirePlugins <info@fireplugins.com>
7 7 * @link https://www.fireplugins.com
8 - * @copyright Copyright © 2026 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
12 12 namespace FireBox\Core;
@@ -15,8 +15,10 @@
15 15 {
16 16 exit; // Exit if accessed directly.
17 17 }
18 18
19 +use FPFramework\Libs\Registry;
20 +
19 21 class Frontend
20 22 {
21 23 public function __construct()
22 24 {
@@ -25,16 +27,8 @@
25 27 {
26 28 return;
27 29 }
28 30
29 - wp_register_script(
30 - 'firebox-main',
31 - FBOX_MEDIA_PUBLIC_URL . 'js/firebox.js',
32 - [],
33 - FBOX_VERSION,
34 - true
35 - );
36 -
37 31 // Prepare Gutenberg Blocks that contain attributes by FireBox
38 32 new \FireBox\Core\FB\BoxBlocksParser();
39 33
40 34 /**
@@ -41,13 +35,12 @@
41 35 * Event that runs before any rendering of popups.
42 36 */
43 37 do_action('firebox/boxes/before_render');
44 38
45 - // Run Actions
39 + $this->render();
40 +
46 41 \FireBox\Core\Helpers\Actions::run();
47 42
48 - add_action('template_redirect', [$this, 'render']);
49 -
50 43 /**
51 44 * Event that runs after popups have been rendered.
52 45 */
53 46 do_action('firebox/boxes/after_render');
@@ -87,13 +80,9 @@
87 80 */
88 81 private function canRenderInEditors()
89 82 {
90 83 // Don't render the popup if previewing with Elementor
91 - if (class_exists('\Elementor\Plugin') &&
92 - property_exists(\Elementor\Plugin::$instance, 'preview') &&
93 - method_exists(\Elementor\Plugin::$instance->preview, 'is_preview_mode') &&
94 - \Elementor\Plugin::$instance->preview->is_preview_mode()
95 - )
84 + if (class_exists('\Elementor\Plugin') && \Elementor\Plugin::$instance->preview->is_preview_mode())
96 85 {
97 86 return;
98 87 }
99 88
@@ -101,14 +90,8 @@
101 90 if (class_exists('\FLBuilderModel') && method_exists('\FLBuilderModel', 'is_builder_active') && \FLBuilderModel::is_builder_active())
102 91 {
103 92 return;
104 93 }
105 -
106 - // Don't render the popup if previewing with Bricks Builder
107 - if (function_exists('bricks_is_builder') && bricks_is_builder())
108 - {
109 - return;
110 - }
111 94
112 95 return true;
113 96 }
114 97
@@ -121,5 +104,5 @@
121 104 {
122 105 $previewer = new Previewer();
123 106 return $previewer->init();
124 107 }
125 -}
108 +}