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 | Inc/Core/Admin/Forms/Settings.php +195 -63 1.0.5 → 3.1.14 View file →
@@ -1,12 +1,12 @@
1 1 <?php
2 2 /**
3 3 * @package FireBox
4 - * @version 1.0.5 Free
4 + * @version 3.1.14 Free
5 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 namespace FireBox\Core\Admin\Forms;
@@ -26,16 +26,16 @@
26 26 public static function getSettings()
27 27 {
28 28 $settings = [
29 29 'id' => 'FireBoxSettings',
30 - 'vertical' => true,
31 30 'tabs_menu_sticky' => true,
32 31 'mobile_menu' => true,
33 - 'show_tab_title' => true,
34 32 'data' => [
35 33 'general' => self::getGeneralSettings(),
36 34 'advanced' => self::getAdvancedSettings(),
37 35 'geolocation' => self::getGeolocationSettings(),
36 + 'captcha' => self::getCaptchaSettings(),
37 + 'integrations' => self::getIntegrationsSettings(),
38 38 'data' => self::getDataSettings(),
39 39 'license_key' => self::getLicenseKeySettings(),
40 40 ]
41 41 ];
@@ -52,50 +52,34 @@
52 52 {
53 53 return [
54 54 'title' => 'FPF_GENERAL',
55 55 'content' => [
56 - // Media
57 - 'media' => [
56 + // Other
57 + 'other' => [
58 58 'title' => [
59 - 'title' => 'FPF_MEDIA',
60 - 'description' => 'FB_SETTINGS_MEDIA_DESC'
59 + 'title' => 'FPF_OTHER',
60 + 'description' => firebox()->_('FB_SETTINGS_OTHER_DESC')
61 61 ],
62 62 'fields' => [
63 63 [
64 - 'name' => 'loadCSS',
64 + 'name' => 'show_admin_bar_menu_item',
65 65 'type' => 'FPToggle',
66 - 'label' => 'FB_SETTINGS_LOAD_CSS',
67 - 'description' => 'FB_SETTINGS_LOAD_CSS_DESC',
66 + 'label' => firebox()->_('FB_SETTINGS_SHOW_ADMIN_BAR_MENU_ITEM'),
67 + 'description' => firebox()->_('FB_SETTINGS_SHOW_ADMIN_BAR_MENU_ITEM_DESC'),
68 68 'checked' => true
69 69 ],
70 70 [
71 - 'name' => 'loadVelocity',
72 - 'type' => 'FPToggle',
73 - 'label' => 'FB_SETTINGS_LOAD_VELOCITY',
74 - 'description' => 'FB_SETTINGS_LOAD_VELOCITY_DESC',
75 - 'checked' => true
76 - ]
77 - ]
78 - ],
79 - // Other
80 - 'other' => [
81 - 'title' => [
82 - 'title' => 'FPF_OTHER',
83 - 'description' => 'FB_SETTINGS_OTHER_DESC'
84 - ],
85 - 'fields' => [
86 - [
87 71 'name' => 'showcopyright',
88 72 'type' => 'FPToggle',
89 - 'label' => 'FB_SETTINGS_SHOW_COPYRIGHT',
90 - 'description' => 'FB_SETTINGS_SHOW_COPYRIGHT_DESC',
73 + 'label' => firebox()->_('FB_SETTINGS_SHOW_COPYRIGHT'),
74 + 'description' => firebox()->_('FB_SETTINGS_SHOW_COPYRIGHT_DESC'),
91 75 'checked' => true
92 76 ],
93 77 [
94 78 'name' => 'debug',
95 79 'type' => 'FPToggle',
96 - 'label' => 'FB_SETTINGS_DEBUG',
97 - 'description' => 'FB_SETTINGS_DEBUG_DESC',
80 + 'label' => firebox()->_('FB_SETTINGS_DEBUG'),
81 + 'description' => firebox()->_('FB_SETTINGS_DEBUG_DESC'),
98 82 ]
99 83 ]
100 84 ]
101 85 ]
@@ -111,55 +95,72 @@
111 95 {
112 96 return [
113 97 'title' => 'FPF_ADVANCED',
114 98 'content' => [
99 + // Revenue Attribution
100 + 'revenue_attribution' => [
101 + 'title' => [
102 + 'title' => firebox()->_('FB_REVENUE_ATTRIBUTION'),
103 + 'description' => firebox()->_('FB_REVENUE_ATTRIBUTION_SECTION_DESC')
104 + ],
105 + 'fields' => [
106 +
107 +
108 + [
109 + 'type' => 'Pro',
110 + 'plugin' => 'FireBox',
111 + 'feature_label' => firebox()->_('FB_REVENUE_ATTRIBUTION'),
112 + 'upgrade_plan' => firebox()->_('FB_PRO'),
113 + 'modal' => '#fireboxUpgradeToPlan'
114 + ]
115 +
116 + ]
117 + ],
115 118 // Analytics
116 119 'analytics' => [
117 120 'title' => [
118 - 'title' => 'FB_SETTINGS_ANALYTICS',
119 - 'description' => 'FB_SETTINGS_ANALYTICS_DESC'
121 + 'title' => firebox()->_('FB_SETTINGS_ANALYTICS'),
122 + 'description' => firebox()->_('FB_SETTINGS_ANALYTICS_DESC')
120 123 ],
121 124 'fields' => [
122 125 [
123 - 'name' => 'stats',
124 - 'type' => 'FPToggle',
125 - 'checked' => true
126 - ],
127 - [
128 126 'name' => 'statsdays',
129 127 'type' => 'Dropdown',
130 - 'label' => 'FB_SETTINGS_STATS_PERIOD',
131 - 'description' => 'FB_SETTINGS_STATS_PERIOD_DESC',
132 - 'showon' => 'firebox_settings[stats]:1',
133 - 'input_class' => ['small'],
134 - 'default' => 180,
128 + 'label' => firebox()->_('FB_SETTINGS_STATS_PERIOD'),
129 + 'description' => firebox()->_('FB_SETTINGS_STATS_PERIOD_DESC'),
130 + 'showon' => '[stats]:1',
131 + 'default' => 730,
135 132 'choices' => [
136 - 180 => fpframework()->_('FPF_6_MONTHS'),
137 133 365 => fpframework()->_('FPF_1_YEAR'),
138 134 365 * 2 => fpframework()->_('FPF_2_YEARS'),
139 - 365 * 3 => fpframework()->_('FPF_3_YEARS'),
140 - 'custom' => fpframework()->_('FPF_CUSTOM'),
135 + 365 * 5 => fpframework()->_('FPF_5_YEARS'),
136 + 365 * 99 => fpframework()->_('FPF_KEEP_FOREVER'),
141 137 ]
142 - ],
138 + ]
139 + ]
140 + ],
141 + // PHP Scripts
142 + 'phpscripts' => [
143 + 'title' => [
144 + 'title' => firebox()->_('FB_PHPSCRIPTS'),
145 + 'description' => firebox()->_('FB_PHPSCRIPTS_SETTINGS_DESC')
146 + ],
147 + 'fields' => [
148 +
149 +
143 150 [
144 - 'name' => 'statsdays_custom',
145 - 'type' => 'Number',
146 - 'label' => 'FB_SETTINGS_STATS_DAYS_CUSTOM',
147 - 'description' => 'FB_SETTINGS_STATS_DAYS_CUSTOM_DESC',
148 - 'placeholder' => 1,
149 - 'min' => 1,
150 - 'step' => 1,
151 - 'addon' => 'days',
152 - 'input_class' => ['small'],
153 - 'showon' => 'firebox_settings[stats]:1[AND]firebox_settings[statsdays]:custom',
151 + 'type' => 'Pro',
152 + 'plugin' => 'FireBox',
153 + 'feature_label' => firebox()->_('FB_PHPSCRIPTS'),
154 154 ]
155 +
155 156 ]
156 157 ],
157 158 // Google Analytics
158 159 'google_analytics' => [
159 160 'title' => [
160 - 'title' => 'FB_SETTINGS_GAT',
161 - 'description' => 'FB_SETTINGS_GAT_DESC'
161 + 'title' => firebox()->_('FB_SETTINGS_GAT'),
162 + 'description' => firebox()->_('FB_SETTINGS_GAT_DESC')
162 163 ],
163 164 'fields' => [
164 165
165 166
@@ -164,12 +165,30 @@
164 165
165 166
166 167 [
167 168 'type' => 'Pro',
168 - 'feature_label' => 'FB_SETTINGS_GAT'
169 + 'plugin' => 'FireBox',
170 + 'feature_label' => firebox()->_('FB_SETTINGS_GAT')
169 171 ]
170 172
171 173 ]
174 + ],
175 + // API Key
176 + 'api' => [
177 + 'title' => [
178 + 'title' => firebox()->_('FB_JSON_API'),
179 + 'description' => firebox()->_('FB_JSON_API_DESC')
180 + ],
181 + 'fields' => [
182 +
183 +
184 + [
185 + 'type' => 'Pro',
186 + 'plugin' => 'FireBox',
187 + 'feature_label' => firebox()->_('FB_JSON_API')
188 + ]
189 +
190 + ]
172 191 ]
173 192 ]
174 193 ];
175 194 }
@@ -194,8 +213,9 @@
194 213
195 214
196 215 [
197 216 'type' => 'Pro',
217 + 'plugin' => 'FireBox',
198 218 'feature_label' => 'FPF_GEOLOCATION_SERVICES'
199 219 ]
200 220
201 221 ]
@@ -210,8 +230,9 @@
210 230
211 231
212 232 [
213 233 'type' => 'Pro',
234 + 'plugin' => 'FireBox',
214 235 'feature_label' => 'FPF_GEOIP_LOOKUP'
215 236 ]
216 237
217 238 ]
@@ -220,8 +241,74 @@
220 241 ];
221 242 }
222 243
223 244 /**
245 + * Holds the Captcha settings
246 + *
247 + * @return array
248 + */
249 + private static function getCaptchaSettings()
250 + {
251 + $turnstile_url = 'https://www.fireplugins.com/docs/security/cloudflare-turnstile-captcha/';
252 + $turnstile_url = \FPFramework\Base\Functions::getUTMURL($turnstile_url, '', 'notice', 'cloudflare-turnstile-captcha');
253 +
254 + $hcaptcha_url = 'https://www.fireplugins.com/docs/security/hcaptcha/';
255 + $hcaptcha_url = \FPFramework\Base\Functions::getUTMURL($hcaptcha_url, '', 'notice', 'hcaptcha');
256 +
257 + return [
258 + 'title' => 'FPF_CAPTCHA',
259 + 'content' => [
260 + // Cloudflare Turnstile
261 + 'turnstile' => [
262 + 'title' => [
263 + 'title' => 'FPF_CLOUDFLARE_TURNSTILE',
264 + 'description' => sprintf(firebox()->_('FB_CLOUDFLARE_TURNSTILE_DESC'), $turnstile_url)
265 + ],
266 + 'fields' => [
267 + [
268 + 'name' => 'cloudflare_turnstile_site_key',
269 + 'type' => 'Text',
270 + 'label' => firebox()->_('FB_SITE_KEY'),
271 + 'description' => firebox()->_('FB_CLOUDFLARE_TURNSTILE_SITE_KEY_DESC'),
272 + 'input_class' => ['xlarge'],
273 + ],
274 + [
275 + 'name' => 'cloudflare_turnstile_secret_key',
276 + 'type' => 'Text',
277 + 'label' => firebox()->_('FB_SECRET_KEY'),
278 + 'description' => firebox()->_('FB_CLOUDFLARE_TURNSTILE_SECRET_KEY_DESC'),
279 + 'input_class' => ['xlarge'],
280 + ],
281 + ]
282 + ],
283 + // hCaptcha
284 + 'hcaptcha' => [
285 + 'title' => [
286 + 'title' => 'FPF_HCAPTCHA',
287 + 'description' => sprintf(firebox()->_('FB_HCAPTCHA_DESC'), $hcaptcha_url)
288 + ],
289 + 'fields' => [
290 + [
291 + 'name' => 'hcaptcha_site_key',
292 + 'type' => 'Text',
293 + 'label' => firebox()->_('FB_SITE_KEY'),
294 + 'description' => firebox()->_('FB_HCAPTCHA_SITE_KEY_DESC'),
295 + 'input_class' => ['xlarge'],
296 + ],
297 + [
298 + 'name' => 'hcaptcha_secret_key',
299 + 'type' => 'Text',
300 + 'label' => firebox()->_('FB_SECRET_KEY'),
301 + 'description' => firebox()->_('FB_HCAPTCHA_SECRET_KEY_DESC'),
302 + 'input_class' => ['xlarge'],
303 + ],
304 + ]
305 + ]
306 + ]
307 + ];
308 + }
309 +
310 + /**
224 311 * Holds the Data settings
225 312 *
226 313 * @return array
227 314 */
@@ -226,8 +313,11 @@
226 313 * @return array
227 314 */
228 315 private static function getDataSettings()
229 316 {
317 + $url = 'https://www.fireplugins.com/docs/troubleshoot/usage-tracking/';
318 + $url = \FPFramework\Base\Functions::getUTMURL($url, '', 'notice', 'usage-tracking');
319 +
230 320 return [
231 321 'title' => 'FPF_DATA',
232 322 'content' => [
233 323 // Uninstall
@@ -244,8 +334,22 @@
244 334 'description' => 'FPF_KEEP_DATA_ON_UNINSTALL_DESC',
245 335 'checked' => true
246 336 ],
247 337 ]
338 + ],
339 + 'usage_tracking' => [
340 + 'title' => [
341 + 'title' => firebox()->_('FB_USAGE_TRACKING'),
342 + 'description' => firebox()->_('FB_USAGE_TRACKING_DESC')
343 + ],
344 + 'fields' => [
345 + [
346 + 'name' => 'usage_tracking',
347 + 'type' => 'FPToggle',
348 + 'label' => firebox()->_('FB_ALLOW_USAGE_TRACKING'),
349 + 'description' => sprintf(firebox()->_('FB_ALLOW_USAGE_TRACKING_DESC'), $url)
350 + ]
351 + ]
248 352 ]
249 353 ]
250 354 ];
251 355 }
@@ -250,8 +354,35 @@
250 354 ];
251 355 }
252 356
253 357 /**
358 + * Holds the Integrations settings.
359 + *
360 + * @return array
361 + */
362 + private static function getIntegrationsSettings()
363 + {
364 + return [
365 + 'title' => 'FPF_INTEGRATIONS',
366 + 'content' => [
367 + 'integrations' => [
368 + 'title' => [
369 + 'title' => 'FPF_INTEGRATIONS',
370 + 'description' => firebox()->_('FB_SETTINGS_INTEGRATIONS_DESC')
371 + ],
372 + 'fields' => [
373 + [
374 + 'type' => 'Integrations',
375 + 'name_clean' => true,
376 + 'integrations' => \FireBox\Core\Helpers\Integrations::getSettingsManagedIntegrations()
377 + ]
378 + ]
379 + ]
380 + ]
381 + ];
382 + }
383 +
384 + /**
254 385 * Holds the License Key settings
255 386 *
256 387 * @return array
257 388 */
@@ -256,13 +387,13 @@
256 387 * @return array
257 388 */
258 389 private static function getLicenseKeySettings()
259 390 {
260 - $plugin_name = firebox()->_('FB_PLUGIN_NAME');
391 + $plugin_name = firebox()->_(firebox()->_('FB_PLUGIN_NAME'));
261 392
262 393 $status = '';
263 394 $status_prefix = 'You\'re using ' . $plugin_name . ' ' . ucfirst(FBOX_LICENSE_TYPE) . ' - ';
264 - $enjoy = fpframework()->_('FPF_ENJOY') . '! <img role="img" class="emoji" alt="🙂" src="https://s.w.org/images/core/emoji/13.0.0/svg/1f642.svg" />';
395 + $enjoy = fpframework()->_('FPF_ENJOY') . '! 🙂';
265 396
266 397
267 398 $status = $status_prefix . fpframework()->_('FPF_NO_LICENSE_NEEDED') . ' ' . $enjoy;
268 399
@@ -282,8 +413,9 @@
282 413
283 414
284 415 [
285 416 'type' => 'Pro',
417 + 'plugin' => 'FireBox',
286 418 'feature_label' => 'FPF_ACTIVATE_LICENSE'
287 419 ]
288 420
289 421 ]
@@ -290,5 +422,5 @@
290 422 ]
291 423 ]
292 424 ];
293 425 }
294 -}
426 +}