Diff: STRATO-apps/wordpress_03/app/wp-content/themes/blocksy/inc/options/single-elements/author-box.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
3
+
if (! isset($prefix)) {
4
+
$prefix = '';
5
+
} else {
6
+
$prefix = $prefix . '_';
7
+
}
8
+
9
+
$options = [
10
+
$prefix . 'has_author_box' => [
11
+
'label' => __( 'Author Box', 'blocksy' ),
12
+
'type' => 'ct-panel',
13
+
'switch' => true,
14
+
'value' => 'no',
15
+
'sync' => blocksy_sync_single_post_container([
16
+
'prefix' => $prefix
17
+
]),
18
+
'inner-options' => [
19
+
20
+
blocksy_rand_md5() => [
21
+
'title' => __( 'General', 'blocksy' ),
22
+
'type' => 'tab',
23
+
'options' => [
24
+
25
+
$prefix . 'single_author_box_type' => [
26
+
'label' => __('Box Type', 'blocksy'),
27
+
'type' => 'ct-image-picker',
28
+
'value' => 'type-2',
29
+
'attr' => ['data-type' => 'background'],
30
+
'sync' => [
31
+
'prefix' => $prefix,
32
+
'selector' => '.author-box',
33
+
'render' => function () {
34
+
if (have_posts()) {
35
+
the_post();
36
+
}
37
+
38
+
blocksy_author_box();
39
+
}
40
+
],
41
+
'choices' => [
42
+
'type-1' => [
43
+
'src' => blocksy_image_picker_url('author-box-type-1.svg'),
44
+
'title' => __('Type 1', 'blocksy'),
45
+
],
46
+
47
+
'type-2' => [
48
+
'src' => blocksy_image_picker_url('author-box-type-2.svg'),
49
+
'title' => __('Type 2', 'blocksy'),
50
+
],
51
+
],
52
+
],
53
+
54
+
$prefix . 'single_author_box_name_heading' => [
55
+
'label' => __( 'Author Name Tag', 'blocksy' ),
56
+
'type' => 'ct-select',
57
+
'value' => 'h5',
58
+
'view' => 'text',
59
+
'design' => 'inline',
60
+
'divider' => 'top',
61
+
'choices' => blocksy_ordered_keys(
62
+
[
63
+
'h1' => 'H1',
64
+
'h2' => 'H2',
65
+
'h3' => 'H3',
66
+
'h4' => 'H4',
67
+
'h5' => 'H5',
68
+
'h6' => 'H6',
69
+
'p' => 'p',
70
+
'div' => 'div',
71
+
]
72
+
),
73
+
'sync' => [
74
+
'prefix' => $prefix,
75
+
'selector' => '.author-box',
76
+
'loader_selector' => '.author-box-name',
77
+
'render' => function () {
78
+
if (have_posts()) {
79
+
the_post();
80
+
}
81
+
82
+
blocksy_author_box();
83
+
}
84
+
],
85
+
],
86
+
87
+
$prefix . 'single_author_box_posts_count' => [
88
+
'label' => __( 'Posts Count', 'blocksy' ),
89
+
'type' => 'ct-switch',
90
+
'value' => 'yes',
91
+
'divider' => 'top',
92
+
'sync' => [
93
+
'prefix' => $prefix,
94
+
'selector' => '.author-box',
95
+
'render' => function () {
96
+
if (have_posts()) {
97
+
the_post();
98
+
}
99
+
100
+
blocksy_author_box();
101
+
}
102
+
],
103
+
],
104
+
105
+
$prefix . 'single_author_box_archive_link' => [
106
+
'label' => __( 'Author Archive Link', 'blocksy' ),
107
+
'type' => 'ct-switch',
108
+
'value' => 'yes',
109
+
'divider' => 'top',
110
+
'sync' => [
111
+
'prefix' => $prefix,
112
+
'selector' => '.author-box',
113
+
'render' => function () {
114
+
if (have_posts()) {
115
+
the_post();
116
+
}
117
+
118
+
blocksy_author_box();
119
+
}
120
+
],
121
+
],
122
+
123
+
$prefix . 'single_author_box_social' => [
124
+
'label' => __( 'Social Icons', 'blocksy' ),
125
+
'type' => 'ct-switch',
126
+
'value' => 'yes',
127
+
'desc' => blocksy_safe_sprintf(
128
+
// translators: placeholder here is the link URL.
129
+
__(
130
+
'You can set the author social channels %shere%s.',
131
+
'blocksy'
132
+
),
133
+
blocksy_safe_sprintf(
134
+
'<a href="%s" target="_blank">',
135
+
admin_url('/profile.php')
136
+
),
137
+
'</a>'
138
+
),
139
+
'divider' => 'top:full',
140
+
'sync' => [
141
+
'prefix' => $prefix,
142
+
'selector' => '.author-box',
143
+
'render' => function () {
144
+
if (have_posts()) {
145
+
the_post();
146
+
}
147
+
148
+
blocksy_author_box();
149
+
}
150
+
],
151
+
],
152
+
153
+
blocksy_rand_md5() => [
154
+
'type' => 'ct-condition',
155
+
'condition' => [ $prefix . 'single_author_box_social' => 'yes' ],
156
+
'options' => [
157
+
158
+
$prefix . 'single_author_box_social_link_target' => [
159
+
'type' => 'ct-switch',
160
+
'label' => __( 'Open links in new tab', 'blocksy' ),
161
+
'value' => 'no',
162
+
'sync' => [
163
+
'prefix' => $prefix,
164
+
'selector' => '.author-box',
165
+
'render' => function () {
166
+
if (have_posts()) {
167
+
the_post();
168
+
}
169
+
170
+
blocksy_author_box();
171
+
}
172
+
],
173
+
],
174
+
175
+
$prefix . 'single_author_box_social_link_nofollow' => [
176
+
'type' => 'ct-switch',
177
+
'label' => __( 'Set links to nofollow', 'blocksy' ),
178
+
'value' => 'no',
179
+
'sync' => [
180
+
'prefix' => $prefix,
181
+
'selector' => '.author-box',
182
+
'render' => function () {
183
+
if (have_posts()) {
184
+
the_post();
185
+
}
186
+
187
+
blocksy_author_box();
188
+
}
189
+
],
190
+
],
191
+
192
+
],
193
+
],
194
+
195
+
$prefix . 'single_author_box_spacing' => [
196
+
'label' => __( 'Container Inner Spacing', 'blocksy' ),
197
+
'type' => 'ct-slider',
198
+
'value' => '40px',
199
+
'units' => blocksy_units_config([
200
+
[ 'unit' => 'px', 'min' => 0, 'max' => 100],
201
+
['unit' => '', 'type' => 'custom'],
202
+
]),
203
+
'responsive' => true,
204
+
'divider' => 'top:full',
205
+
'sync' => 'live'
206
+
],
207
+
208
+
blocksy_rand_md5() => [
209
+
'type' => 'ct-divider',
210
+
],
211
+
212
+
$prefix . 'author_box_visibility' => [
213
+
'label' => __( 'Visibility', 'blocksy' ),
214
+
'type' => 'ct-visibility',
215
+
'design' => 'block',
216
+
'sync' => 'live',
217
+
'value' => blocksy_default_responsive_value([
218
+
'desktop' => true,
219
+
'tablet' => true,
220
+
'mobile' => false,
221
+
]),
222
+
'choices' => blocksy_ordered_keys([
223
+
'desktop' => __( 'Desktop', 'blocksy' ),
224
+
'tablet' => __( 'Tablet', 'blocksy' ),
225
+
'mobile' => __( 'Mobile', 'blocksy' ),
226
+
]),
227
+
],
228
+
229
+
],
230
+
],
231
+
232
+
blocksy_rand_md5() => [
233
+
'title' => __( 'Design', 'blocksy' ),
234
+
'type' => 'tab',
235
+
'options' => [
236
+
237
+
$prefix . 'single_author_box_name_font' => [
238
+
'type' => 'ct-typography',
239
+
'label' => __( 'Author Name Font', 'blocksy' ),
240
+
'sync' => 'live',
241
+
'value' => blocksy_typography_default_values([]),
242
+
],
243
+
244
+
$prefix . 'single_author_box_name_color' => [
245
+
'label' => __( 'Author Name Font Color', 'blocksy' ),
246
+
'type' => 'ct-color-picker',
247
+
'design' => 'block:right',
248
+
'responsive' => true,
249
+
'divider' => 'bottom',
250
+
'setting' => [ 'transport' => 'postMessage' ],
251
+
'value' => [
252
+
'default' => [
253
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
254
+
],
255
+
],
256
+
257
+
'pickers' => [
258
+
[
259
+
'title' => __( 'Initial', 'blocksy' ),
260
+
'id' => 'default',
261
+
'inherit' => [
262
+
'var(--theme-heading-1-color, var(--theme-headings-color))' => [
263
+
$prefix . 'single_author_box_name_heading' => 'h1'
264
+
],
265
+
266
+
'var(--theme-heading-2-color, var(--theme-headings-color))' => [
267
+
$prefix . 'single_author_box_name_heading' => 'h2'
268
+
],
269
+
270
+
'var(--theme-heading-3-color, var(--theme-headings-color))' => [
271
+
$prefix . 'single_author_box_name_heading' => 'h3'
272
+
],
273
+
274
+
'var(--theme-heading-4-color, var(--theme-headings-color))' => [
275
+
$prefix . 'single_author_box_name_heading' => 'h4'
276
+
],
277
+
278
+
'var(--theme-heading-5-color, var(--theme-headings-color))' => [
279
+
$prefix . 'single_author_box_name_heading' => 'h5'
280
+
],
281
+
282
+
'var(--theme-heading-6-color, var(--theme-headings-color))' => [
283
+
$prefix . 'single_author_box_name_heading' => 'h6'
284
+
]
285
+
]
286
+
],
287
+
],
288
+
],
289
+
290
+
$prefix . 'single_author_box_font' => [
291
+
'type' => 'ct-typography',
292
+
'label' => __( 'Author Bio Font', 'blocksy' ),
293
+
'sync' => 'live',
294
+
'value' => blocksy_typography_default_values([]),
295
+
],
296
+
297
+
$prefix . 'single_author_box_font_color' => [
298
+
'label' => __( 'Author Bio Font Color', 'blocksy' ),
299
+
'type' => 'ct-color-picker',
300
+
'design' => 'block:right',
301
+
'responsive' => true,
302
+
'divider' => 'bottom',
303
+
'setting' => [ 'transport' => 'postMessage' ],
304
+
'value' => [
305
+
'default' => [
306
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
307
+
],
308
+
309
+
'initial' => [
310
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
311
+
],
312
+
313
+
'hover' => [
314
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
315
+
],
316
+
],
317
+
318
+
'pickers' => [
319
+
[
320
+
'title' => __( 'Text', 'blocksy' ),
321
+
'id' => 'default',
322
+
'inherit' => 'var(--theme-text-color)'
323
+
],
324
+
325
+
[
326
+
'title' => __( 'Link Initial', 'blocksy' ),
327
+
'id' => 'initial',
328
+
'inherit' => 'var(--theme-link-initial-color)'
329
+
],
330
+
331
+
[
332
+
'title' => __( 'Link Hover', 'blocksy' ),
333
+
'id' => 'hover',
334
+
'inherit' => 'var(--theme-link-hover-color)'
335
+
],
336
+
],
337
+
],
338
+
339
+
blocksy_rand_md5() => [
340
+
'type' => 'ct-condition',
341
+
'condition' => [ $prefix . 'single_author_box_social' => 'yes' ],
342
+
'options' => [
343
+
344
+
$prefix . 'single_author_box_social_icons_color' => [
345
+
'label' => __( 'Icons Color', 'blocksy' ),
346
+
'type' => 'ct-color-picker',
347
+
'design' => 'block:right',
348
+
'responsive' => true,
349
+
// 'divider' => 'bottom',
350
+
'setting' => [ 'transport' => 'postMessage' ],
351
+
352
+
'value' => [
353
+
'default' => [
354
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
355
+
],
356
+
357
+
'hover' => [
358
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
359
+
],
360
+
],
361
+
362
+
'pickers' => [
363
+
[
364
+
'title' => __( 'Initial', 'blocksy' ),
365
+
'id' => 'default',
366
+
'inherit' => '#fff'
367
+
],
368
+
369
+
[
370
+
'title' => __( 'Hover', 'blocksy' ),
371
+
'id' => 'hover',
372
+
'inherit' => '#fff'
373
+
],
374
+
],
375
+
],
376
+
377
+
$prefix . 'single_author_box_social_icons_background' => [
378
+
'label' => __( 'Icons Background Color', 'blocksy' ),
379
+
'type' => 'ct-color-picker',
380
+
'design' => 'block:right',
381
+
'divider' => 'bottom',
382
+
'responsive' => true,
383
+
'setting' => [ 'transport' => 'postMessage' ],
384
+
385
+
'value' => [
386
+
'default' => [
387
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
388
+
],
389
+
390
+
'hover' => [
391
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
392
+
],
393
+
],
394
+
395
+
'pickers' => [
396
+
[
397
+
'title' => __( 'Initial', 'blocksy' ),
398
+
'id' => 'default',
399
+
'inherit' => 'var(--theme-palette-color-1)'
400
+
],
401
+
402
+
[
403
+
'title' => __( 'Hover', 'blocksy' ),
404
+
'id' => 'hover',
405
+
'inherit' => 'var(--theme-palette-color-2)'
406
+
],
407
+
],
408
+
],
409
+
410
+
],
411
+
],
412
+
413
+
blocksy_rand_md5() => [
414
+
'type' => 'ct-condition',
415
+
'condition' => [
416
+
$prefix . 'single_author_box_type' => 'type-2'
417
+
],
418
+
'options' => [
419
+
420
+
$prefix . 'single_author_box_border' => [
421
+
'label' => __( 'Border Color', 'blocksy' ),
422
+
'type' => 'ct-color-picker',
423
+
'design' => 'block:right',
424
+
'divider' => 'bottom',
425
+
'responsive' => true,
426
+
'setting' => [ 'transport' => 'postMessage' ],
427
+
428
+
'value' => [
429
+
'default' => [
430
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
431
+
],
432
+
],
433
+
434
+
'pickers' => [
435
+
[
436
+
'title' => __( 'Initial', 'blocksy' ),
437
+
'id' => 'default',
438
+
'inherit' => '#e8ebf0'
439
+
],
440
+
],
441
+
],
442
+
443
+
],
444
+
],
445
+
446
+
blocksy_rand_md5() => [
447
+
'type' => 'ct-condition',
448
+
'condition' => [
449
+
$prefix . 'single_author_box_type' => 'type-1'
450
+
],
451
+
'options' => [
452
+
453
+
$prefix . 'single_author_box_container_background' => [
454
+
'label' => __( 'Background Color', 'blocksy' ),
455
+
'type' => 'ct-background',
456
+
'design' => 'block:right',
457
+
'responsive' => true,
458
+
// 'divider' => 'bottom',
459
+
'activeTabs' => ['color', 'gradient'],
460
+
'sync' => 'live',
461
+
'value' => blocksy_background_default_value([
462
+
'backgroundColor' => [
463
+
'default' => [
464
+
'color' => 'var(--theme-palette-color-8)',
465
+
],
466
+
],
467
+
]),
468
+
],
469
+
470
+
$prefix . 'single_author_box_shadow' => [
471
+
'label' => __( 'Shadow', 'blocksy' ),
472
+
'type' => 'ct-box-shadow',
473
+
'responsive' => true,
474
+
'divider' => 'top',
475
+
'sync' => 'live',
476
+
'value' => blocksy_box_shadow_value([
477
+
'enable' => true,
478
+
'h_offset' => 0,
479
+
'v_offset' => 50,
480
+
'blur' => 90,
481
+
'spread' => 0,
482
+
'inset' => false,
483
+
'color' => [
484
+
'color' => 'rgba(210, 213, 218, 0.4)',
485
+
],
486
+
])
487
+
],
488
+
489
+
$prefix . 'single_author_box_container_border' => [
490
+
'label' => __( 'Border', 'blocksy' ),
491
+
'type' => 'ct-border',
492
+
'design' => 'block',
493
+
'sync' => 'live',
494
+
'divider' => 'top',
495
+
'responsive' => true,
496
+
'value' => [
497
+
'width' => 1,
498
+
'style' => 'none',
499
+
'color' => [
500
+
'color' => 'rgba(44,62,80,0.2)',
501
+
],
502
+
]
503
+
],
504
+
505
+
$prefix . 'single_author_box_border_radius' => [
506
+
'label' => __( 'Border Radius', 'blocksy' ),
507
+
'sync' => 'live',
508
+
'type' => 'ct-spacing',
509
+
'divider' => 'top',
510
+
'value' => blocksy_spacing_value(),
511
+
'min' => 0,
512
+
'responsive' => true
513
+
],
514
+
],
515
+
],
516
+
],
517
+
],
518
+
],
519
+
],
520
+
];
521
+
522
+