PluginProbe
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment / 2.1.37
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment v2.1.37
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
firebox / Inc / Core / Admin / Forms / FireBox / Design.php

Design.php in FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment 2.1.37, at Inc/Core/Admin/Forms/FireBox/Design.php

531 lines 15.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package FireBox
4 * @version 2.1.37 Free
5 *
6 * @author FirePlugins <info@fireplugins.com>
7 * @link https://www.fireplugins.com
8 * @copyright Copyright © 2025 FirePlugins All Rights Reserved
9 * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
10 */
11
12 namespace FireBox\Core\Admin\Forms\FireBox;
13
14 if (!defined('ABSPATH'))
15 {
16 exit; // Exit if accessed directly.
17 }
18
19 use FPFramework\Helpers\AnimationsHelper;
20
21 class Design
22 {
23 /**
24 * Holds the Design Settings
25 *
26 * @return array
27 */
28 public function getSettings()
29 {
30 $settings = [
31 'title' => 'FPF_DESIGN',
32 'content' => [
33 'popup_size' => [
34 'title' => [
35 'title' => firebox()->_('FB_DESIGN_POPUP_SIZE'),
36 'description' => firebox()->_('FB_DESIGN_POPUP_SIZE_DESC')
37 ],
38 'fields' => [
39 [
40 'name' => 'width_control',
41 'type' => 'ResponsiveControl',
42 'label' => 'FPF_WIDTH',
43 'class' => ['small-12', 'medium-auto'],
44 'value' => [
45 'width' => [
46 'desktop' => 500
47 ]
48 ],
49 'fields' => [
50 [
51 'name' => 'width',
52 'type' => 'Number',
53 'label' => 'FPF_WIDTH',
54 'input_class' => ['fullwidth'],
55 'placeholder' => '500',
56 'units' => ['px', '%'],
57 'units_relative_position' => false,
58 'render_group' => false
59 ],
60 ]
61 ],
62 [
63 'name' => 'height_control',
64 'type' => 'ResponsiveControl',
65 'label' => 'FPF_HEIGHT',
66 'class' => ['small-12', 'medium-auto'],
67 'showon' => '[mode]!:embed',
68 'fields' => [
69 [
70 'name' => 'height',
71 'type' => 'Number',
72 'input_class' => ['fullwidth'],
73 'placeholder' => 'auto',
74 'units' => ['px', '%', 'auto'],
75 'units_default' => 'auto',
76 'units_relative_position' => false,
77 'render_group' => false
78 ]
79 ]
80 ]
81 ]
82 ],
83 'box' => [
84 'title' => [
85 'title' => firebox()->_('FB_CAMPAIGN'),
86 'description' => firebox()->_('FB_METABOX_DESIGN_CAMPAIGN_DESC')
87 ],
88 'fields' => [
89 [
90 'name' => 'fontsize_control',
91 'type' => 'ResponsiveControl',
92 'label' => 'FPF_FONT_SIZE',
93 'description' => 'FPF_FONT_SIZE_DESC',
94 'control_inner_class' => ['fpf-max-width-300'],
95 'value' => [
96 'fontsize' => [
97 'desktop' => 16
98 ]
99 ],
100 'fields' => [
101 [
102 'name' => 'fontsize',
103 'type' => 'Number',
104 'placeholder' => 16,
105 'input_class' => ['fullwidth'],
106 'units' => ['px', 'em', 'rem'],
107 'units_relative_position' => false,
108 'render_group' => false
109 ],
110 ]
111 ],
112 [
113 'name' => 'padding_control',
114 'type' => 'ResponsiveControl',
115 'label' => 'FPF_PADDING',
116 'description' => firebox()->_('FB_METABOX_PADDING_DESC'),
117 'control_inner_class' => ['fpf-max-width-300'],
118 'value' => [
119 'padding' => [
120 'desktop' => [
121 'top' => 30,
122 'right' => 30,
123 'bottom' => 30,
124 'left' => 30
125 ]
126 ]
127 ],
128 'fields' => [
129 [
130 'name' => 'padding',
131 'type' => 'Dimensions',
132 'units' => ['px', '%'],
133 'units_relative_position' => false,
134 'render_group' => false,
135 'isLinked' => true
136 ],
137 ]
138 ],
139 [
140 'name' => 'margin_control',
141 'type' => 'ResponsiveControl',
142 'label' => 'FPF_MARGIN',
143 'description' => firebox()->_('FB_METABOX_MARGIN_DESC'),
144 'control_inner_class' => ['fpf-max-width-300'],
145 'fields' => [
146 [
147 'name' => 'margin',
148 'type' => 'Dimensions',
149 'units' => ['px', '%'],
150 'render_group' => false,
151 'units_relative_position' => false,
152 'isLinked' => true
153 ],
154 ]
155 ],
156 [
157 'name' => 'textcolor',
158 'type' => 'Color',
159 'label' => 'FPF_TEXT_COLOR',
160 'default' => '#444444',
161 'input_class' => ['medium']
162 ],
163 [
164 'name' => 'backgroundcolor',
165 'type' => 'Color',
166 'label' => 'FPF_BG_COLOR',
167 'description' => firebox()->_('FB_METABOX_BG_COLOR_DESC'),
168 'default' => '#ffffff',
169 'input_class' => ['medium']
170 ],
171 [
172 'name' => 'aligncontent',
173 'type' => 'Dropdown',
174 'label' => 'FPF_ALIGN_CONTENT',
175 'choices' => [
176 'acl' => firebox()->_('FB_METABOX_POSITION_TL'),
177 'act acc' => firebox()->_('FB_METABOX_POSITION_TC'),
178 'act acr' => firebox()->_('FB_METABOX_POSITION_TR'),
179 'acm acl' => firebox()->_('FB_METABOX_POSITION_ML'),
180 'acm acc' => firebox()->_('FB_METABOX_POSITION_MC'),
181 'acm acr' => firebox()->_('FB_METABOX_POSITION_MR'),
182 'acb acl' => firebox()->_('FB_METABOX_POSITION_BL'),
183 'acb acc' => firebox()->_('FB_METABOX_POSITION_BC'),
184 'acb acr' => firebox()->_('FB_METABOX_POSITION_BR')
185 ],
186 'filter' => 'sanitize_text_field'
187 ],
188 [
189 'name' => 'boxshadow',
190 'type' => 'Toggle',
191 'label' => firebox()->_('FB_METABOX_SHADOW'),
192 'input_class' => ['default'],
193 'default' => '0',
194 'choices' => [
195 '0' => 'FPF_NONE',
196 '1' => firebox()->_('FB_METABOX_SHADOW_S1'),
197 '2' => firebox()->_('FB_METABOX_SHADOW_S2'),
198 '3' => firebox()->_('FB_METABOX_SHADOW_S3'),
199 'elevation' => firebox()->_('FB_ELEVATION')
200 ]
201 ]
202 ]
203 ],
204 'close_button' => [
205 'wrapper' => [
206 'showon' => '[mode]!:embed',
207 ],
208 'title' => [
209 'title' => firebox()->_('FB_METABOX_CLOSE_BUTTON'),
210 'description' => firebox()->_('FB_METABOX_CLOSE_BUTTON_TITLE_DESC')
211 ],
212 'fields' => [
213 [
214 'name' => 'closebutton.show',
215 'type' => 'Toggle',
216 'input_class' => ['default'],
217 'default' => 1,
218 'choices' => [
219 1 => firebox()->_('FB_METABOX_CLOSE_BUTTON_INSIDE'),
220 2 => firebox()->_('FB_METABOX_CLOSE_BUTTON_OUTSIDE'),
221 0 => 'FPF_HIDE'
222 ]
223 ],
224 [
225 'name' => 'closebutton.source',
226 'type' => 'Toggle',
227 'label' => firebox()->_('FB_METABOX_CLOSE_BUTTON_TYPE'),
228 'default' => 'icon',
229 'choices' => [
230 'icon' => 'FPF_ICON',
231 'image' => 'FPF_IMAGE'
232 ],
233 'showon' => '[closebutton][show]:1,2'
234 ],
235 [
236 'name' => 'closebutton.color',
237 'type' => 'Color',
238 'label' => 'FPF_COLOR',
239 'default' => 'rgba(136, 136, 136, 1)',
240 'input_class' => ['medium'],
241 'showon' => '[closebutton][source]:icon[AND][closebutton][show]:1,2'
242 ],
243 [
244 'name' => 'closebutton.hover',
245 'type' => 'Color',
246 'label' => firebox()->_('FB_METABOX_HOVER_COLOR'),
247 'default' => 'rgba(85, 85, 85, 1)',
248 'input_class' => ['medium'],
249 'showon' => '[closebutton][source]:icon[AND][closebutton][show]:1,2'
250 ],
251 [
252 'name' => 'closebutton.size',
253 'type' => 'Slider',
254 'label' => 'FPF_SIZE',
255 'number_class' => ['xsmall'],
256 'default' => 30,
257 'step' => 2,
258 'addon' => 'px',
259 'showon' => '[closebutton][source]:icon[AND][closebutton][show]:1,2'
260 ],
261 [
262 'name' => 'closebutton.image',
263 'type' => 'MediaUploader',
264 'label' => 'FPF_SELECT_IMAGE',
265 'description' => firebox()->_('FB_METABOX_SELECT_IMAGE_DESC'),
266 'showon' => '[closebutton][source]:image[AND][closebutton][show]:1,2',
267 'filter' => 'esc_url_raw'
268 ],
269 [
270 'name' => 'closebutton.delay',
271 'type' => 'Slider',
272 'label' => firebox()->_('FB_METABOX_DELAY'),
273 'default' => 0,
274 'min' => 0,
275 'max' => 120,
276 'step' => 2,
277 'addon' => 'sec',
278 'showon' => '[closebutton][show]:1,2'
279 ],
280 ]
281 ],
282 'animation' => [
283 'wrapper' => [
284 'showon' => '[mode]!:embed',
285 ],
286 'title' => [
287 'title' => firebox()->_('FB_METABOX_ANIMATION'),
288 'description' => firebox()->_('FB_METABOX_ANIMATION_DESC'),
289 ],
290 'fields' => [
291 [
292 'name' => 'animationin',
293 'type' => 'SearchDropdown',
294 'label' => firebox()->_('FB_METABOX_ANIMATION_IN'),
295 'default' => ['transition.slideUpIn'],
296 'control_inner_class' => ['fpf-fullwidth'],
297 'search_query_placeholder' => firebox()->_('FB_TRANSITION_IN_HINT'),
298 'hide_ids' => true,
299 'multiple' => false,
300 'items' => AnimationsHelper::getTransitionsIn(),
301 'filter' => 'sanitize_text_field',
302 'class' => ['medium-auto'],
303 'input_class' => ['fullwidth']
304 ],
305 [
306 'name' => 'animationout',
307 'type' => 'SearchDropdown',
308 'label' => firebox()->_('FB_METABOX_ANIMATION_OUT'),
309 'default' => ['transition.fadeOut'],
310 'control_inner_class' => ['fpf-fullwidth'],
311 'search_query_placeholder' => firebox()->_('FB_TRANSITION_OUT_HINT'),
312 'hide_ids' => true,
313 'multiple' => false,
314 'items' => AnimationsHelper::getTransitionsOut(),
315 'filter' => 'sanitize_text_field',
316 'class' => ['medium-auto'],
317 'input_class' => ['fullwidth']
318 ],
319 [
320 'name' => 'duration',
321 'type' => 'Slider',
322 'label' => firebox()->_('FB_METABOX_DURATION'),
323 'default' => 0.3,
324 'min' => 0,
325 'max' => 2,
326 'step' => 0.1,
327 'number_step' => 0.1,
328 'addon' => 'sec'
329 ]
330 ]
331 ],
332 'border' => [
333 'title' => [
334 'title' => 'FPF_BORDER',
335 'description' => 'FPF_BORDER_DESC'
336 ],
337 'fields' => [
338 [
339 'name' => 'bordertype',
340 'type' => 'Dropdown',
341 'label' => 'FPF_STYLE',
342 'default' => 'solid',
343 'choices' => [
344 'none' => 'FPF_NONE',
345 'solid' => 'FPF_SOLID',
346 'dotted' => 'FPF_DOTTED',
347 'double' => 'FPF_DOUBLE',
348 'dashed' => 'FPF_DASHED',
349 'inset' => 'FPF_INSET',
350 'outset' => 'FPF_OUTSET',
351 'groove' => 'FPF_GROOVE',
352 'ridge' => 'FPF_RIDGE',
353 'hidden' => 'FPF_HIDDEN'
354 ],
355 ],
356 [
357 'name' => 'bordercolor',
358 'type' => 'Color',
359 'label' => 'FPF_COLOR',
360 'default' => 'rgba(0, 0, 0, 0.4)',
361 'input_class' => ['medium'],
362 'showon' => '[bordertype]!:none'
363 ],
364 [
365 'name' => 'borderwidth',
366 'type' => 'Slider',
367 'label' => 'FPF_WIDTH',
368 'number_class' => ['xsmall'],
369 'default' => 1,
370 'min' => 0,
371 'max' => 15,
372 'units' => ['px'],
373 'showon' => '[bordertype]!:none'
374 ],
375 [
376 'name' => 'borderradius_control',
377 'type' => 'ResponsiveControl',
378 'label' => firebox()->_('FB_METABOX_BORDERRADIUS'),
379 'description' => firebox()->_('FB_METABOX_BORDERRADIUS_DESC'),
380 'control_inner_class' => ['fpf-max-width-300'],
381 'value' => [
382 'borderradius' => [
383 'desktop' => [
384 'top_left' => 0,
385 'top_right' => 0,
386 'bottom_right' => 0,
387 'bottom_left' => 0
388 ]
389 ]
390 ],
391 'fields' => [
392 [
393 'name' => 'borderradius',
394 'type' => 'Dimensions',
395 'max' => 100,
396 'units' => ['px', '%'],
397 'units_relative_position' => false,
398 'isLinked' => true,
399 'labels' => [
400 'top_left' => fpframework()->_('FPF_TOP_LEFT'),
401 'top_right' => fpframework()->_('FPF_TOP_RIGHT'),
402 'bottom_right' => fpframework()->_('FPF_BOTTOM_RIGHT'),
403 'bottom_left' => fpframework()->_('FPF_BOTTOM_LEFT')
404 ]
405 ]
406 ]
407 ],
408 ]
409 ],
410 'background_overlay' => [
411 'wrapper' => [
412 'showon' => '[mode]!:embed',
413 ],
414 'title' => [
415 'title' => firebox()->_('FB_METABOX_BG_OVERLAY'),
416 'description' => firebox()->_('FB_METABOX_BG_OVERLAY_DESC')
417 ],
418 'fields' => [
419 [
420 'name' => 'overlay',
421 'type' => 'FPToggle'
422 ],
423 [
424 'name' => 'overlay_color',
425 'type' => 'Color',
426 'label' => 'FPF_BG_COLOR',
427 'description' => firebox()->_('FB_METABOX_OVERLAY_COLOR_DESC'),
428 'default' => 'rgba(0, 0, 0, 0.5)',
429 'input_class' => ['medium'],
430 'showon' => '[overlay]:1'
431 ],
432 [
433 'name' => 'overlayblurradius',
434 'type' => 'Slider',
435 'label' => firebox()->_('FB_METABOX_OVERLAY_BLUR_RADIUS'),
436 'description' => firebox()->_('FB_METABOX_OVERLAY_BLUR_RADIUS_DESC'),
437 'number_class' => ['xsmall'],
438 'default' => 0,
439 'min' => 0,
440 'max' => 100,
441 'addon' => '%',
442 'showon' => '[overlay]:1'
443 ],
444 [
445 'name' => 'overlayclick',
446 'type' => 'FPToggle',
447 'label' => firebox()->_('FB_METABOX_OVERLAY_CLICK'),
448 'description' => firebox()->_('FB_METABOX_OVERLAY_CLICK_DESC'),
449 'checked' => true,
450 'showon' => '[overlay]:1'
451 ]
452 ]
453 ],
454 'background_image' => [
455 'wrapper' => [
456 'showon' => '[mode]!:embed',
457 ],
458 'title' => [
459 'title' => 'FPF_BG_IMAGE',
460 'description' => 'FPF_BG_IMAGE_DESC'
461 ],
462 'fields' => [
463 [
464 'name' => 'bgimage',
465 'type' => 'FPToggle'
466 ],
467 [
468 'name' => 'bgimagefile',
469 'type' => 'MediaUploader',
470 'label' => 'FPF_IMAGE',
471 'description' => firebox()->_('FB_METABOX_BG_IMAGE_FILE_DESC'),
472 'showon' => '[bgimage]:1'
473 ],
474 [
475 'name' => 'bgrepeat',
476 'type' => 'Dropdown',
477 'label' => 'FPF_REPEAT',
478 'description' => firebox()->_('FB_METABOX_BGREPEAT_DESC'),
479 'default' => 'Repeat',
480 'choices' => [
481 'No-repeat' => firebox()->_('FB_METABOX_BGREPEAT_NOREPEAT'),
482 'Repeat' => 'FPF_REPEAT',
483 'Repeat-x' => firebox()->_('FB_METABOX_BGREPEAT_REPEATX'),
484 'Repeat-y' => firebox()->_('FB_METABOX_BGREPEAT_REPEATY')
485 ],
486 'filter' => 'sanitize_text_field',
487 'showon' => '[bgimage]:1'
488 ],
489 [
490 'name' => 'bgsize',
491 'type' => 'Dropdown',
492 'label' => 'FPF_SIZE',
493 'description' => firebox()->_('FB_METABOX_BGSIZE_DESC'),
494 'default' => 'Auto',
495 'choices' => [
496 'Auto' => 'FPF_AUTO',
497 'Cover' => firebox()->_('FB_METABOX_BGSIZE_COVER'),
498 'Contain' => firebox()->_('FB_METABOX_BGSIZE_CONTAIN'),
499 '100% 100%' => '100% 100%'
500 ],
501 'filter' => 'sanitize_text_field',
502 'showon' => '[bgimage]:1'
503 ],
504 [
505 'name' => 'bgposition',
506 'type' => 'Dropdown',
507 'label' => 'FPF_POSITION',
508 'description' => firebox()->_('FB_METABOX_BG_POSITION_DESC'),
509 'default' => 'Left Top',
510 'choices' => [
511 'Left Top' => firebox()->_('FB_METABOX_BG_POSITION_LEFT_TOP'),
512 'Left Center' => firebox()->_('FB_METABOX_BG_POSITION_LEFT_CENTER'),
513 'Left Bottom' => firebox()->_('FB_METABOX_BG_POSITION_LEFT_BOTTOM'),
514 'Right Top' => firebox()->_('FB_METABOX_BG_POSITION_RIGHT_TOP'),
515 'Right Center' => firebox()->_('FB_METABOX_BG_POSITION_RIGHT_CENTER'),
516 'Right Bottom' => firebox()->_('FB_METABOX_BG_POSITION_RIGHT_BOTTOM'),
517 'Center Top' => firebox()->_('FB_METABOX_BG_POSITION_CENTER_TOP'),
518 'Center Center' => firebox()->_('FB_METABOX_BG_POSITION_CENTER_CENTER'),
519 'Center Bottom' => firebox()->_('FB_METABOX_BG_POSITION_CENTER_BOTTOM')
520 ],
521 'filter' => 'sanitize_text_field',
522 'showon' => '[bgimage]:1'
523 ]
524 ]
525 ]
526 ]
527 ];
528
529 return apply_filters('firebox/box/settings/design/edit', $settings);
530 }
531 }