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
firebox / Inc / Core / Admin / Forms / FireBox / Design.php

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

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