Diff: STRATO-apps/wordpress_03/app/wp-content/themes/blocksy/inc/panel-builder/header/logo/options.php

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + <?php
2 +
3 + $options = [
4 + blocksy_rand_md5() => [
5 + 'title' => __( 'General', 'blocksy' ),
6 + 'type' => 'tab',
7 + 'options' => array_merge(
8 + [
9 + 'custom_logo' => [
10 + 'label' => __( 'Logo', 'blocksy' ),
11 + 'type' => 'ct-image-uploader',
12 + 'value' => blocksy_get_theme_mod('custom_logo', ''),
13 + 'revertDefaultValue' => '',
14 + 'inline_value' => true,
15 + 'responsive' => [
16 + 'tablet' => 'skip'
17 + ],
18 + 'attr' => [ 'data-type' => 'small' ],
19 + ],
20 +
21 + blocksy_rand_md5() => [
22 + 'type' => 'ct-condition',
23 + 'condition' => [
24 + 'builderSettings/has_transparent_header' => 'yes',
25 + ],
26 + 'options' => [
27 + 'transparent_logo' => [
28 + 'label' => __( 'Transparent State Logo', 'blocksy' ),
29 + 'type' => 'ct-image-uploader',
30 + 'value' => '',
31 + 'inline_value' => true,
32 + 'responsive' => [
33 + 'tablet' => 'skip'
34 + ],
35 + 'divider' => 'top',
36 + 'attr' => [ 'data-type' => 'small' ],
37 + ],
38 + ],
39 + ],
40 +
41 + blocksy_rand_md5() => [
42 + 'type' => 'ct-condition',
43 + 'condition' => [
44 + 'any' => [
45 + 'custom_logo:truthy' => 'yes',
46 + 'all' => [
47 + 'builderSettings/has_transparent_header' => 'yes',
48 + 'transparent_logo:truthy' => 'yes',
49 + ]
50 + ]
51 + ],
52 + 'options' => [
53 + [
54 + blocksy_rand_md5() => [
55 + 'type' => 'ct-condition',
56 + 'condition' => [
57 + 'builderSettings/has_sticky_header' => 'yes',
58 + ],
59 + 'options' => [
60 + 'sticky_logo' => [
61 + 'label' => __( 'Sticky State Logo', 'blocksy' ),
62 + 'type' => 'ct-image-uploader',
63 + 'value' => '',
64 + 'inline_value' => true,
65 + 'responsive' => [
66 + 'tablet' => 'skip'
67 + ],
68 + 'divider' => 'top',
69 + 'attr' => [ 'data-type' => 'small' ],
70 + ],
71 + ],
72 + ],
73 + ],
74 +
75 + apply_filters(
76 + 'blocksy:panel-builder:logo:options:general',
77 + [],
78 + $panel_type
79 + ),
80 + ]
81 + ],
82 +
83 + blocksy_rand_md5() => [
84 + 'type' => 'ct-divider',
85 + ],
86 +
87 + 'logoMaxHeight' => [
88 + 'label' => __( 'Logo Height', 'blocksy' ),
89 + 'type' => 'ct-slider',
90 + 'min' => 0,
91 + 'max' => 300,
92 + 'value' => 50,
93 + 'responsive' => true,
94 + ],
95 +
96 + blocksy_rand_md5() => [
97 + 'type' => 'ct-condition',
98 + 'condition' => [
99 + 'builderSettings/has_sticky_header' => 'yes',
100 + 'row' => 'middle-row'
101 + ],
102 + 'options' => [
103 + blocksy_rand_md5() => [
104 + 'type' => 'ct-divider',
105 + ],
106 +
107 + 'has_sticky_logo_shrink' => [
108 + 'label' => __( 'Sticky State Shrink', 'blocksy' ),
109 + 'type' => 'ct-switch',
110 + 'type' => 'ct-switch',
111 + 'value' => 'no',
112 + 'sync' => [
113 + 'id' => 'header_placements_1'
114 + ]
115 + ],
116 + ]
117 + ],
118 +
119 + blocksy_rand_md5() => [
120 + 'type' => 'ct-condition',
121 + 'condition' => [
122 + 'builderSettings/has_sticky_header' => 'yes',
123 + 'row' => 'middle-row',
124 + 'has_sticky_logo_shrink' => 'yes'
125 + ],
126 + 'options' => [
127 +
128 + 'sticky_logo_shrink' => [
129 + 'label' => __( 'Logo Height', 'blocksy' ),
130 + 'type' => 'ct-slider',
131 + 'min' => 30,
132 + 'max' => 100,
133 + 'responsive' => true,
134 + 'value' => 70,
135 + 'defaultUnit' => '%',
136 + 'sync' => [
137 + 'id' => 'header_placements_1'
138 + ],
139 + ],
140 +
141 + ],
142 + ],
143 +
144 + blocksy_rand_md5() => [
145 + 'type' => 'ct-divider',
146 + ],
147 +
148 + 'has_site_title' => [
149 + 'label' => __( 'Site Title', 'blocksy' ),
150 + 'type' => 'ct-switch',
151 + 'value' => 'yes',
152 + 'setting' => [ 'transport' => 'postMessage' ],
153 + ],
154 +
155 + blocksy_rand_md5() => [
156 + 'type' => 'ct-condition',
157 + 'condition' => [ 'has_site_title' => 'yes' ],
158 + 'options' => [
159 +
160 + 'blogname' => [
161 + 'label' => false,
162 + 'type' => 'text',
163 + 'design' => 'block',
164 + 'disableRevertButton' => true,
165 + 'value' => get_option('blogname'),
166 + ],
167 +
168 + 'has_site_title_link' => [
169 + 'label' => __( 'Site Title Link', 'blocksy' ),
170 + 'type' => 'ct-switch',
171 + 'value' => 'yes',
172 + 'setting' => [ 'transport' => 'postMessage' ],
173 + ],
174 +
175 + 'blogname_visibility' => [
176 + 'label' => __( 'Site Title Visibility', 'blocksy' ),
177 + 'type' => 'ct-visibility',
178 + 'design' => 'block',
179 + 'allow_empty' => true,
180 + 'sync' => 'live',
181 + 'value' => blocksy_default_responsive_value([
182 + 'desktop' => true,
183 + 'tablet' => true,
184 + 'mobile' => true,
185 + ]),
186 + 'choices' => blocksy_ordered_keys([
187 + 'desktop' => __( 'Desktop', 'blocksy' ),
188 + 'tablet' => __( 'Tablet', 'blocksy' ),
189 + 'mobile' => __( 'Mobile', 'blocksy' ),
190 + ]),
191 + ],
192 +
193 + ],
194 + ],
195 +
196 + blocksy_rand_md5() => [
197 + 'type' => 'ct-divider',
198 + ],
199 +
200 + 'has_tagline' => [
201 + 'label' => __( 'Site Tagline', 'blocksy' ),
202 + 'type' => 'ct-switch',
203 + 'value' => 'no',
204 + 'setting' => [ 'transport' => 'postMessage' ],
205 + ],
206 +
207 + blocksy_rand_md5() => [
208 + 'type' => 'ct-condition',
209 + 'condition' => [ 'has_tagline' => 'yes' ],
210 + 'options' => [
211 +
212 + 'blogdescription' => [
213 + 'label' => false,
214 + 'type' => 'text',
215 + 'design' => 'block',
216 + 'disableRevertButton' => true,
217 + 'value' => get_option( 'blogdescription' ),
218 + ],
219 +
220 + 'blogdescription_visibility' => [
221 + 'label' => __( 'Site Tagline Visibility', 'blocksy' ),
222 + 'type' => 'ct-visibility',
223 + 'design' => 'block',
224 + 'allow_empty' => true,
225 + 'sync' => 'live',
226 + 'value' => blocksy_default_responsive_value([
227 + 'desktop' => true,
228 + 'tablet' => true,
229 + 'mobile' => true,
230 + ]),
231 + 'choices' => blocksy_ordered_keys([
232 + 'desktop' => __( 'Desktop', 'blocksy' ),
233 + 'tablet' => __( 'Tablet', 'blocksy' ),
234 + 'mobile' => __( 'Mobile', 'blocksy' ),
235 + ]),
236 + ],
237 +
238 + ],
239 + ],
240 +
241 + blocksy_rand_md5() => [
242 + 'type' => 'ct-divider',
243 + ],
244 +
245 + blocksy_rand_md5() => [
246 + 'type' => 'ct-condition',
247 + 'condition' => [
248 + 'custom_logo:truthy' => 'yes',
249 + ],
250 + 'options' => [
251 +
252 + 'has_logo_image_link' => [
253 + 'label' => __( 'Logo Image Link', 'blocksy' ),
254 + 'type' => 'ct-switch',
255 + 'value' => 'yes',
256 + 'setting' => [ 'transport' => 'postMessage' ],
257 + ],
258 +
259 + ],
260 + ],
261 +
262 + blocksy_rand_md5() => [
263 + 'type' => 'ct-condition',
264 + 'condition' => [
265 + 'has_svg_logo' => 'yes'
266 + ],
267 + 'computed_fields' => ['has_svg_logo'],
268 + 'options' => [
269 + 'inline_svg_logos' => [
270 + 'label' => __('Logo Inline SVG File', 'blocksy'),
271 + 'type' => 'ct-switch',
272 + 'value' => 'no',
273 + // 'divider' => 'top:full',
274 + ]
275 + ]
276 + ],
277 +
278 + blocksy_rand_md5() => [
279 + 'type' => 'ct-condition',
280 + 'condition' => [
281 + 'custom_logo:truthy' => 'yes',
282 + ],
283 + 'options' => [
284 +
285 + blocksy_rand_md5() => [
286 + 'type' => 'ct-condition',
287 + 'condition' => [
288 + 'any' => [
289 + 'has_site_title' => 'yes',
290 + 'has_tagline' => 'yes',
291 + ]
292 + ],
293 + 'options' => [
294 +
295 + blocksy_rand_md5() => [
296 + 'type' => 'ct-divider',
297 + ],
298 +
299 + 'logo_position' => [
300 + 'label' => __( 'Logo Image Position', 'blocksy' ),
301 + 'type' => 'ct-radio',
302 + 'value' => 'top',
303 + 'view' => 'text',
304 + 'design' => 'block',
305 + 'responsive' => [
306 + 'tablet' => 'skip'
307 + ],
308 + 'choices' => [
309 + 'left' => __( 'Left', 'blocksy' ),
310 + 'right' => __( 'Right', 'blocksy' ),
311 + 'top' => __( 'Top', 'blocksy' ),
312 + ],
313 + ],
314 +
315 + ],
316 + ],
317 +
318 + blocksy_rand_md5() => [
319 + 'type' => 'ct-divider',
320 + ],
321 + ],
322 + ],
323 + ],
324 +
325 + $panel_type === 'header' ? [
326 + // blocksy_rand_md5() => [
327 + // 'type' => 'ct-divider',
328 + // ],
329 +
330 + 'header_logo_horizontal_alignment' => [
331 + 'type' => 'ct-radio',
332 + 'label' => __( 'Content Alignment', 'blocksy' ),
333 + 'view' => 'text',
334 + 'design' => 'block',
335 + 'responsive' => true,
336 + 'attr' => [ 'data-type' => 'alignment' ],
337 + 'setting' => [ 'transport' => 'postMessage' ],
338 + 'value' => 'CT_CSS_SKIP_RULE',
339 + 'choices' => [
340 + 'left' => '',
341 + 'center' => '',
342 + 'right' => '',
343 + ],
344 + ],
345 + ] : [],
346 +
347 + $panel_type === 'footer' ? [
348 + // blocksy_rand_md5() => [
349 + // 'type' => 'ct-divider',
350 + // ],
351 +
352 + 'footer_logo_horizontal_alignment' => [
353 + 'type' => 'ct-radio',
354 + 'label' => __( 'Horizontal Alignment', 'blocksy' ),
355 + 'view' => 'text',
356 + 'design' => 'block',
357 + 'responsive' => true,
358 + 'attr' => [ 'data-type' => 'alignment' ],
359 + 'setting' => [ 'transport' => 'postMessage' ],
360 + 'value' => 'CT_CSS_SKIP_RULE',
361 + 'choices' => [
362 + 'flex-start' => '',
363 + 'center' => '',
364 + 'flex-end' => '',
365 + ],
366 + ],
367 +
368 + 'footer_logo_vertical_alignment' => [
369 + 'type' => 'ct-radio',
370 + 'label' => __( 'Vertical Alignment', 'blocksy' ),
371 + 'view' => 'text',
372 + 'design' => 'block',
373 + 'divider' => 'top',
374 + 'responsive' => true,
375 + 'attr' => [ 'data-type' => 'vertical-alignment' ],
376 + 'setting' => [ 'transport' => 'postMessage' ],
377 + 'value' => 'CT_CSS_SKIP_RULE',
378 + 'choices' => [
379 + 'flex-start' => '',
380 + 'center' => '',
381 + 'flex-end' => '',
382 + ],
383 + ],
384 +
385 + 'visibility' => [
386 + 'label' => __('Element Visibility', 'blocksy'),
387 + 'type' => 'ct-visibility',
388 + 'design' => 'block',
389 + 'divider' => 'top',
390 + 'sync' => 'live',
391 + 'value' => blocksy_default_responsive_value([
392 + 'desktop' => true,
393 + 'tablet' => true,
394 + 'mobile' => true,
395 + ]),
396 + 'choices' => blocksy_ordered_keys([
397 + 'desktop' => __( 'Desktop', 'blocksy' ),
398 + 'tablet' => __( 'Tablet', 'blocksy' ),
399 + 'mobile' => __( 'Mobile', 'blocksy' ),
400 + ]),
401 + ],
402 + ] : [],
403 +
404 + [
405 + 'header_logo_class' => [
406 + 'label' => __( 'CSS Class', 'blocksy' ),
407 + 'type' => 'text',
408 + 'design' => 'block',
409 + 'divider' => 'top:full',
410 + 'value' => '',
411 + 'desc' => __( 'Separate multiple classes with spaces.', 'blocksy' ),
412 + ],
413 +
414 + 'header_logo_aria_label' => [
415 + 'label' => __( 'Custom Aria Label', 'blocksy' ),
416 + 'type' => 'text',
417 + 'design' => 'block',
418 + 'divider' => 'top',
419 + 'value' => '',
420 + 'desc' => blocksy_safe_sprintf(
421 + // translators: placeholder here means the actual URL.
422 + __( 'Add a custom %saria label%s attribute.', 'blocksy' ),
423 + blocksy_safe_sprintf(
424 + '<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label" target="_blank">'
425 + ),
426 + '</a>'
427 + ),
428 + ],
429 + ]
430 + ),
431 + ],
432 +
433 + blocksy_rand_md5() => [
434 + 'title' => __( 'Design', 'blocksy' ),
435 + 'type' => 'tab',
436 + 'options' => [
437 +
438 + blocksy_rand_md5() => [
439 + 'type' => 'ct-condition',
440 + 'condition' => [ 'has_site_title' => 'yes' ],
441 + 'options' => [
442 +
443 + 'siteTitle' => [
444 + 'type' => 'ct-typography',
445 + 'label' => __( 'Site Title', 'blocksy' ),
446 + 'value' => blocksy_typography_default_values([
447 + 'size' => '25px',
448 + 'variation' => 'n7',
449 + 'line-height' => '1.5'
450 + ]),
451 + 'setting' => [ 'transport' => 'postMessage' ],
452 + ],
453 +
454 + blocksy_rand_md5() => [
455 + 'type' => 'ct-labeled-group',
456 + 'label' => __( 'Site Title Color', 'blocksy' ),
457 + 'responsive' => true,
458 + 'choices' => [
459 + [
460 + 'id' => 'siteTitleColor',
461 + 'label' => __('Default State', 'blocksy')
462 + ],
463 +
464 + [
465 + 'id' => 'transparentSiteTitleColor',
466 + 'label' => __('Transparent State', 'blocksy'),
467 + 'condition' => [
468 + 'row' => '!offcanvas',
469 + 'builderSettings/has_transparent_header' => 'yes',
470 + ],
471 + ],
472 +
473 + [
474 + 'id' => 'stickySiteTitleColor',
475 + 'label' => __('Sticky State', 'blocksy'),
476 + 'condition' => [
477 + 'row' => '!offcanvas',
478 + 'builderSettings/has_sticky_header' => 'yes',
479 + ],
480 + ],
481 + ],
482 + 'options' => [
483 +
484 + 'siteTitleColor' => [
485 + 'label' => __( 'Site Title Color', 'blocksy' ),
486 + 'type' => 'ct-color-picker',
487 + 'design' => 'block:right',
488 + 'responsive' => true,
489 + 'setting' => [ 'transport' => 'postMessage' ],
490 +
491 + 'value' => [
492 + 'default' => [
493 + 'color' => 'var(--theme-palette-color-4)',
494 + ],
495 +
496 + 'hover' => [
497 + 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
498 + ],
499 + ],
500 +
501 + 'pickers' => [
502 + [
503 + 'title' => __( 'Initial', 'blocksy' ),
504 + 'id' => 'default',
505 + ],
506 +
507 + [
508 + 'title' => __( 'Hover', 'blocksy' ),
509 + 'id' => 'hover',
510 + 'inherit' => 'var(--theme-link-hover-color)',
511 + 'condition' => [ 'has_site_title_link' => 'yes' ]
512 + ],
513 + ],
514 + ],
515 +
516 + 'transparentSiteTitleColor' => [
517 + 'label' => __( 'Site Title Color', 'blocksy' ),
518 + 'type' => 'ct-color-picker',
519 + 'design' => 'block:right',
520 + 'responsive' => true,
521 + 'setting' => [ 'transport' => 'postMessage' ],
522 +
523 + 'value' => [
524 + 'default' => [
525 + 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
526 + ],
527 +
528 + 'hover' => [
529 + 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
530 + ],
531 + ],
532 +
533 + 'pickers' => [
534 + [
535 + 'title' => __( 'Initial', 'blocksy' ),
536 + 'id' => 'default',
537 + ],
538 +
539 + [
540 + 'title' => __( 'Hover', 'blocksy' ),
541 + 'id' => 'hover',
542 + 'condition' => [ 'has_site_title_link' => 'yes' ]
543 + ],
544 + ],
545 + ],
546 +
547 + 'stickySiteTitleColor' => [
548 + 'label' => __( 'Site Title Color', 'blocksy' ),
549 + 'type' => 'ct-color-picker',
550 + 'design' => 'block:right',
551 + 'responsive' => true,
552 + 'setting' => [ 'transport' => 'postMessage' ],
553 +
554 + 'value' => [
555 + 'default' => [
556 + 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
557 + ],
558 +
559 + 'hover' => [
560 + 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
561 + ],
562 + ],
563 +
564 + 'pickers' => [
565 + [
566 + 'title' => __( 'Initial', 'blocksy' ),
567 + 'id' => 'default',
568 + ],
569 +
570 + [
571 + 'title' => __( 'Hover', 'blocksy' ),
572 + 'id' => 'hover',
573 + 'condition' => [ 'has_site_title_link' => 'yes' ]
574 + ],
575 + ],
576 + ],
577 +
578 + ],
579 + ],
580 +
581 + blocksy_rand_md5() => [
582 + 'type' => 'ct-divider',
583 + ],
584 +
585 + ],
586 + ],
587 +
588 + blocksy_rand_md5() => [
589 + 'type' => 'ct-condition',
590 + 'condition' => [ 'has_tagline' => 'yes' ],
591 + 'options' => [
592 +
593 + 'siteTagline' => [
594 + 'type' => 'ct-typography',
595 + 'label' => __( 'Site Tagline Font', 'blocksy' ),
596 + 'value' => blocksy_typography_default_values([
597 + 'size' => '13px',
598 + 'variation' => 'n5',
599 + ]),
600 + 'setting' => [ 'transport' => 'postMessage' ],
601 + ],
602 +
603 + blocksy_rand_md5() => [
604 + 'type' => 'ct-labeled-group',
605 + 'label' => __( 'Site Tagline Color', 'blocksy' ),
606 + 'responsive' => true,
607 + 'choices' => [
608 + [
609 + 'id' => 'siteTaglineColor',
610 + 'label' => __('Default State', 'blocksy')
611 + ],
612 +
613 + [
614 + 'id' => 'transparentSiteTaglineColor',
615 + 'label' => __('Transparent State', 'blocksy'),
616 + 'condition' => [
617 + 'row' => '!offcanvas',
618 + 'builderSettings/has_transparent_header' => 'yes',
619 + ],
620 + ],
621 +
622 + [
623 + 'id' => 'stickySiteTaglineColor',
624 + 'label' => __('Sticky State', 'blocksy'),
625 + 'condition' => [
626 + 'row' => '!offcanvas',
627 + 'builderSettings/has_sticky_header' => 'yes',
628 + ],
629 + ],
630 + ],
631 + 'options' => [
632 +
633 + 'siteTaglineColor' => [
634 + 'label' => __( 'Site Tagline Color', 'blocksy' ),
635 + 'type' => 'ct-color-picker',
636 + 'design' => 'block:right',
637 + 'responsive' => true,
638 + 'setting' => [ 'transport' => 'postMessage' ],
639 +
640 + 'value' => [
641 + 'default' => [
642 + 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
643 + ],
644 + ],
645 +
646 + 'pickers' => [
647 + [
648 + 'title' => __( 'Initial', 'blocksy' ),
649 + 'id' => 'default',
650 + 'inherit' => 'var(--theme-text-color)'
651 + ],
652 + ],
653 + ],
654 +
655 + 'transparentSiteTaglineColor' => [
656 + 'label' => __( 'Site Tagline Color', 'blocksy' ),
657 + 'type' => 'ct-color-picker',
658 + 'design' => 'block:right',
659 + 'responsive' => true,
660 + 'setting' => [ 'transport' => 'postMessage' ],
661 +
662 + 'value' => [
663 + 'default' => [
664 + 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
665 + ],
666 + ],
667 +
668 + 'pickers' => [
669 + [
670 + 'title' => __( 'Initial', 'blocksy' ),
671 + 'id' => 'default',
672 + ],
673 + ],
674 + ],
675 +
676 + 'stickySiteTaglineColor' => [
677 + 'label' => __( 'Site Tagline Color', 'blocksy' ),
678 + 'type' => 'ct-color-picker',
679 + 'design' => 'block:right',
680 + 'responsive' => true,
681 + 'setting' => [ 'transport' => 'postMessage' ],
682 +
683 + 'value' => [
684 + 'default' => [
685 + 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
686 + ],
687 + ],
688 +
689 + 'pickers' => [
690 + [
691 + 'title' => __( 'Initial', 'blocksy' ),
692 + 'id' => 'default',
693 + ],
694 + ],
695 + ],
696 +
697 + ],
698 + ],
699 +
700 + blocksy_rand_md5() => [
701 + 'type' => 'ct-divider',
702 + ],
703 +
704 + ],
705 + ],
706 +
707 + 'headerLogoMargin' => [
708 + 'label' => __( 'Margin', 'blocksy' ),
709 + 'type' => 'ct-spacing',
710 + 'setting' => [ 'transport' => 'postMessage' ],
711 + 'value' => blocksy_spacing_value(),
712 + 'responsive' => true
713 + ],
714 +
715 + ],
716 + ],
717 + ];
718 +