Diff: STRATO-apps/wordpress_03/app/wp-content/themes/blocksy/inc/options/general/posts-listing.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
3
+
if (! isset($is_cpt)) {
4
+
$is_cpt = false;
5
+
}
6
+
7
+
if (! isset($prefix)) {
8
+
$prefix = '';
9
+
} else {
10
+
$prefix = $prefix . '_';
11
+
}
12
+
13
+
if (! isset($title)) {
14
+
$title = __('Blog', 'blocksy');
15
+
}
16
+
17
+
$has_card_matching_template = (
18
+
function_exists('blc_get_content_block_that_matches')
19
+
&&
20
+
blc_get_content_block_that_matches([
21
+
'template_type' => 'archive',
22
+
'template_subtype' => 'card',
23
+
'match_conditions_strategy' => rtrim($prefix, '_')
24
+
])
25
+
);
26
+
27
+
$overridable_card_options = [
28
+
blocksy_rand_md5() => [
29
+
'title' => __('General', 'blocksy'),
30
+
'type' => 'tab',
31
+
'options' => [
32
+
[
33
+
blocksy_rand_md5() => [
34
+
'type' => 'ct-condition',
35
+
'condition' => [
36
+
$prefix . 'structure' => '!gutenberg'
37
+
],
38
+
'perform_replace' => $has_card_matching_template ? [
39
+
[
40
+
'condition' => [
41
+
$prefix . 'structure' => '!__never__'
42
+
],
43
+
'key' => $prefix . 'structure',
44
+
'from' => 'simple',
45
+
'to' => 'grid'
46
+
],
47
+
48
+
[
49
+
'condition' => [
50
+
$prefix . 'structure' => '!__never__'
51
+
],
52
+
'key' => $prefix . 'structure',
53
+
'from' => 'gutenberg',
54
+
'to' => 'grid'
55
+
]
56
+
] : [],
57
+
58
+
'options' => [
59
+
$prefix . 'card_type' => [
60
+
'label' => __('Card Type', 'blocksy'),
61
+
'type' => 'ct-radio',
62
+
'value' => 'boxed',
63
+
'view' => 'text',
64
+
'divider' => 'bottom:full',
65
+
'choices' => [
66
+
'simple' => __('Simple', 'blocksy'),
67
+
'boxed' => __('Boxed', 'blocksy'),
68
+
'cover' => __('Cover', 'blocksy'),
69
+
],
70
+
'conditions' => [
71
+
'cover' => $has_card_matching_template ? [
72
+
$prefix . 'structure' => '__never__'
73
+
] : [
74
+
$prefix . 'structure' => '!simple'
75
+
]
76
+
],
77
+
'sync' => blocksy_sync_whole_page([
78
+
'prefix' => $prefix,
79
+
'loader_selector' => '.entries > article[id]'
80
+
])
81
+
],
82
+
],
83
+
],
84
+
],
85
+
86
+
[
87
+
$prefix . 'archive_order' => apply_filters('blocksy:options:posts-listing-archive-order', [
88
+
'label' => __('Card Elements', 'blocksy'),
89
+
'type' => $has_card_matching_template ? 'hidden' : 'ct-layers',
90
+
91
+
'sync' => [
92
+
blocksy_sync_whole_page([
93
+
'prefix' => $prefix,
94
+
'loader_selector' => '.entries .entry-card'
95
+
]),
96
+
97
+
blocksy_sync_whole_page([
98
+
'id' => $prefix . 'dynamic_data_sync',
99
+
'prefix' => $prefix,
100
+
'loader_selector' => '.entries .ct-dynamic-data-layer'
101
+
]),
102
+
103
+
[
104
+
'prefix' => $prefix,
105
+
'id' => $prefix . 'archive_order_heading_tag',
106
+
'loader_selector' => '.entry-title',
107
+
'container_inclusive' => false
108
+
],
109
+
110
+
[
111
+
'prefix' => $prefix,
112
+
'id' => $prefix . 'archive_order_image',
113
+
'loader_selector' => '.ct-media-container',
114
+
'container_inclusive' => false
115
+
],
116
+
117
+
[
118
+
'prefix' => $prefix,
119
+
'id' => $prefix . 'archive_order_button',
120
+
'loader_selector' => '.entry-button',
121
+
'container_inclusive' => false
122
+
],
123
+
124
+
[
125
+
'prefix' => $prefix,
126
+
'id' => $prefix . 'archive_order_skip',
127
+
'loader_selector' => 'skip',
128
+
'container_inclusive' => false
129
+
],
130
+
131
+
[
132
+
'prefix' => $prefix,
133
+
'id' => $prefix . 'archive_order_meta_first',
134
+
'loader_selector' => '.entries .entry-meta:1',
135
+
'container_inclusive' => false
136
+
],
137
+
138
+
[
139
+
'prefix' => $prefix,
140
+
'id' => $prefix . 'archive_order_meta_second',
141
+
'loader_selector' => '.entries .entry-meta:2',
142
+
'container_inclusive' => false
143
+
],
144
+
],
145
+
146
+
'value' => [
147
+
[
148
+
'id' => 'post_meta',
149
+
'enabled' => true,
150
+
'meta_elements' => blocksy_post_meta_defaults([
151
+
[
152
+
'id' => 'categories',
153
+
'enabled' => true,
154
+
],
155
+
]),
156
+
'meta_type' => 'simple',
157
+
'meta_divider' => 'slash',
158
+
'__id' => 'meta_1',
159
+
],
160
+
161
+
[
162
+
'id' => 'title',
163
+
'heading_tag' => 'h2',
164
+
'enabled' => true,
165
+
'has_link' => 'yes',
166
+
],
167
+
168
+
[
169
+
'id' => 'featured_image',
170
+
'thumb_ratio' => '4/3',
171
+
'is_boundless' => 'yes',
172
+
'image_size' => 'medium_large',
173
+
'enabled' => true,
174
+
'has_link' => 'yes',
175
+
],
176
+
177
+
[
178
+
'id' => 'excerpt',
179
+
'excerpt_length' => '40',
180
+
'enabled' => true,
181
+
],
182
+
183
+
[
184
+
'id' => 'read_more',
185
+
'button_type' => 'background',
186
+
'enabled' => false,
187
+
],
188
+
189
+
[
190
+
'id' => 'post_meta',
191
+
'enabled' => true,
192
+
'meta_elements' => blocksy_post_meta_defaults([
193
+
[
194
+
'id' => 'author',
195
+
'enabled' => true,
196
+
],
197
+
198
+
[
199
+
'id' => 'post_date',
200
+
'enabled' => true,
201
+
],
202
+
203
+
[
204
+
'id' => 'comments',
205
+
'enabled' => true,
206
+
],
207
+
]),
208
+
'meta_type' => 'simple',
209
+
'meta_divider' => 'slash',
210
+
'__id' => 'meta_2',
211
+
],
212
+
213
+
[
214
+
'id' => 'divider',
215
+
'enabled' => false
216
+
]
217
+
],
218
+
219
+
'settings' => [
220
+
'title' => [
221
+
'label' => __('Title', 'blocksy'),
222
+
'options' => [
223
+
224
+
'heading_tag' => [
225
+
'label' => __('Heading Tag', 'blocksy'),
226
+
'type' => 'ct-select',
227
+
'value' => 'h2',
228
+
'view' => 'text',
229
+
'design' => 'block',
230
+
'sync' => [
231
+
'id' => $prefix . 'archive_order_heading_tag',
232
+
],
233
+
'choices' => blocksy_ordered_keys(
234
+
[
235
+
'h1' => 'H1',
236
+
'h2' => 'H2',
237
+
'h3' => 'H3',
238
+
'h4' => 'H4',
239
+
'h5' => 'H5',
240
+
'h6' => 'H6',
241
+
]
242
+
),
243
+
],
244
+
245
+
'has_link' => [
246
+
'label' => __('Link To Post', 'blocksy'),
247
+
'type' => 'ct-switch',
248
+
'value' => 'yes',
249
+
'sync' => [
250
+
'id' => $prefix . 'archive_order_heading_tag',
251
+
],
252
+
],
253
+
254
+
'spacing' => [
255
+
'label' => __('Bottom Spacing', 'blocksy'),
256
+
'type' => 'ct-slider',
257
+
'min' => 0,
258
+
'max' => 100,
259
+
'value' => 20,
260
+
'responsive' => true,
261
+
'sync' => [
262
+
'id' => $prefix . 'archive_order_skip'
263
+
],
264
+
],
265
+
266
+
],
267
+
],
268
+
269
+
'featured_image' => [
270
+
'label' => __('Featured Image', 'blocksy'),
271
+
'options' => [
272
+
[
273
+
274
+
blocksy_rand_md5() => [
275
+
'type' => 'ct-condition',
276
+
'condition' => [
277
+
$prefix . 'card_type' => '!cover',
278
+
],
279
+
'values_source' => 'global',
280
+
'perform_replace' => [
281
+
'condition' => $has_card_matching_template ? [
282
+
$prefix . 'structure' => '!__never__'
283
+
] : [
284
+
$prefix . 'structure' => 'simple|gutenberg'
285
+
],
286
+
'key' => $prefix . 'card_type',
287
+
'from' => 'cover',
288
+
'to' => 'boxed'
289
+
],
290
+
'options' => [
291
+
'thumb_ratio' => [
292
+
'label' => __('Image Ratio', 'blocksy'),
293
+
'type' => 'ct-ratio',
294
+
'view' => 'inline',
295
+
'value' => '4/3',
296
+
'sync' => [
297
+
'id' => $prefix . 'archive_order_skip',
298
+
],
299
+
],
300
+
],
301
+
],
302
+
303
+
blocksy_rand_md5() => [
304
+
'type' => 'ct-condition',
305
+
'condition' => [
306
+
$prefix . 'structure' => 'simple'
307
+
],
308
+
'values_source' => 'global',
309
+
'options' => [
310
+
311
+
'image_width' => [
312
+
'label' => __( 'Image Width', 'blocksy' ),
313
+
'type' => 'ct-slider',
314
+
'value' => 40,
315
+
'min' => 10,
316
+
'max' => 70,
317
+
'defaultUnit' => '%',
318
+
'sync' => [
319
+
'id' => $prefix . 'archive_order_skip',
320
+
],
321
+
],
322
+
323
+
],
324
+
],
325
+
326
+
'image_size' => [
327
+
'label' => __('Image Size', 'blocksy'),
328
+
'type' => 'ct-select',
329
+
'value' => 'medium_large',
330
+
'view' => 'text',
331
+
'design' => 'block',
332
+
'sync' => [
333
+
'id' => $prefix . 'archive_order_image',
334
+
],
335
+
'choices' => blocksy_ordered_keys(
336
+
blocksy_get_all_image_sizes()
337
+
),
338
+
],
339
+
340
+
'image_hover_effect' => [
341
+
'label' => __( 'Hover Effect', 'blocksy' ),
342
+
'type' => 'ct-select',
343
+
'value' => 'none',
344
+
'view' => 'text',
345
+
'design' => 'block',
346
+
'setting' => [ 'transport' => 'postMessage' ],
347
+
'choices' => blocksy_ordered_keys(
348
+
[
349
+
'none' => __( 'None', 'blocksy' ),
350
+
'zoom-in' => __( 'Zoom In', 'blocksy' ),
351
+
'zoom-out' => __( 'Zoom Out', 'blocksy' ),
352
+
]
353
+
),
354
+
355
+
'sync' => blocksy_sync_whole_page([
356
+
'prefix' => $prefix,
357
+
'loader_selector' => '.entries > article'
358
+
]),
359
+
],
360
+
],
361
+
362
+
[
363
+
(
364
+
function_exists('blc_site_has_feature')
365
+
&&
366
+
blc_site_has_feature('base_pro')
367
+
) ? [
368
+
'has_archive_video_thumbnail' => [
369
+
'label' => __( 'Video Thumbnail', 'blocksy' ),
370
+
'type' => 'ct-switch',
371
+
'value' => 'no',
372
+
'sync' => blocksy_sync_whole_page([
373
+
'prefix' => $prefix,
374
+
'loader_selector' => '.entries > article'
375
+
]),
376
+
],
377
+
] : []
378
+
],
379
+
380
+
blocksy_rand_md5() => [
381
+
'type' => 'ct-condition',
382
+
'condition' => [
383
+
$prefix . 'card_type' => 'boxed',
384
+
$prefix . 'structure' => '!gutenberg'
385
+
],
386
+
'values_source' => 'global',
387
+
'perform_replace' => $has_card_matching_template ? [
388
+
[
389
+
'condition' => [
390
+
$prefix . 'structure' => '!__never__'
391
+
],
392
+
'key' => $prefix . 'structure',
393
+
'from' => 'simple',
394
+
'to' => 'grid'
395
+
],
396
+
397
+
[
398
+
'condition' => [
399
+
$prefix . 'structure' => '!__never__'
400
+
],
401
+
'key' => $prefix . 'structure',
402
+
'from' => 'gutenberg',
403
+
'to' => 'grid'
404
+
]
405
+
] : [],
406
+
'options' => [
407
+
'is_boundless' => [
408
+
'label' => __('Boundless Image', 'blocksy'),
409
+
'type' => 'ct-switch',
410
+
'sync' => [
411
+
'id' => $prefix . 'archive_order_skip',
412
+
],
413
+
'value' => 'yes',
414
+
],
415
+
],
416
+
],
417
+
418
+
'has_link' => [
419
+
'label' => __('Link To Post', 'blocksy'),
420
+
'type' => 'ct-switch',
421
+
'value' => 'yes',
422
+
'sync' => [
423
+
'id' => $prefix . 'archive_order_image',
424
+
],
425
+
],
426
+
427
+
'spacing' => [
428
+
'label' => __('Bottom Spacing', 'blocksy'),
429
+
'type' => 'ct-slider',
430
+
'min' => 0,
431
+
'max' => 100,
432
+
'value' => 30,
433
+
'responsive' => true,
434
+
'sync' => [
435
+
'id' => $prefix . 'archive_order_skip'
436
+
],
437
+
],
438
+
],
439
+
],
440
+
441
+
'excerpt' => [
442
+
'label' => __('Excerpt', 'blocksy'),
443
+
'options' => [
444
+
'excerpt_source' => [
445
+
'label' => false,
446
+
'type' => 'ct-radio',
447
+
'value' => 'excerpt',
448
+
'view' => 'text',
449
+
'choices' => [
450
+
'excerpt' => __('Default', 'blocksy'),
451
+
'full' => __('Full Post', 'blocksy'),
452
+
],
453
+
],
454
+
455
+
blocksy_rand_md5() => [
456
+
'type' => 'ct-condition',
457
+
'condition' => [ 'excerpt_source' => 'excerpt' ],
458
+
'options' => [
459
+
460
+
'excerpt_length' => [
461
+
'label' => __('Length', 'blocksy'),
462
+
'type' => 'ct-number',
463
+
'design' => 'inline',
464
+
'value' => 40,
465
+
'min' => 1,
466
+
'max' => 300,
467
+
],
468
+
469
+
],
470
+
],
471
+
472
+
'spacing' => [
473
+
'label' => __('Bottom Spacing', 'blocksy'),
474
+
'type' => 'ct-slider',
475
+
'min' => 0,
476
+
'max' => 100,
477
+
'value' => 20,
478
+
'responsive' => true,
479
+
'sync' => [
480
+
'id' => $prefix . 'archive_order_skip'
481
+
],
482
+
],
483
+
],
484
+
],
485
+
486
+
'read_more' => [
487
+
'label' => __('Read More Button', 'blocksy'),
488
+
'options' => [
489
+
'button_type' => [
490
+
'label' => __('Button Type', 'blocksy'),
491
+
'type' => 'ct-radio',
492
+
'value' => 'background',
493
+
'view' => 'text',
494
+
'choices' => [
495
+
'simple' => __('Simple', 'blocksy'),
496
+
'background' => __('Background', 'blocksy'),
497
+
'outline' => __('Outline', 'blocksy'),
498
+
],
499
+
500
+
'sync' => [
501
+
'id' => $prefix . 'archive_order_skip',
502
+
]
503
+
],
504
+
505
+
'read_more_text' => [
506
+
'label' => __('Text', 'blocksy'),
507
+
'type' => 'text',
508
+
'design' => 'inline',
509
+
'value' => __('Read More', 'blocksy'),
510
+
'sync' => [
511
+
'id' => $prefix . 'archive_order_skip',
512
+
]
513
+
],
514
+
515
+
'read_more_arrow' => [
516
+
'label' => __('Show Arrow', 'blocksy'),
517
+
'type' => 'ct-switch',
518
+
'value' => 'no',
519
+
'sync' => [
520
+
'id' => $prefix . 'archive_order_button',
521
+
]
522
+
],
523
+
524
+
'spacing' => [
525
+
'label' => __('Bottom Spacing', 'blocksy'),
526
+
'type' => 'ct-slider',
527
+
'min' => 0,
528
+
'max' => 100,
529
+
'value' => 20,
530
+
'responsive' => true,
531
+
'sync' => [
532
+
'id' => $prefix . 'archive_order_skip'
533
+
],
534
+
],
535
+
],
536
+
],
537
+
538
+
'post_meta' => [
539
+
'label' => __('Post Meta', 'blocksy'),
540
+
'clone' => true,
541
+
'sync' => [
542
+
'id' => $prefix . 'archive_order_meta'
543
+
],
544
+
'options' => [
545
+
blocksy_get_options('general/meta', [
546
+
'is_cpt' => $is_cpt,
547
+
'computed_cpt' => $is_cpt ? trim(
548
+
$prefix, '_'
549
+
) : false,
550
+
'skip_sync_id' => [
551
+
'id' => $prefix . 'archive_order_skip'
552
+
],
553
+
'meta_elements' => blocksy_post_meta_defaults([
554
+
[
555
+
'id' => 'author',
556
+
'enabled' => true,
557
+
],
558
+
559
+
[
560
+
'id' => 'post_date',
561
+
'enabled' => true,
562
+
],
563
+
564
+
[
565
+
'id' => 'comments',
566
+
'enabled' => true,
567
+
],
568
+
]),
569
+
]),
570
+
571
+
'spacing' => [
572
+
'label' => __('Bottom Spacing', 'blocksy'),
573
+
'type' => 'ct-slider',
574
+
'min' => 0,
575
+
'max' => 100,
576
+
'value' => 15,
577
+
'responsive' => true,
578
+
'sync' => [
579
+
'id' => $prefix . 'archive_order_skip'
580
+
],
581
+
],
582
+
]
583
+
],
584
+
585
+
'divider' => [
586
+
'label' => __('Divider', 'blocksy'),
587
+
'clone' => true,
588
+
'sync' => [
589
+
'id' => $prefix . 'archive_order_meta'
590
+
],
591
+
'options' => [
592
+
'spacing' => [
593
+
'label' => __('Bottom Spacing', 'blocksy'),
594
+
'type' => 'ct-slider',
595
+
'min' => 0,
596
+
'max' => 100,
597
+
'value' => 20,
598
+
'responsive' => true,
599
+
'sync' => [
600
+
'id' => $prefix . 'archive_order_skip'
601
+
],
602
+
],
603
+
]
604
+
]
605
+
],
606
+
], trim($prefix, '_'), $prefix . 'archive_order_skip'),
607
+
],
608
+
609
+
$has_card_matching_template ? [] : [
610
+
blocksy_rand_md5() => [
611
+
'type' => 'ct-divider',
612
+
],
613
+
],
614
+
615
+
[
616
+
blocksy_rand_md5() => [
617
+
'type' => 'ct-condition',
618
+
'condition' => [
619
+
$prefix . 'card_type' => 'cover',
620
+
$prefix . 'structure' => '!gutenberg'
621
+
],
622
+
'perform_replace' => array_merge([
623
+
'condition' => $has_card_matching_template ? [
624
+
$prefix . 'structure' => '!__never__'
625
+
] : [
626
+
$prefix . 'structure' => 'simple'
627
+
],
628
+
'key' => $prefix . 'card_type',
629
+
'from' => 'cover',
630
+
'to' => 'boxed'
631
+
], $has_card_matching_template ? [
632
+
[
633
+
'condition' => [
634
+
$prefix . 'structure' => '!__never__'
635
+
],
636
+
'key' => $prefix . 'structure',
637
+
'from' => 'simple',
638
+
'to' => 'grid'
639
+
],
640
+
641
+
[
642
+
'condition' => [
643
+
$prefix . 'structure' => '!__never__'
644
+
],
645
+
'key' => $prefix . 'structure',
646
+
'from' => 'gutenberg',
647
+
'to' => 'grid'
648
+
]
649
+
] : []),
650
+
'options' => [
651
+
$prefix . 'card_min_height' => [
652
+
'label' => __( 'Card Min Height', 'blocksy' ),
653
+
'type' => 'ct-slider',
654
+
'min' => 0,
655
+
'max' => 1000,
656
+
'responsive' => true,
657
+
'sync' => 'live',
658
+
'value' => 400,
659
+
'divider' => 'bottom',
660
+
],
661
+
],
662
+
],
663
+
664
+
$prefix . 'cardsGap' => [
665
+
'label' => __( 'Cards Gap', 'blocksy' ),
666
+
'type' => 'ct-slider',
667
+
'value' => '30px',
668
+
'units' => [
669
+
['unit' => 'px', 'min' => 0, 'max' => 100],
670
+
['unit' => 'em', 'min' => 0, 'max' => 100],
671
+
['unit' => 'rem', 'min' => 0, 'max' => 100],
672
+
['unit' => 'vw', 'min' => 0, 'max' => 100],
673
+
['unit' => 'vh', 'min' => 0, 'max' => 100],
674
+
['unit' => '', 'type' => 'custom'],
675
+
],
676
+
'responsive' => true,
677
+
'sync' => 'live',
678
+
],
679
+
680
+
blocksy_rand_md5() => [
681
+
'type' => 'ct-condition',
682
+
'condition' => [
683
+
$prefix . 'structure' => '!gutenberg',
684
+
$prefix . 'card_type' => 'cover|boxed',
685
+
],
686
+
'perform_replace' => array_merge([
687
+
'condition' => $has_card_matching_template ? [
688
+
$prefix . 'structure' => '!__never__'
689
+
] : [
690
+
$prefix . 'structure' => 'simple'
691
+
],
692
+
'key' => $prefix . 'card_type',
693
+
'from' => 'cover',
694
+
'to' => 'boxed'
695
+
], $has_card_matching_template ? [
696
+
[
697
+
'condition' => [
698
+
$prefix . 'structure' => '!__never__'
699
+
],
700
+
'key' => $prefix . 'structure',
701
+
'from' => 'simple',
702
+
'to' => 'grid'
703
+
],
704
+
705
+
[
706
+
'condition' => [
707
+
$prefix . 'structure' => '!__never__'
708
+
],
709
+
'key' => $prefix . 'structure',
710
+
'from' => 'gutenberg',
711
+
'to' => 'grid'
712
+
]
713
+
] : []),
714
+
'options' => $has_card_matching_template ? [] : [
715
+
$prefix . 'card_spacing' => [
716
+
'label' => __( 'Card Inner Spacing', 'blocksy' ),
717
+
'type' => 'ct-slider',
718
+
'value' => '30px',
719
+
'units' => [
720
+
['unit' => 'px', 'min' => 0, 'max' => 100],
721
+
['unit' => 'em', 'min' => 0, 'max' => 100],
722
+
['unit' => 'rem', 'min' => 0, 'max' => 100],
723
+
['unit' => 'vw', 'min' => 0, 'max' => 100],
724
+
['unit' => 'vh', 'min' => 0, 'max' => 100],
725
+
['unit' => '', 'type' => 'custom'],
726
+
],
727
+
'responsive' => true,
728
+
'sync' => 'live',
729
+
'divider' => 'top',
730
+
],
731
+
],
732
+
],
733
+
],
734
+
735
+
$has_card_matching_template ? [] : [
736
+
$prefix . 'content_horizontal_alignment' => [
737
+
'type' => $has_card_matching_template ? 'hidden' : 'ct-radio',
738
+
'label' => __( 'Horizontal Alignment', 'blocksy' ),
739
+
'view' => 'text',
740
+
'design' => 'block',
741
+
'divider' => 'top',
742
+
'responsive' => true,
743
+
'attr' => [ 'data-type' => 'alignment' ],
744
+
'setting' => [ 'transport' => 'postMessage' ],
745
+
'value' => 'CT_CSS_SKIP_RULE',
746
+
'choices' => [
747
+
'start' => '',
748
+
'center' => '',
749
+
'end' => '',
750
+
],
751
+
],
752
+
],
753
+
754
+
blocksy_rand_md5() => [
755
+
'type' => 'ct-condition',
756
+
'condition' => [
757
+
$prefix . 'structure' => '!gutenberg',
758
+
$prefix . 'card_type' => 'cover',
759
+
],
760
+
'perform_replace' => array_merge([
761
+
'condition' => $has_card_matching_template ? [
762
+
$prefix . 'structure' => '!__never__'
763
+
] : [
764
+
$prefix . 'structure' => 'simple'
765
+
],
766
+
'key' => $prefix . 'card_type',
767
+
'from' => 'cover',
768
+
'to' => 'boxed'
769
+
], $has_card_matching_template ? [
770
+
[
771
+
'condition' => [
772
+
$prefix . 'structure' => '!__never__'
773
+
],
774
+
'key' => $prefix . 'structure',
775
+
'from' => 'simple',
776
+
'to' => 'grid'
777
+
],
778
+
779
+
[
780
+
'condition' => [
781
+
$prefix . 'structure' => '!__never__'
782
+
],
783
+
'key' => $prefix . 'structure',
784
+
'from' => 'gutenberg',
785
+
'to' => 'grid'
786
+
]
787
+
] : []),
788
+
'options' => $has_card_matching_template ? [] : [
789
+
$prefix . 'content_vertical_alignment' => [
790
+
'type' => 'ct-radio',
791
+
'label' => __( 'Vertical Alignment', 'blocksy' ),
792
+
'view' => 'text',
793
+
'design' => 'block',
794
+
'divider' => 'top',
795
+
'responsive' => true,
796
+
'attr' => [ 'data-type' => 'vertical-alignment' ],
797
+
'setting' => [ 'transport' => 'postMessage' ],
798
+
'value' => 'CT_CSS_SKIP_RULE',
799
+
'choices' => [
800
+
'flex-start' => '',
801
+
'center' => '',
802
+
'flex-end' => '',
803
+
],
804
+
],
805
+
],
806
+
],
807
+
808
+
],
809
+
],
810
+
811
+
blocksy_rand_md5() => [
812
+
'title' => __( 'Design', 'blocksy' ),
813
+
'type' => 'tab',
814
+
'options' => apply_filters('blocksy:options:posts-listing:design', [
815
+
[
816
+
blocksy_rand_md5() => [
817
+
'type' => 'ct-condition',
818
+
'condition' => [
819
+
$prefix . 'archive_order:array-ids:title:enabled' => '!no'
820
+
],
821
+
'options' => [
822
+
$prefix . 'cardTitleFont' => [
823
+
'type' => 'ct-typography',
824
+
'label' => __( 'Title Font', 'blocksy' ),
825
+
'sync' => 'live',
826
+
'value' => blocksy_typography_default_values([
827
+
'size' => [
828
+
'desktop' => '20px',
829
+
'tablet' => '20px',
830
+
'mobile' => '18px'
831
+
],
832
+
'line-height' => '1.3'
833
+
]),
834
+
],
835
+
836
+
$prefix . 'cardTitleColor' => [
837
+
'label' => __( 'Title Font Color', 'blocksy' ),
838
+
'type' => 'ct-color-picker',
839
+
'sync' => 'live',
840
+
'design' => 'inline',
841
+
842
+
'value' => [
843
+
'default' => [
844
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
845
+
],
846
+
847
+
'hover' => [
848
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
849
+
],
850
+
],
851
+
852
+
'pickers' => [
853
+
[
854
+
'title' => __( 'Initial', 'blocksy' ),
855
+
'id' => 'default',
856
+
'inherit' => [
857
+
'var(--theme-heading-1-color, var(--theme-headings-color))' => [
858
+
$prefix . 'archive_order:array-ids:title:heading_tag' => 'h1'
859
+
],
860
+
861
+
'var(--theme-heading-2-color, var(--theme-headings-color))' => [
862
+
$prefix . 'archive_order:array-ids:title:heading_tag' => 'h2'
863
+
],
864
+
865
+
'var(--theme-heading-3-color, var(--theme-headings-color))' => [
866
+
$prefix . 'archive_order:array-ids:title:heading_tag' => 'h3'
867
+
],
868
+
869
+
'var(--theme-heading-4-color, var(--theme-headings-color))' => [
870
+
$prefix . 'archive_order:array-ids:title:heading_tag' => 'h4'
871
+
],
872
+
873
+
'var(--theme-heading-5-color, var(--theme-headings-color))' => [
874
+
$prefix . 'archive_order:array-ids:title:heading_tag' => 'h5'
875
+
],
876
+
877
+
'var(--theme-heading-6-color, var(--theme-headings-color))' => [
878
+
$prefix . 'archive_order:array-ids:title:heading_tag' => 'h6'
879
+
]
880
+
]
881
+
],
882
+
883
+
[
884
+
'title' => __( 'Hover', 'blocksy' ),
885
+
'id' => 'hover',
886
+
'inherit' => 'var(--theme-link-hover-color)'
887
+
],
888
+
],
889
+
],
890
+
891
+
blocksy_rand_md5() => [
892
+
'type' => 'ct-divider',
893
+
],
894
+
895
+
],
896
+
],
897
+
898
+
blocksy_rand_md5() => [
899
+
'type' => 'ct-condition',
900
+
'condition' => [
901
+
$prefix . 'archive_order:array-ids:excerpt:enabled' => '!no'
902
+
],
903
+
'options' => [
904
+
905
+
$prefix . 'cardExcerptFont' => [
906
+
'type' => 'ct-typography',
907
+
'label' => __( 'Excerpt Font', 'blocksy' ),
908
+
'sync' => 'live',
909
+
'value' => blocksy_typography_default_values([]),
910
+
],
911
+
912
+
$prefix . 'cardExcerptColor' => [
913
+
'label' => __( 'Excerpt Color', 'blocksy' ),
914
+
'type' => 'ct-color-picker',
915
+
'design' => 'inline',
916
+
'noColor' => [ 'background' => 'var(--theme-text-color)'],
917
+
'sync' => 'live',
918
+
'value' => [
919
+
'default' => [
920
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
921
+
],
922
+
],
923
+
924
+
'pickers' => [
925
+
[
926
+
'title' => __( 'Initial', 'blocksy' ),
927
+
'id' => 'default',
928
+
'inherit' => 'var(--theme-text-color)'
929
+
],
930
+
],
931
+
],
932
+
933
+
blocksy_rand_md5() => [
934
+
'type' => 'ct-divider',
935
+
],
936
+
937
+
],
938
+
],
939
+
940
+
$prefix . 'cardMetaFont' => [
941
+
'type' => 'ct-typography',
942
+
'label' => __( 'Meta Font', 'blocksy' ),
943
+
'sync' => 'live',
944
+
'value' => blocksy_typography_default_values([
945
+
'size' => [
946
+
'desktop' => '12px',
947
+
'tablet' => '12px',
948
+
'mobile' => '12px'
949
+
],
950
+
'variation' => 'n6',
951
+
'text-transform' => 'uppercase',
952
+
]),
953
+
],
954
+
955
+
$prefix . 'cardMetaColor' => [
956
+
'label' => __( 'Meta Font Color', 'blocksy' ),
957
+
'type' => 'ct-color-picker',
958
+
'design' => 'inline',
959
+
'noColor' => [ 'background' => 'var(--theme-text-color)'],
960
+
'sync' => 'live',
961
+
'value' => [
962
+
'default' => [
963
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
964
+
],
965
+
966
+
'hover' => [
967
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
968
+
],
969
+
],
970
+
971
+
'pickers' => [
972
+
[
973
+
'title' => __( 'Initial', 'blocksy' ),
974
+
'id' => 'default',
975
+
'inherit' => 'var(--theme-text-color)'
976
+
],
977
+
978
+
[
979
+
'title' => __( 'Hover', 'blocksy' ),
980
+
'id' => 'hover',
981
+
'inherit' => 'var(--theme-link-hover-color)'
982
+
],
983
+
],
984
+
],
985
+
986
+
blocksy_rand_md5() => [
987
+
'type' => 'ct-has-meta-category-button',
988
+
'optionId' => $prefix . 'archive_order',
989
+
'options' => [
990
+
$prefix . 'card_meta_button_type_font_colors' => [
991
+
'label' => __( 'Meta Button Font Color', 'blocksy' ),
992
+
'type' => 'ct-color-picker',
993
+
'design' => 'inline',
994
+
'divider' => 'top',
995
+
'noColor' => [ 'background' => 'var(--theme-text-color)'],
996
+
'sync' => 'live',
997
+
'value' => [
998
+
'default' => [
999
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
1000
+
],
1001
+
1002
+
'hover' => [
1003
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
1004
+
],
1005
+
],
1006
+
1007
+
'pickers' => [
1008
+
[
1009
+
'title' => __( 'Initial', 'blocksy' ),
1010
+
'id' => 'default',
1011
+
'inherit' => 'var(--theme-button-text-initial-color)'
1012
+
],
1013
+
1014
+
[
1015
+
'title' => __( 'Hover', 'blocksy' ),
1016
+
'id' => 'hover',
1017
+
'inherit' => 'var(--theme-button-text-hover-color)'
1018
+
],
1019
+
],
1020
+
],
1021
+
1022
+
$prefix . 'card_meta_button_type_background_colors' => [
1023
+
'label' => __( 'Meta Button Background', 'blocksy' ),
1024
+
'type' => 'ct-color-picker',
1025
+
'design' => 'inline',
1026
+
'noColor' => [ 'background' => 'var(--theme-text-color)'],
1027
+
'sync' => 'live',
1028
+
'value' => [
1029
+
'default' => [
1030
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
1031
+
],
1032
+
1033
+
'hover' => [
1034
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
1035
+
],
1036
+
],
1037
+
1038
+
'pickers' => [
1039
+
[
1040
+
'title' => __( 'Initial', 'blocksy' ),
1041
+
'id' => 'default',
1042
+
'inherit' => 'var(--theme-button-background-initial-color)'
1043
+
],
1044
+
1045
+
[
1046
+
'title' => __( 'Hover', 'blocksy' ),
1047
+
'id' => 'hover',
1048
+
'inherit' => 'var(--theme-button-background-hover-color)'
1049
+
],
1050
+
],
1051
+
],
1052
+
]
1053
+
],
1054
+
1055
+
blocksy_rand_md5() => [
1056
+
'type' => 'ct-condition',
1057
+
'condition' => [
1058
+
$prefix . 'archive_order:array-ids:read_more:button_type' => 'simple',
1059
+
$prefix . 'archive_order:array-ids:read_more:enabled' => '!no'
1060
+
],
1061
+
'options' => [
1062
+
1063
+
blocksy_rand_md5() => [
1064
+
'type' => 'ct-divider',
1065
+
],
1066
+
1067
+
$prefix . 'cardButtonSimpleTextColor' => [
1068
+
'label' => __( 'Button Font Color', 'blocksy' ),
1069
+
'sync' => 'live',
1070
+
'type' => 'ct-color-picker',
1071
+
'design' => 'inline',
1072
+
1073
+
'value' => [
1074
+
'default' => [
1075
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
1076
+
],
1077
+
1078
+
'hover' => [
1079
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
1080
+
],
1081
+
],
1082
+
1083
+
'pickers' => [
1084
+
[
1085
+
'title' => __( 'Initial', 'blocksy' ),
1086
+
'id' => 'default',
1087
+
'inherit' => 'var(--theme-link-initial-color)'
1088
+
],
1089
+
1090
+
[
1091
+
'title' => __( 'Hover', 'blocksy' ),
1092
+
'id' => 'hover',
1093
+
'inherit' => 'var(--theme-link-hover-color)'
1094
+
],
1095
+
],
1096
+
],
1097
+
1098
+
],
1099
+
],
1100
+
1101
+
blocksy_rand_md5() => [
1102
+
'type' => 'ct-condition',
1103
+
'condition' => [
1104
+
$prefix . 'archive_order:array-ids:read_more:button_type' => 'background',
1105
+
$prefix . 'archive_order:array-ids:read_more:enabled' => '!no'
1106
+
],
1107
+
'options' => [
1108
+
1109
+
blocksy_rand_md5() => [
1110
+
'type' => 'ct-divider',
1111
+
],
1112
+
1113
+
$prefix . 'cardButtonBackgroundTextColor' => [
1114
+
'label' => __( 'Button Font Color', 'blocksy' ),
1115
+
'sync' => 'live',
1116
+
'type' => 'ct-color-picker',
1117
+
'design' => 'inline',
1118
+
1119
+
'value' => [
1120
+
'default' => [
1121
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
1122
+
],
1123
+
1124
+
'hover' => [
1125
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
1126
+
],
1127
+
],
1128
+
1129
+
'pickers' => [
1130
+
[
1131
+
'title' => __( 'Initial', 'blocksy' ),
1132
+
'id' => 'default',
1133
+
'inherit' => 'var(--theme-button-text-initial-color)'
1134
+
],
1135
+
1136
+
[
1137
+
'title' => __( 'Hover', 'blocksy' ),
1138
+
'id' => 'hover',
1139
+
'inherit' => 'var(--theme-button-text-hover-color)'
1140
+
],
1141
+
],
1142
+
],
1143
+
1144
+
],
1145
+
],
1146
+
1147
+
blocksy_rand_md5() => [
1148
+
'type' => 'ct-condition',
1149
+
'condition' => [
1150
+
$prefix . 'archive_order:array-ids:read_more:button_type' => 'outline',
1151
+
$prefix . 'archive_order:array-ids:read_more:enabled' => '!no'
1152
+
],
1153
+
'options' => [
1154
+
1155
+
blocksy_rand_md5() => [
1156
+
'type' => 'ct-divider',
1157
+
],
1158
+
1159
+
$prefix . 'cardButtonOutlineTextColor' => [
1160
+
'label' => __( 'Button Font Color', 'blocksy' ),
1161
+
'type' => 'ct-color-picker',
1162
+
'sync' => 'live',
1163
+
'design' => 'inline',
1164
+
1165
+
'value' => [
1166
+
'default' => [
1167
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
1168
+
],
1169
+
1170
+
'hover' => [
1171
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
1172
+
],
1173
+
],
1174
+
1175
+
'pickers' => [
1176
+
[
1177
+
'title' => __( 'Initial', 'blocksy' ),
1178
+
'id' => 'default',
1179
+
'inherit' => 'var(--theme-button-background-initial-color)'
1180
+
],
1181
+
1182
+
[
1183
+
'title' => __( 'Hover', 'blocksy' ),
1184
+
'id' => 'hover',
1185
+
'inherit' => 'var(--theme-button-text-hover-color)'
1186
+
],
1187
+
],
1188
+
],
1189
+
1190
+
],
1191
+
],
1192
+
1193
+
blocksy_rand_md5() => [
1194
+
'type' => 'ct-condition',
1195
+
'condition' => [
1196
+
$prefix . 'archive_order:array-ids:read_more:button_type' => '!simple',
1197
+
$prefix . 'archive_order:array-ids:read_more:enabled' => '!no'
1198
+
],
1199
+
'options' => [
1200
+
1201
+
$prefix . 'cardButtonColor' => [
1202
+
'label' => __( 'Button Color', 'blocksy' ),
1203
+
'sync' => 'live',
1204
+
'type' => 'ct-color-picker',
1205
+
'design' => 'inline',
1206
+
1207
+
'value' => [
1208
+
'default' => [
1209
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
1210
+
],
1211
+
1212
+
'hover' => [
1213
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
1214
+
],
1215
+
],
1216
+
1217
+
'pickers' => [
1218
+
[
1219
+
'title' => __( 'Initial', 'blocksy' ),
1220
+
'id' => 'default',
1221
+
'inherit' => 'var(--theme-button-background-initial-color)'
1222
+
],
1223
+
1224
+
[
1225
+
'title' => __( 'Hover', 'blocksy' ),
1226
+
'id' => 'hover',
1227
+
'inherit' => 'var(--theme-button-background-hover-color)'
1228
+
],
1229
+
],
1230
+
],
1231
+
1232
+
],
1233
+
],
1234
+
1235
+
blocksy_rand_md5() => [
1236
+
'type' => 'ct-condition',
1237
+
'condition' => [
1238
+
'any' => [
1239
+
$prefix . 'card_type' => 'simple',
1240
+
$prefix . 'structure' => 'gutenberg'
1241
+
],
1242
+
$prefix . 'archive_order:array-ids:featured_image:enabled' => '!no'
1243
+
],
1244
+
'options' => [
1245
+
1246
+
blocksy_rand_md5() => [
1247
+
'type' => 'ct-divider',
1248
+
],
1249
+
1250
+
$prefix . 'cardThumbRadius' => [
1251
+
'label' => __( 'Featured Image Radius', 'blocksy' ),
1252
+
'type' => 'ct-spacing',
1253
+
'sync' => 'live',
1254
+
'value' => blocksy_spacing_value(),
1255
+
'min' => 0,
1256
+
'responsive' => true
1257
+
],
1258
+
1259
+
$prefix . 'cardThumbShadow' => [
1260
+
'label' => __( 'Featured Image Shadow', 'blocksy' ),
1261
+
'type' => 'ct-box-shadow',
1262
+
'sync' => 'live',
1263
+
'responsive' => true,
1264
+
'divider' => 'top',
1265
+
'value' => blocksy_box_shadow_value([
1266
+
'enable' => false,
1267
+
'h_offset' => 0,
1268
+
'v_offset' => 12,
1269
+
'blur' => 18,
1270
+
'spread' => -6,
1271
+
'inset' => false,
1272
+
'color' => [
1273
+
'color' => 'rgba(34, 56, 101, 0.04)',
1274
+
],
1275
+
])
1276
+
],
1277
+
],
1278
+
],
1279
+
1280
+
blocksy_rand_md5() => [
1281
+
'type' => 'ct-condition',
1282
+
'condition' => [
1283
+
$prefix . 'structure' => 'simple',
1284
+
$prefix . 'card_type' => 'simple',
1285
+
],
1286
+
'options' => [
1287
+
1288
+
$prefix . 'cardDivider' => [
1289
+
'label' => __( 'Card Bottom Divider', 'blocksy' ),
1290
+
'type' => 'ct-border',
1291
+
'sync' => 'live',
1292
+
'design' => 'inline',
1293
+
'divider' => 'top',
1294
+
'value' => [
1295
+
'width' => 1,
1296
+
'style' => 'dashed',
1297
+
'color' => [
1298
+
'color' => 'rgba(224, 229, 235, 0.8)',
1299
+
],
1300
+
]
1301
+
],
1302
+
],
1303
+
],
1304
+
1305
+
blocksy_rand_md5() => [
1306
+
'type' => 'ct-condition',
1307
+
'condition' => [
1308
+
$prefix . 'archive_order:array-ids:divider:enabled' => '!no'
1309
+
1310
+
],
1311
+
'options' => [
1312
+
blocksy_rand_md5() => [
1313
+
'type' => 'ct-divider',
1314
+
],
1315
+
1316
+
$prefix . 'entryDivider' => [
1317
+
'label' => __( 'Card Divider', 'blocksy' ),
1318
+
'type' => 'ct-border',
1319
+
'sync' => 'live',
1320
+
'design' => 'inline',
1321
+
'value' => [
1322
+
'width' => 1,
1323
+
'style' => 'solid',
1324
+
'color' => [
1325
+
'color' => 'rgba(224, 229, 235, 0.8)',
1326
+
],
1327
+
]
1328
+
],
1329
+
],
1330
+
],
1331
+
],
1332
+
1333
+
apply_filters(
1334
+
'blocksy:options:posts-listing:design:before_card_background',
1335
+
[],
1336
+
trim($prefix, '_')
1337
+
),
1338
+
1339
+
blocksy_rand_md5() => [
1340
+
'type' => 'ct-condition',
1341
+
'condition' => [
1342
+
$prefix . 'card_type' => 'boxed|cover',
1343
+
$prefix . 'structure' => '!gutenberg'
1344
+
],
1345
+
'perform_replace' => array_merge([
1346
+
'condition' => $has_card_matching_template ? [
1347
+
$prefix . 'structure' => '!__never__'
1348
+
] : [
1349
+
$prefix . 'structure' => 'simple'
1350
+
],
1351
+
'key' => $prefix . 'card_type',
1352
+
'from' => 'cover',
1353
+
'to' => 'boxed'
1354
+
], $has_card_matching_template ? [
1355
+
[
1356
+
'condition' => [
1357
+
$prefix . 'structure' => '!__never__'
1358
+
],
1359
+
'key' => $prefix . 'structure',
1360
+
'from' => 'simple',
1361
+
'to' => 'grid'
1362
+
],
1363
+
1364
+
[
1365
+
'condition' => [
1366
+
$prefix . 'structure' => '!__never__'
1367
+
],
1368
+
'key' => $prefix . 'structure',
1369
+
'from' => 'gutenberg',
1370
+
'to' => 'grid'
1371
+
]
1372
+
] : []),
1373
+
'options' => [
1374
+
1375
+
blocksy_rand_md5() => [
1376
+
'type' => 'ct-divider',
1377
+
],
1378
+
1379
+
blocksy_rand_md5() => [
1380
+
'type' => 'ct-condition',
1381
+
'condition' => [
1382
+
$prefix . 'card_type' => 'cover',
1383
+
],
1384
+
'perform_replace' => [
1385
+
'condition' => $has_card_matching_template ? [
1386
+
$prefix . 'structure' => '!__never__'
1387
+
] : [
1388
+
$prefix . 'structure' => 'simple'
1389
+
],
1390
+
'key' => $prefix . 'card_type',
1391
+
'from' => 'cover',
1392
+
'to' => 'boxed'
1393
+
],
1394
+
'options' => [
1395
+
1396
+
$prefix . 'card_overlay_background' => [
1397
+
'label' => __( 'Card Overlay Color', 'blocksy' ),
1398
+
'type' => 'ct-background',
1399
+
'design' => 'block:right',
1400
+
'responsive' => true,
1401
+
'divider' => 'bottom',
1402
+
'activeTabs' => ['color', 'gradient'],
1403
+
'sync' => 'live',
1404
+
'value' => blocksy_background_default_value([
1405
+
'backgroundColor' => [
1406
+
'default' => [
1407
+
'color' => 'rgba(0,0,0,0.5)',
1408
+
],
1409
+
],
1410
+
]),
1411
+
],
1412
+
],
1413
+
],
1414
+
1415
+
$prefix . 'cardBackground' => [
1416
+
'label' => __( 'Card Background Color', 'blocksy' ),
1417
+
'type' => 'ct-background',
1418
+
'design' => 'block:right',
1419
+
'responsive' => true,
1420
+
'activeTabs' => ['color', 'gradient'],
1421
+
'sync' => 'live',
1422
+
'value' => blocksy_background_default_value([
1423
+
'backgroundColor' => [
1424
+
'default' => [
1425
+
'color' => 'var(--theme-palette-color-8)',
1426
+
],
1427
+
],
1428
+
]),
1429
+
],
1430
+
1431
+
$prefix . 'cardBorder' => [
1432
+
'label' => __( 'Card Border', 'blocksy' ),
1433
+
'type' => 'ct-border',
1434
+
'design' => 'block',
1435
+
'sync' => 'live',
1436
+
'divider' => 'top',
1437
+
'responsive' => true,
1438
+
'value' => [
1439
+
'width' => 1,
1440
+
'style' => 'none',
1441
+
'color' => [
1442
+
'color' => 'rgba(44,62,80,0.2)',
1443
+
],
1444
+
]
1445
+
],
1446
+
1447
+
$prefix . 'cardShadow' => [
1448
+
'label' => __( 'Card Shadow', 'blocksy' ),
1449
+
'type' => 'ct-box-shadow',
1450
+
'sync' => 'live',
1451
+
'responsive' => true,
1452
+
'divider' => 'top',
1453
+
'value' => blocksy_box_shadow_value([
1454
+
'enable' => true,
1455
+
'h_offset' => 0,
1456
+
'v_offset' => 12,
1457
+
'blur' => 18,
1458
+
'spread' => -6,
1459
+
'inset' => false,
1460
+
'color' => [
1461
+
'color' => 'rgba(34, 56, 101, 0.04)',
1462
+
],
1463
+
])
1464
+
],
1465
+
1466
+
$prefix . 'cardRadius' => [
1467
+
'label' => __( 'Border Radius', 'blocksy' ),
1468
+
'sync' => 'live',
1469
+
'type' => 'ct-spacing',
1470
+
'divider' => 'top',
1471
+
'value' => blocksy_spacing_value(),
1472
+
'min' => 0,
1473
+
'responsive' => true
1474
+
],
1475
+
1476
+
],
1477
+
],
1478
+
], trim($prefix, '_'))
1479
+
]
1480
+
];
1481
+
1482
+
1483
+
$options = [
1484
+
blocksy_rand_md5() => [
1485
+
'type' => 'ct-title',
1486
+
'label' => blocksy_safe_sprintf(
1487
+
// translators: placeholder here means the actual structure title.
1488
+
__('%s Structure', 'blocksy'),
1489
+
$title
1490
+
),
1491
+
'desc' => blocksy_safe_sprintf(
1492
+
// translators: placeholder here means the actual structure title.
1493
+
__('Set the %s entries default structure.', 'blocksy'),
1494
+
$title
1495
+
),
1496
+
],
1497
+
1498
+
blocksy_rand_md5() => [
1499
+
'title' => __( 'General', 'blocksy' ),
1500
+
'type' => 'tab',
1501
+
'options' => [
1502
+
1503
+
$prefix . 'structure' => [
1504
+
'label' => false,
1505
+
'type' => 'ct-image-picker',
1506
+
'value' => 'grid',
1507
+
'divider' => 'bottom',
1508
+
'sync' => blocksy_sync_whole_page([
1509
+
'prefix' => $prefix,
1510
+
'loader_selector' => '.entries > article'
1511
+
]),
1512
+
'choices' => [
1513
+
'simple' => [
1514
+
'src' => blocksy_image_picker_url('simple.svg'),
1515
+
'title' => __('Simple', 'blocksy'),
1516
+
],
1517
+
1518
+
'classic' => [
1519
+
'src' => blocksy_image_picker_url('classic.svg'),
1520
+
'title' => __('Classic', 'blocksy'),
1521
+
],
1522
+
1523
+
'grid' => [
1524
+
'src' => blocksy_image_picker_url('grid.svg'),
1525
+
'title' => __('Grid', 'blocksy'),
1526
+
],
1527
+
1528
+
'enhanced-grid' => [
1529
+
'src' => blocksy_image_picker_url('enhanced-grid.svg'),
1530
+
'title' => __('Enhanced Grid', 'blocksy'),
1531
+
],
1532
+
1533
+
'gutenberg' => [
1534
+
'src' => blocksy_image_picker_url('gutenberg.svg'),
1535
+
'title' => __('Gutenberg', 'blocksy'),
1536
+
],
1537
+
],
1538
+
1539
+
'conditions' => $has_card_matching_template ? [
1540
+
'simple' => [
1541
+
$prefix . 'structure' => '__never__'
1542
+
],
1543
+
1544
+
'gutenberg' => [
1545
+
$prefix . 'structure' => '__never__'
1546
+
],
1547
+
] : [],
1548
+
],
1549
+
1550
+
blocksy_rand_md5() => [
1551
+
'type' => 'ct-condition',
1552
+
'condition' => [ $prefix . 'structure' => '!grid' ],
1553
+
'perform_replace' => $has_card_matching_template ? [
1554
+
[
1555
+
'condition' => [
1556
+
$prefix . 'structure' => '!__never__'
1557
+
],
1558
+
'key' => $prefix . 'structure',
1559
+
'from' => 'simple',
1560
+
'to' => 'grid'
1561
+
],
1562
+
1563
+
[
1564
+
'condition' => [
1565
+
$prefix . 'structure' => '!__never__'
1566
+
],
1567
+
'key' => $prefix . 'structure',
1568
+
'from' => 'gutenberg',
1569
+
'to' => 'grid'
1570
+
]
1571
+
] : [],
1572
+
'options' => [
1573
+
1574
+
$prefix . 'archive_per_page' => [
1575
+
'label' => __( 'Number of Posts', 'blocksy' ),
1576
+
'type' => 'ct-number',
1577
+
'value' => get_option('posts_per_page', 10),
1578
+
'min' => 1,
1579
+
'max' => 500,
1580
+
'design' => 'inline',
1581
+
'sync' => blocksy_sync_whole_page([
1582
+
'prefix' => $prefix,
1583
+
'loader_selector' => '.entries > article'
1584
+
]),
1585
+
],
1586
+
1587
+
],
1588
+
],
1589
+
1590
+
blocksy_rand_md5() => [
1591
+
'type' => 'ct-condition',
1592
+
'condition' => [ $prefix . 'structure' => 'grid' ],
1593
+
'perform_replace' => $has_card_matching_template ? [
1594
+
[
1595
+
'condition' => [
1596
+
$prefix . 'structure' => '!__never__'
1597
+
],
1598
+
'key' => $prefix . 'structure',
1599
+
'from' => 'simple',
1600
+
'to' => 'grid'
1601
+
],
1602
+
1603
+
[
1604
+
'condition' => [
1605
+
$prefix . 'structure' => '!__never__'
1606
+
],
1607
+
'key' => $prefix . 'structure',
1608
+
'from' => 'gutenberg',
1609
+
'to' => 'grid'
1610
+
]
1611
+
] : [],
1612
+
'options' => [
1613
+
1614
+
blocksy_rand_md5() => [
1615
+
'type' => 'ct-group',
1616
+
'label' => __( 'Columns & Posts', 'blocksy' ),
1617
+
'attr' => [ 'data-columns' => '2:medium' ],
1618
+
'responsive' => true,
1619
+
'hasGroupRevertButton' => true,
1620
+
'options' => [
1621
+
1622
+
$prefix . 'columns' => [
1623
+
'label' => false,
1624
+
'desc' => __( 'Number of columns', 'blocksy' ),
1625
+
'type' => 'ct-number',
1626
+
'value' => [
1627
+
'desktop' => 3,
1628
+
'tablet' => 2,
1629
+
'mobile' => 1,
1630
+
'__changed' => ['tablet', 'mobile']
1631
+
],
1632
+
'min' => 1,
1633
+
'max' => 6,
1634
+
'design' => 'block',
1635
+
'attr' => [ 'data-width' => 'full' ],
1636
+
'sync' => 'live',
1637
+
'responsive' => true,
1638
+
'skipResponsiveControls' => true
1639
+
],
1640
+
1641
+
$prefix . 'archive_per_page' => [
1642
+
'label' => false,
1643
+
'desc' => __( 'Number of posts', 'blocksy' ),
1644
+
'type' => 'ct-number',
1645
+
'value' => get_option('posts_per_page', 10),
1646
+
'min' => 1,
1647
+
'max' => 500,
1648
+
'markAsAutoFor' => ['tablet', 'mobile'],
1649
+
'design' => 'block',
1650
+
'attr' => [ 'data-width' => 'full' ],
1651
+
'sync' => blocksy_sync_whole_page([
1652
+
'prefix' => $prefix,
1653
+
'loader_selector' => '.entries > article'
1654
+
]),
1655
+
]
1656
+
],
1657
+
],
1658
+
1659
+
],
1660
+
],
1661
+
1662
+
blocksy_rand_md5() => [
1663
+
'type' => 'ct-divider',
1664
+
'attr' => ['data-type' => 'small']
1665
+
],
1666
+
1667
+
$prefix . 'archive_listing_panel' => [
1668
+
'label' => __('Card Options', 'blocksy'),
1669
+
'type' => 'ct-panel',
1670
+
'value' => 'yes',
1671
+
'wrapperAttr' => ['data-panel' => 'only-arrow'],
1672
+
'inner-options' => $overridable_card_options
1673
+
],
1674
+
1675
+
$prefix . 'content_area_spacing' => [
1676
+
'label' => __( 'Content Area Vertical Spacing', 'blocksy' ),
1677
+
'type' => 'ct-radio',
1678
+
'value' => 'both',
1679
+
'view' => 'text',
1680
+
'design' => 'block',
1681
+
'divider' => 'top:full',
1682
+
'attr' => [ 'data-type' => 'content-spacing' ],
1683
+
'choice_attr' => [ 'data-tooltip-reveal' => 'top' ],
1684
+
'sync' => "live",
1685
+
'choices' => [
1686
+
'both' => '<span></span>
1687
+
<i class="ct-tooltip">' . __( 'Top & Bottom', 'blocksy' ) . '</i>',
1688
+
1689
+
'top' => '<span></span>
1690
+
<i class="ct-tooltip">' . __( 'Only Top', 'blocksy' ) . '</i>',
1691
+
1692
+
'bottom' => '<span></span>
1693
+
<i class="ct-tooltip">' . __( 'Only Bottom', 'blocksy' ) . '</i>',
1694
+
1695
+
'none' => '<span></span>
1696
+
<i class="ct-tooltip">' . __( 'Disabled', 'blocksy' ) . '</i>',
1697
+
],
1698
+
'desc' => blocksy_safe_sprintf(
1699
+
// translators: placeholder here means the actual URL.
1700
+
__( 'You can customize the global spacing value in General ➝ Layout ➝ %sContent Area Spacing%s.', 'blocksy' ),
1701
+
blocksy_safe_sprintf(
1702
+
'<a data-trigger-section="general:layout_panel" href="%s">',
1703
+
admin_url('/customize.php?autofocus[section]=general&ct_autofocus=general:layout_panel')
1704
+
),
1705
+
'</a>'
1706
+
),
1707
+
],
1708
+
1709
+
],
1710
+
],
1711
+
1712
+
blocksy_rand_md5() => [
1713
+
'title' => __( 'Design', 'blocksy' ),
1714
+
'type' => 'tab',
1715
+
'options' => [
1716
+
1717
+
$prefix . 'background' => [
1718
+
'label' => __('Page Background', 'blocksy'),
1719
+
'type' => 'ct-background',
1720
+
'design' => 'block:right',
1721
+
'responsive' => true,
1722
+
'sync' => 'live',
1723
+
'divider' => 'bottom',
1724
+
'value' => blocksy_background_default_value([
1725
+
'backgroundColor' => [
1726
+
'default' => [
1727
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword(),
1728
+
],
1729
+
],
1730
+
]),
1731
+
'desc' => blocksy_safe_sprintf(
1732
+
// translators: placeholder here means the actual URL.
1733
+
__( 'Please note, by default this option is inherited from Colors ➝ %sSite Background%s.', 'blocksy' ),
1734
+
blocksy_safe_sprintf(
1735
+
'<a data-trigger-section="color" href="%s">',
1736
+
admin_url('/customize.php?autofocus[section]=color')
1737
+
),
1738
+
'</a>'
1739
+
),
1740
+
],
1741
+
1742
+
],
1743
+
]
1744
+
1745
+
];
1746
+