column-settings.php
20.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
<?php
FLBuilder::register_settings_form('col', array(
'title' => __('Column Settings', 'fl-builder'),
'tabs' => array(
'style' => array(
'title' => __('Style', 'fl-builder'),
'sections' => array(
'general' => array(
'title' => '',
'fields' => array(
'size' => array(
'type' => 'text',
'label' => __('Column Width', 'fl-builder'),
'default' => '',
'description' => '%',
'maxlength' => '5',
'size' => '6',
'preview' => array(
'type' => 'none'
)
),
'equal_height' => array(
'type' => 'select',
'label' => __('Equalize Column Heights', 'fl-builder'),
'help' => __('Setting this to yes will make all of the columns in this group the same height regardless of how much content is in each of them.', 'fl-builder'),
'default' => 'no',
'options' => array(
'no' => __( 'No', 'fl-builder' ),
'yes' => __( 'Yes', 'fl-builder' ),
),
'toggle' => array(
'yes' => array(
'fields' => array('content_alignment')
)
),
'preview' => array(
'type' => 'none'
)
),
'content_alignment' => array(
'type' => 'select',
'label' => __('Content Alignment', 'fl-builder'),
'default' => 'top',
'options' => array(
'top' => __( 'Top', 'fl-builder' ),
'center' => __( 'Center', 'fl-builder' ),
'bottom' => __( 'Bottom', 'fl-builder' ),
),
'preview' => array(
'type' => 'none'
)
)
)
),
'text' => array(
'title' => __('Text', 'fl-builder'),
'fields' => array(
'text_color' => array(
'type' => 'color',
'label' => __('Color', 'fl-builder'),
'show_reset' => true,
'preview' => array(
'type' => 'none'
)
),
'link_color' => array(
'type' => 'color',
'label' => __('Link Color', 'fl-builder'),
'show_reset' => true,
'preview' => array(
'type' => 'none'
)
),
'hover_color' => array(
'type' => 'color',
'label' => __('Link Hover Color', 'fl-builder'),
'show_reset' => true,
'preview' => array(
'type' => 'none'
)
),
'heading_color' => array(
'type' => 'color',
'label' => __('Heading Color', 'fl-builder'),
'show_reset' => true,
'preview' => array(
'type' => 'none'
)
)
)
),
'background' => array(
'title' => __('Background', 'fl-builder'),
'fields' => array(
'bg_type' => array(
'type' => 'select',
'label' => __('Type', 'fl-builder'),
'default' => 'color',
'options' => array(
'none' => _x( 'None', 'Background type.', 'fl-builder' ),
'color' => _x( 'Color', 'Background type.', 'fl-builder' ),
'photo' => _x( 'Photo', 'Background type.', 'fl-builder' ),
),
'toggle' => array(
'color' => array(
'sections' => array('bg_color')
),
'photo' => array(
'sections' => array('bg_photo', 'bg_overlay')
),
),
'preview' => array(
'type' => 'none'
)
)
)
),
'bg_color' => array(
'title' => __('Background Color', 'fl-builder'),
'fields' => array(
'bg_color' => array(
'type' => 'color',
'label' => __('Color', 'fl-builder'),
'show_reset' => true,
'preview' => array(
'type' => 'none'
)
),
'bg_opacity' => array(
'type' => 'text',
'label' => __('Opacity', 'fl-builder'),
'default' => '100',
'description' => '%',
'maxlength' => '3',
'size' => '5',
'preview' => array(
'type' => 'none'
)
)
)
),
'bg_photo' => array(
'title' => __('Background Photo', 'fl-builder'),
'fields' => array(
'bg_image' => array(
'type' => 'photo',
'label' => __('Photo', 'fl-builder'),
'preview' => array(
'type' => 'none'
)
),
'bg_repeat' => array(
'type' => 'select',
'label' => __('Repeat', 'fl-builder'),
'default' => 'none',
'options' => array(
'no-repeat' => _x( 'None', 'Background repeat.', 'fl-builder' ),
'repeat' => _x( 'Tile', 'Background repeat.', 'fl-builder' ),
'repeat-x' => _x( 'Horizontal', 'Background repeat.', 'fl-builder' ),
'repeat-y' => _x( 'Vertical', 'Background repeat.', 'fl-builder' )
),
'help' => __('Repeat applies to how the image should display in the background. Choosing none will display the image as uploaded. Tile will repeat the image as many times as needed to fill the background horizontally and vertically. You can also specify the image to only repeat horizontally or vertically.', 'fl-builder'),
'preview' => array(
'type' => 'none'
)
),
'bg_position' => array(
'type' => 'select',
'label' => __('Position', 'fl-builder'),
'default' => 'center center',
'options' => array(
'left top' => __('Left Top', 'fl-builder'),
'left center' => __('Left Center', 'fl-builder'),
'left bottom' => __('Left Bottom', 'fl-builder'),
'right top' => __('Right Top', 'fl-builder'),
'right center' => __('Right Center', 'fl-builder'),
'right bottom' => __('Right Bottom', 'fl-builder'),
'center top' => __('Center Top', 'fl-builder'),
'center center' => __( 'Center', 'fl-builder' ),
'center bottom' => __('Center Bottom', 'fl-builder')
),
'help' => __('Position will tell the image where it should sit in the background.', 'fl-builder'),
'preview' => array(
'type' => 'none'
)
),
'bg_attachment' => array(
'type' => 'select',
'label' => __('Attachment', 'fl-builder'),
'default' => 'scroll',
'options' => array(
'scroll' => __( 'Scroll', 'fl-builder' ),
'fixed' => __( 'Fixed', 'fl-builder' )
),
'help' => __('Attachment will specify how the image reacts when scrolling a page. When scrolling is selected, the image will scroll with page scrolling. This is the default setting. Fixed will allow the image to scroll within the background if fill is selected in the scale setting.', 'fl-builder'),
'preview' => array(
'type' => 'none'
)
),
'bg_size' => array(
'type' => 'select',
'label' => __('Scale', 'fl-builder'),
'default' => 'cover',
'options' => array(
'auto' => _x( 'None', 'Background scale.', 'fl-builder' ),
'contain' => __( 'Fit', 'fl-builder'),
'cover' => __( 'Fill', 'fl-builder')
),
'help' => __('Scale applies to how the image should display in the background. You can select either fill or fit to the background.', 'fl-builder'),
'preview' => array(
'type' => 'none'
)
)
)
),
'bg_overlay' => array(
'title' => __('Background Overlay', 'fl-builder'),
'fields' => array(
'bg_overlay_color' => array(
'type' => 'color',
'label' => __('Overlay Color', 'fl-builder'),
'show_reset' => true,
'preview' => array(
'type' => 'none'
)
),
'bg_overlay_opacity' => array(
'type' => 'text',
'label' => __('Overlay Opacity', 'fl-builder'),
'default' => '50',
'description' => '%',
'maxlength' => '3',
'size' => '5',
'preview' => array(
'type' => 'none'
)
)
)
),
'border' => array(
'title' => __('Border', 'fl-builder'),
'fields' => array(
'border_type' => array(
'type' => 'select',
'label' => __('Type', 'fl-builder'),
'default' => '',
'help' => __('The type of border to use. Double borders must have a width of at least 3px to render properly.', 'fl-builder'),
'options' => array(
'' => _x( 'None', 'Border type.', 'fl-builder' ),
'solid' => _x( 'Solid', 'Border type.', 'fl-builder' ),
'dashed' => _x( 'Dashed', 'Border type.', 'fl-builder' ),
'dotted' => _x( 'Dotted', 'Border type.', 'fl-builder' ),
'double' => _x( 'Double', 'Border type.', 'fl-builder' )
),
'toggle' => array(
'' => array(
'fields' => array()
),
'solid' => array(
'fields' => array('border_color', 'border_opacity', 'border_top', 'border_bottom', 'border_left', 'border_right')
),
'dashed' => array(
'fields' => array('border_color', 'border_opacity', 'border_top', 'border_bottom', 'border_left', 'border_right')
),
'dotted' => array(
'fields' => array('border_color', 'border_opacity', 'border_top', 'border_bottom', 'border_left', 'border_right')
),
'double' => array(
'fields' => array('border_color', 'border_opacity', 'border_top', 'border_bottom', 'border_left', 'border_right')
)
),
'preview' => array(
'type' => 'none'
)
),
'border_color' => array(
'type' => 'color',
'label' => __('Color', 'fl-builder'),
'show_reset' => true,
'preview' => array(
'type' => 'none'
)
),
'border_opacity' => array(
'type' => 'text',
'label' => __('Opacity', 'fl-builder'),
'default' => '100',
'description' => '%',
'maxlength' => '3',
'size' => '5',
'preview' => array(
'type' => 'none'
)
),
'border_top' => array(
'type' => 'unit',
'label' => __( 'Top Width', 'fl-builder' ),
'default' => '1',
'description' => 'px',
'preview' => array(
'type' => 'none',
),
'responsive' => array(
'placeholder' => array(
'default' => '0',
'medium' => '',
'responsive' => '',
)
)
),
'border_bottom' => array(
'type' => 'unit',
'label' => __( 'Bottom Width', 'fl-builder' ),
'default' => '1',
'description' => 'px',
'preview' => array(
'type' => 'none',
),
'responsive' => array(
'placeholder' => array(
'default' => '0',
'medium' => '',
'responsive' => '',
)
)
),
'border_left' => array(
'type' => 'unit',
'label' => __( 'Left Width', 'fl-builder' ),
'default' => '1',
'description' => 'px',
'preview' => array(
'type' => 'none',
),
'responsive' => array(
'placeholder' => array(
'default' => '0',
'medium' => '',
'responsive' => '',
)
)
),
'border_right' => array(
'type' => 'unit',
'label' => __( 'Right Width', 'fl-builder' ),
'default' => '1',
'description' => 'px',
'preview' => array(
'type' => 'none',
),
'responsive' => array(
'placeholder' => array(
'default' => '0',
'medium' => '',
'responsive' => '',
)
)
),
),
),
)
),
'advanced' => array(
'title' => __('Advanced', 'fl-builder'),
'sections' => array(
'margins' => array(
'title' => __('Margins', 'fl-builder'),
'fields' => array(
'margin_top' => array(
'type' => 'unit',
'label' => __( 'Top', 'fl-builder' ),
'description' => 'px',
'preview' => array(
'type' => 'none',
),
'placeholder' => '0',
'responsive' => true
),
'margin_bottom' => array(
'type' => 'unit',
'label' => __( 'Bottom', 'fl-builder' ),
'description' => 'px',
'preview' => array(
'type' => 'none',
),
'placeholder' => '0',
'responsive' => true
),
'margin_left' => array(
'type' => 'unit',
'label' => __( 'Left', 'fl-builder' ),
'description' => 'px',
'preview' => array(
'type' => 'none',
),
'placeholder' => '0',
'responsive' => true
),
'margin_right' => array(
'type' => 'unit',
'label' => __( 'Right', 'fl-builder' ),
'description' => 'px',
'preview' => array(
'type' => 'none',
),
'placeholder' => '0',
'responsive' => true
),
),
),
'padding' => array(
'title' => __('Padding', 'fl-builder'),
'fields' => array(
'padding_top' => array(
'type' => 'unit',
'label' => __( 'Top', 'fl-builder' ),
'description' => 'px',
'preview' => array(
'type' => 'none',
),
'placeholder' => '0',
'responsive' => true
),
'padding_bottom' => array(
'type' => 'unit',
'label' => __( 'Bottom', 'fl-builder' ),
'description' => 'px',
'preview' => array(
'type' => 'none',
),
'placeholder' => '0',
'responsive' => true
),
'padding_left' => array(
'type' => 'unit',
'label' => __( 'Left', 'fl-builder' ),
'description' => 'px',
'preview' => array(
'type' => 'none',
),
'placeholder' => '0',
'responsive' => true
),
'padding_right' => array(
'type' => 'unit',
'label' => __( 'Right', 'fl-builder' ),
'description' => 'px',
'preview' => array(
'type' => 'none',
),
'placeholder' => '0',
'responsive' => true
),
),
),
'responsive' => array(
'title' => __('Responsive Layout', 'fl-builder'),
'fields' => array(
'responsive_display' => array(
'type' => 'select',
'label' => __('Display', 'fl-builder'),
'options' => array(
'' => __('Always', 'fl-builder'),
'desktop' => __('Large Devices Only', 'fl-builder'),
'desktop-medium' => __('Large & Medium Devices Only', 'fl-builder'),
'medium' => __('Medium Devices Only', 'fl-builder'),
'medium-mobile' => __('Medium & Small Devices Only', 'fl-builder'),
'mobile' => __('Small Devices Only', 'fl-builder'),
),
'help' => __( 'Choose whether to show or hide this column at different device sizes.', 'fl-builder' ),
'preview' => array(
'type' => 'none'
)
),
'medium_size' => array(
'type' => 'select',
'label' => __('Medium Device Width', 'fl-builder'),
'help' => __( 'The width of this column on medium devices such as tablets.', 'fl-builder' ),
'options' => array(
'default' => __('Default', 'fl-builder'),
'custom' => __('Custom', 'fl-builder'),
),
'toggle' => array(
'custom' => array(
'fields' => array('custom_medium_size')
)
),
'preview' => array(
'type' => 'none'
)
),
'custom_medium_size' => array(
'type' => 'text',
'label' => __('Custom Medium Device Width', 'fl-builder'),
'default' => '100',
'description' => '%',
'maxlength' => '5',
'size' => '6',
'preview' => array(
'type' => 'none'
)
),
'responsive_size' => array(
'type' => 'select',
'label' => __('Small Device Width', 'fl-builder'),
'help' => __( 'The width of this column on small devices such as phones.', 'fl-builder' ),
'options' => array(
'default' => __('Default', 'fl-builder'),
'custom' => __('Custom', 'fl-builder'),
),
'toggle' => array(
'custom' => array(
'fields' => array('custom_responsive_size')
)
),
'preview' => array(
'type' => 'none'
)
),
'custom_responsive_size' => array(
'type' => 'text',
'label' => __( 'Custom Small Device Width', 'fl-builder' ),
'default' => '100',
'description' => '%',
'maxlength' => '5',
'size' => '6',
'preview' => array(
'type' => 'none'
)
),
'responsive_order' => array(
'type' => 'select',
'label' => __('Stacking Order', 'fl-builder'),
'help' => __( 'The order of the columns in this group when they are stacked for small devices.', 'fl-builder' ),
'default' => 'default',
'options' => array(
'default' => __('Default', 'fl-builder'),
'reversed' => __('Reversed', 'fl-builder'),
),
'preview' => array(
'type' => 'none'
)
)
)
),
'visibility' => array(
'title' => __('Visibility', 'fl-builder'),
'fields' => array(
'visibility_display' => array(
'type' => 'select',
'label' => __('Display', 'fl-builder'),
'options' => array(
'' => __('Always', 'fl-builder'),
'logged_out' => __('Logged Out User', 'fl-builder'),
'logged_in' => __('Logged In User', 'fl-builder'),
'0' => __('Never', 'fl-builder'),
),
'toggle' => array(
'logged_in' => array(
'fields' => array('visibility_user_capability')
)
),
'preview' => array(
'type' => 'none'
)
),
'visibility_user_capability' => array(
'type' => 'text',
'label' => __('User Capability', 'fl-builder'),
'description' => sprintf( __( 'Optional. Set the <a%s>capability</a> required for users to view this column.', 'fl-builder' ), ' href="http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table" target="_blank"' ),
'preview' => array(
'type' => 'none'
),
)
)
),
'css_selectors' => array(
'title' => __('CSS Selectors', 'fl-builder'),
'fields' => array(
'id' => array(
'type' => 'text',
'label' => __('ID', 'fl-builder'),
'help' => __( "A unique ID that will be applied to this column's HTML. Must start with a letter and only contain dashes, underscores, letters or numbers. No spaces.", 'fl-builder' ),
'preview' => array(
'type' => 'none'
)
),
'class' => array(
'type' => 'text',
'label' => __('CSS Class', 'fl-builder'),
'help' => __( "A class that will be applied to this column's HTML. Must start with a letter and only contain dashes, underscores, letters or numbers. Separate multiple classes with spaces.", 'fl-builder' ),
'preview' => array(
'type' => 'none'
)
)
)
)
)
)
)
));