PluginProbe
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment / 1.1.1
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment v1.1.1
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 1.1.1, at Inc/Core/Admin/Forms/FireBox/Design.php

517 lines 14.1 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 1.1.1 Free
5 *
6 * @author FirePlugins <info@fireplugins.com>
7 * @link https://www.fireplugins.com
8 * @copyright Copyright © 2022 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' => 'FB_METABOX_DESIGN_POPUP_SIZE',
36 'description' => 'FB_METABOX_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' => 'FB_METABOX_DESIGN_POPUP',
85 'description' => 'FB_METABOX_DESIGN_POPUP_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' => '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' => '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' => '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' => 'FB_METABOX_POSITION_TL',
176 'act acc' => 'FB_METABOX_POSITION_TC',
177 'act acr' => 'FB_METABOX_POSITION_TR',
178 'acm acl' => 'FB_METABOX_POSITION_ML',
179 'acm acc' => 'FB_METABOX_POSITION_MC',
180 'acm acr' => 'FB_METABOX_POSITION_MR',
181 'acb acl' => 'FB_METABOX_POSITION_BL',
182 'acb acc' => 'FB_METABOX_POSITION_BC',
183 'acb acr' => 'FB_METABOX_POSITION_BR'
184 ],
185 'filter' => 'sanitize_text_field'
186 ],
187 [
188 'name' => 'boxshadow',
189 'type' => 'Toggle',
190 'label' => 'FB_METABOX_SHADOW',
191 'input_class' => ['default'],
192 'default' => '0',
193 'choices' => [
194 '0' => 'FPF_NONE',
195 '1' => 'FB_METABOX_SHADOW_S1',
196 '2' => 'FB_METABOX_SHADOW_S2',
197 '3' => 'FB_METABOX_SHADOW_S3',
198 'elevation' => 'FB_ELEVATION'
199 ]
200 ]
201 ]
202 ],
203 'close_button' => [
204 'title' => [
205 'title' => 'FB_METABOX_CLOSE_BUTTON',
206 'description' => '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 => 'FB_METABOX_CLOSE_BUTTON_INSIDE',
216 2 => 'FB_METABOX_CLOSE_BUTTON_OUTSIDE',
217 0 => 'FPF_HIDE'
218 ]
219 ],
220 [
221 'name' => 'closebutton.source',
222 'type' => 'Toggle',
223 'label' => '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' => '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' => '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' => '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' => 'FB_METABOX_ANIMATION',
281 'description' => 'FB_METABOX_ANIMATION_DESC',
282 ],
283 'fields' => [
284 [
285 'name' => 'animationin',
286 'type' => 'SearchDropdown',
287 'label' => 'FB_METABOX_ANIMATION_IN',
288 'default' => ['transition.slideUpIn'],
289 'control_inner_class' => ['fpf-fullwidth'],
290 'placeholder' => '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' => 'FB_METABOX_ANIMATION_OUT',
302 'default' => ['transition.fadeOut'],
303 'control_inner_class' => ['fpf-fullwidth'],
304 'placeholder' => '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' => 'FB_METABOX_DURATION',
316 'default' => 0.3,
317 'min' => 0,
318 'max' => 2,
319 'step' => 0.1,
320 'addon' => 'sec'
321 ]
322 ]
323 ],
324 'border' => [
325 'title' => [
326 'title' => 'FPF_BORDER',
327 'description' => 'FPF_BORDER_DESC'
328 ],
329 'fields' => [
330 [
331 'name' => 'bordertype',
332 'type' => 'Dropdown',
333 'label' => 'FPF_STYLE',
334 'default' => 'solid',
335 'choices' => [
336 'none' => 'FPF_NONE',
337 'solid' => 'FPF_SOLID',
338 'dotted' => 'FPF_DOTTED',
339 'double' => 'FPF_DOUBLE',
340 'dashed' => 'FPF_DASHED',
341 'inset' => 'FPF_INSET',
342 'outset' => 'FPF_OUTSET',
343 'groove' => 'FPF_GROOVE',
344 'ridge' => 'FPF_RIDGE',
345 'hidden' => 'FPF_HIDDEN'
346 ],
347 ],
348 [
349 'name' => 'bordercolor',
350 'type' => 'Color',
351 'label' => 'FPF_COLOR',
352 'default' => 'rgba(0, 0, 0, 0.4)',
353 'input_class' => ['medium'],
354 'showon' => '[bordertype]!:none'
355 ],
356 [
357 'name' => 'borderwidth',
358 'type' => 'Slider',
359 'label' => 'FPF_WIDTH',
360 'number_class' => ['xsmall'],
361 'default' => 1,
362 'min' => 0,
363 'max' => 15,
364 'units' => ['px'],
365 'showon' => '[bordertype]!:none'
366 ],
367 [
368 'name' => 'borderradius_control',
369 'type' => 'ResponsiveControl',
370 'label' => 'FB_METABOX_BORDERRADIUS',
371 'description' => 'FB_METABOX_BORDERRADIUS_DESC',
372 'control_inner_class' => ['fpf-max-width-300'],
373 'value' => [
374 'borderradius' => [
375 'desktop' => [
376 'top_left' => 0,
377 'top_right' => 0,
378 'bottom_right' => 0,
379 'bottom_left' => 0
380 ]
381 ]
382 ],
383 'fields' => [
384 [
385 'name' => 'borderradius',
386 'type' => 'Dimensions',
387 'max' => 100,
388 'units' => ['px', '%'],
389 'units_relative_position' => false,
390 'isLinked' => true,
391 'labels' => [
392 'top_left' => fpframework()->_('FPF_TOP_LEFT'),
393 'top_right' => fpframework()->_('FPF_TOP_RIGHT'),
394 'bottom_right' => fpframework()->_('FPF_BOTTOM_RIGHT'),
395 'bottom_left' => fpframework()->_('FPF_BOTTOM_LEFT')
396 ]
397 ]
398 ]
399 ],
400 ]
401 ],
402 'background_overlay' => [
403 'title' => [
404 'title' => 'FB_METABOX_BG_OVERLAY',
405 'description' => 'FB_METABOX_BG_OVERLAY_DESC'
406 ],
407 'fields' => [
408 [
409 'name' => 'overlay',
410 'type' => 'FPToggle'
411 ],
412 [
413 'name' => 'overlay_color',
414 'type' => 'Color',
415 'label' => 'FPF_BG_COLOR',
416 'description' => 'FB_METABOX_OVERLAY_COLOR_DESC',
417 'default' => 'rgba(0, 0, 0, 0.5)',
418 'input_class' => ['medium'],
419 'showon' => '[overlay]:1'
420 ],
421 [
422 'name' => 'overlayblurradius',
423 'type' => 'Slider',
424 'label' => 'FB_METABOX_OVERLAY_BLUR_RADIUS',
425 'description' => 'FB_METABOX_OVERLAY_BLUR_RADIUS_DESC',
426 'number_class' => ['xsmall'],
427 'default' => 0,
428 'min' => 0,
429 'max' => 100,
430 'addon' => '%',
431 'showon' => '[overlay]:1'
432 ],
433 [
434 'name' => 'overlayclick',
435 'type' => 'FPToggle',
436 'label' => 'FB_METABOX_OVERLAY_CLICK',
437 'description' => 'FB_METABOX_OVERLAY_CLICK_DESC',
438 'checked' => true,
439 'showon' => '[overlay]:1'
440 ]
441 ]
442 ],
443 'background_image' => [
444 'title' => [
445 'title' => 'FPF_BG_IMAGE',
446 'description' => 'FPF_BG_IMAGE_DESC'
447 ],
448 'fields' => [
449 [
450 'name' => 'bgimage',
451 'type' => 'FPToggle'
452 ],
453 [
454 'name' => 'bgimagefile',
455 'type' => 'MediaUploader',
456 'label' => 'FPF_IMAGE',
457 'description' => 'FB_METABOX_BG_IMAGE_FILE_DESC',
458 'showon' => '[bgimage]:1'
459 ],
460 [
461 'name' => 'bgrepeat',
462 'type' => 'Dropdown',
463 'label' => 'FPF_REPEAT',
464 'description' => 'FB_METABOX_BGREPEAT_DESC',
465 'default' => 'Repeat',
466 'choices' => [
467 'No-repeat' => 'FB_METABOX_BGREPEAT_NOREPEAT',
468 'Repeat' => 'FPF_REPEAT',
469 'Repeat-x' => 'FB_METABOX_BGREPEAT_REPEATX',
470 'Repeat-y' => 'FB_METABOX_BGREPEAT_REPEATY'
471 ],
472 'filter' => 'sanitize_text_field',
473 'showon' => '[bgimage]:1'
474 ],
475 [
476 'name' => 'bgsize',
477 'type' => 'Dropdown',
478 'label' => 'FPF_SIZE',
479 'description' => 'FB_METABOX_BGSIZE_DESC',
480 'default' => 'Auto',
481 'choices' => [
482 'Auto' => 'FPF_AUTO',
483 'Cover' => 'FB_METABOX_BGSIZE_COVER',
484 'Contain' => 'FB_METABOX_BGSIZE_CONTAIN',
485 '100% 100%' => '100% 100%'
486 ],
487 'filter' => 'sanitize_text_field',
488 'showon' => '[bgimage]:1'
489 ],
490 [
491 'name' => 'bgposition',
492 'type' => 'Dropdown',
493 'label' => 'FPF_POSITION',
494 'description' => 'FB_METABOX_BG_POSITION_DESC',
495 'default' => 'Left Top',
496 'choices' => [
497 'Left Top' => 'FB_METABOX_BG_POSITION_LEFT_TOP',
498 'Left Center' => 'FB_METABOX_BG_POSITION_LEFT_CENTER',
499 'Left Bottom' => 'FB_METABOX_BG_POSITION_LEFT_BOTTOM',
500 'Right Top' => 'FB_METABOX_BG_POSITION_RIGHT_TOP',
501 'Right Center' => 'FB_METABOX_BG_POSITION_RIGHT_CENTER',
502 'Right Bottom' => 'FB_METABOX_BG_POSITION_RIGHT_BOTTOM',
503 'Center Top' => 'FB_METABOX_BG_POSITION_CENTER_TOP',
504 'Center Center' => 'FB_METABOX_BG_POSITION_CENTER_CENTER',
505 'Center Bottom' => 'FB_METABOX_BG_POSITION_CENTER_BOTTOM'
506 ],
507 'filter' => 'sanitize_text_field',
508 'showon' => '[bgimage]:1'
509 ]
510 ]
511 ]
512 ]
513 ];
514
515 return apply_filters('firebox/box/settings/design/edit', $settings);
516 }
517 }