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

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