PluginProbe
Post Grid Gutenberg Blocks – PostX / 2.6.4
Post Grid Gutenberg Blocks – PostX v2.6.4
5.0.39 5.0.38 5.0.37 5.0.36 5.0.35 5.0.34 5.0.33 5.0.32 5.0.31 5.0.30 5.0.29 5.0.28 5.0.27 5.0.26 5.0.25 5.0.23 5.0.24 5.0.22 5.0.21 5.0.20 5.0.19 5.0.18 5.0.17 2.1.1 2.1.2 All 237 releases
ultimate-post / blocks / Taxonomy.php

Taxonomy.php in Post Grid Gutenberg Blocks – PostX 2.6.4, at blocks/Taxonomy.php

1,608 lines 76.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace ULTP\blocks;
3
4 defined('ABSPATH') || exit;
5
6 class Taxonomy{
7 public function __construct() {
8 add_action('init', array($this, 'register'));
9 }
10 public function get_attributes($default = false){
11
12 $attributes = array(
13 'blockId' => [
14 'type' => 'string',
15 'default' => '',
16 ],
17 'previewImg' => [
18 'type' => 'string',
19 'default' => '',
20 ],
21 //--------------------------
22 // Layout
23 //--------------------------
24 'layout' => [
25 'type' => 'string',
26 'default' => '1',
27 ],
28
29 //--------------------------
30 // Query Setting
31 //--------------------------
32 'taxType' => [
33 'type' => 'string',
34 'default' => 'regular',
35 ],
36 'taxSlug' => [
37 'type' => 'string',
38 'default' => 'category',
39 ],
40 'taxValue' => [
41 'type' => 'string',
42 'default' => '[]',
43 'style' => [
44 (object)[
45 'depends' => [
46 (object)['key'=>'taxType','condition'=>'!=','value'=>['parent','regular']],
47 ],
48 ],
49 ],
50 ],
51 'queryNumber' => [
52 'type' => 'string',
53 'default' => 6,
54 'style' => [
55 (object)[
56 'depends' => [
57 (object)['key'=>'taxType','condition'=>'!=','value'=>'custom'],
58 ],
59 ],
60 ],
61 ],
62 //--------------------------
63 // General Setting
64 //--------------------------
65 'taxGridEn' => [
66 'type' => 'boolean',
67 'default' => true,
68 ],
69 'columns' => [
70 'type' => 'object',
71 'default' => (object)['lg' =>'1'],
72 'style' => [
73 (object)[
74 'depends' => [
75 (object)['key'=>'taxGridEn','condition'=>'==','value'=>true],
76 ],
77 'selector'=>'{{ULTP}}.wp-block-ultimate-post-ultp-taxonomy .ultp-block-items-wrap .ultp-taxonomy-items { grid-template-columns: repeat({{columns}}, 1fr); }'
78 ],
79 ],
80 ],
81 'columnGridGap' => [
82 'type' => 'object',
83 'default' => (object)['lg' =>'20', 'unit' =>'px'],
84 'style' => [
85 (object)[
86 'depends' => [
87 (object)['key'=>'taxGridEn','condition'=>'==','value'=>true],
88 ],
89 'selector'=>'{{ULTP}} .ultp-block-items-wrap .ultp-taxonomy-items { grid-column-gap: {{columnGridGap}}; } {{ULTP}} .ultp-taxonomy-items .ultp-taxonomy-item { margin-bottom: 0; }'
90 ],
91 ],
92 ],
93 'rowGap' => [
94 'type' => 'object',
95 'default' => (object)['lg' =>'20', 'unit' =>'px'],
96 'style' => [
97 (object)[
98 'depends' => [
99 (object)['key'=>'taxGridEn','condition'=>'==','value'=>true],
100 ],
101 'selector'=>'{{ULTP}} .ultp-block-items-wrap .ultp-taxonomy-items { grid-row-gap: {{rowGap}}; }'
102 ],
103 ],
104 ],
105 'titleShow' => [
106 'type' => 'boolean',
107 'default' => true,
108 ],
109 'headingShow' => [
110 'type' => 'boolean',
111 'default' => true,
112 ],
113 'excerptShow' => [
114 'type' => 'boolean',
115 'default' => false
116 ],
117 'countShow' => [
118 'type' => 'boolean',
119 'default' => true
120 ],
121 // 'showImage' => [
122 // 'type' => 'boolean',
123 // 'default' => true,
124 // 'style' => [
125 // (object)[
126 // 'depends' => [
127 // (object)['key'=>'layout','condition'=>'!=','value'=>'1'],
128 // ],
129 // ],
130 // ],
131 // ],
132 'openInTab' => [
133 'type' => 'boolean',
134 'default' => false,
135 ],
136
137
138 //--------------------------
139 // Heading Setting/Style
140 //--------------------------
141 'headingText' => [
142 'type' => 'string',
143 'default' => 'Post Taxonomy',
144 ],
145 'headingURL' => [
146 'type' => 'string',
147 'default' => '',
148 ],
149 'headingBtnText' => [
150 'type' => 'string',
151 'default' => 'View More',
152 'style' => [
153 (object)[
154 'depends' => [
155 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style11'],
156 ],
157 ],
158 ],
159 ],
160 'headingStyle' => [
161 'type' => 'string',
162 'default' => 'style9',
163 ],
164 'headingTag' => [
165 'type' => 'string',
166 'default' => 'h2',
167 ],
168 'headingAlign' => [
169 'type' => 'string',
170 'default' => 'left',
171 'style' => [
172 (object) [
173 'selector' => '{{ULTP}} .ultp-heading-inner, {{ULTP}} .ultp-sub-heading-inner{ text-align:{{headingAlign}}; }'
174 ]
175 ]
176 ],
177 'headingTypo' => [
178 'type' => 'object',
179 'default' => (object)['openTypography' => 1,'size' => (object)['lg' => '20', 'unit' => 'px'], 'height' => (object)['lg' => '', 'unit' => 'px'],'decoration' => 'none', 'transform' => '', 'family'=>'','weight'=>'700'],
180 'style' => [(object)['selector' => '{{ULTP}} .ultp-heading-wrap .ultp-heading-inner']]
181 ],
182 'headingColor' => [
183 'type' => 'string',
184 'default' => '#0e1523',
185 'style' => [(object)['selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { color:{{headingColor}}; }']],
186 ],
187 'headingBorderBottomColor' => [
188 'type' => 'string',
189 'default' => '#0e1523',
190 'style' => [
191 (object)[
192 'depends' => [
193 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'],
194 ],
195 'selector'=>'{{ULTP}} .ultp-heading-inner { border-bottom-color:{{headingBorderBottomColor}}; }'
196 ],
197 (object)[
198 'depends' => [
199 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style4'],
200 ],
201 'selector'=>'{{ULTP}} .ultp-heading-inner { border-color:{{headingBorderBottomColor}}; }'
202 ],
203 (object)[
204 'depends' => [
205 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style6'],
206 ],
207 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { background-color: {{headingBorderBottomColor}}; }'
208 ],
209 (object)[
210 'depends' => [
211 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style7'],
212 ],
213 'selector'=>'{{ULTP}} .ultp-heading-inner span:before, {{ULTP}} .ultp-heading-inner span:after { background-color: {{headingBorderBottomColor}}; }'
214 ],
215 (object)[
216 'depends' => [
217 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style8'],
218 ],
219 'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor}}; }'
220 ],
221 (object)[
222 'depends' => [
223 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style9'],
224 ],
225 'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor}}; }'
226 ],
227 (object)[
228 'depends' => [
229 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style10'],
230 ],
231 'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor}}; }'
232 ],
233 (object)[
234 'depends' => [
235 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'],
236 ],
237 'selector'=>'{{ULTP}} .ultp-heading-inner { border-color:{{headingBorderBottomColor}}; }'
238 ],
239 (object)[
240 'depends' => [
241 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style14'],
242 ],
243 'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor}}; }'
244 ],
245 (object)[
246 'depends' => [
247 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style15'],
248 ],
249 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { background-color:{{headingBorderBottomColor}}; }'
250 ],
251 (object)[
252 'depends' => [
253 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style16'],
254 ],
255 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { background-color:{{headingBorderBottomColor}}; }'
256 ],
257 (object)[
258 'depends' => [
259 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style17'],
260 ],
261 'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor}}; }'
262 ],
263 (object)[
264 'depends' => [
265 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'],
266 ],
267 'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor}}; }'
268 ],
269 (object)[
270 'depends' => [
271 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style19'],
272 ],
273 'selector'=>'{{ULTP}} .ultp-heading-inner:before { border-color:{{headingBorderBottomColor}}; }'
274 ],
275 ],
276 ],
277 'headingBorderBottomColor2' => [
278 'type' => 'string',
279 'default' => '#e5e5e5',
280 'style' => [
281 (object)[
282 'depends' => [
283 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style8'],
284 ],
285 'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor2}}; }'
286 ],
287 (object)[
288 'depends' => [
289 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style10'],
290 ],
291 'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor2}}; }'
292 ],
293 (object)[
294 'depends' => [
295 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style14'],
296 ],
297 'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor2}}; }'
298 ],
299 (object)[
300 'depends' => [
301 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style19'],
302 ],
303 'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor2}}; }'
304 ],
305 ],
306 ],
307 'headingBg' => [
308 'type' => 'string',
309 'default' => '#037fff',
310 'style' => [
311 (object)[
312 'depends' => [
313 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style5'],
314 ],
315 'selector'=>'{{ULTP}} .ultp-heading-style5 .ultp-heading-inner span:before { border-color:{{headingBg}} transparent transparent; } {{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }'
316 ],
317 (object)[
318 'depends' => [
319 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style2'],
320 ],
321 'selector'=>'{{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }'
322 ],
323 (object)[
324 'depends' => [
325 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style21'],
326 ],
327 'selector'=>'{{ULTP}} .ultp-heading-inner span, {{ULTP}} .ultp-heading-inner span:after { background-color:{{headingBg}}; }'
328 ],
329 (object)[
330 'depends' => [
331 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'],
332 ],
333 'selector'=>'{{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }'
334 ],
335 (object)[
336 'depends' => [
337 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style12'],
338 ],
339 'selector'=>'{{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }'
340 ],
341 (object)[
342 'depends' => [
343 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'],
344 ],
345 'selector'=>'{{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }'
346 ],
347 (object)[
348 'depends' => [
349 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'],
350 ],
351 'selector'=>'{{ULTP}} .ultp-heading-inner { background-color:{{headingBg}}; }'
352 ],
353 (object)[
354 'depends' => [
355 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style20'],
356 ],
357 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { border-color:{{headingBg}} transparent transparent; } {{ULTP}} .ultp-heading-inner { background-color:{{headingBg}}; }'
358 ],
359 ],
360 ],
361 'headingBg2' => [
362 'type' => 'string',
363 'default' => '#e5e5e5',
364 'style' => [
365 (object)[
366 'depends' => [
367 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style12'],
368 ],
369 'selector'=>'{{ULTP}} .ultp-heading-inner { background-color:{{headingBg2}}; }'
370 ],
371 ],
372 ],
373 'headingBtnTypo' => [
374 'type' => 'object',
375 'default' => (object)['openTypography' => 1,'size' => (object)['lg' => '14', 'unit' => 'px'], 'height' => (object)['lg' => '', 'unit' => 'px'],'decoration' => 'none','family'=>''],
376 'style' => [
377 (object)[
378 'depends' => [
379 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style11'],
380 ],
381 'selector'=>'{{ULTP}} .ultp-block-wrapper .ultp-heading-wrap .ultp-heading-btn'
382 ],
383 ],
384 ],
385 'headingBtnColor' => [
386 'type' => 'string',
387 'default' => '#037fff',
388 'style' => [
389 (object)[
390 'depends' => [
391 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style11'],
392 ],
393 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-btn { color:{{headingBtnColor}}; } {{ULTP}} .ultp-heading-wrap .ultp-heading-btn svg { fill:{{headingBtnColor}}; }'
394 ],
395 ],
396 ],
397 'headingBtnHoverColor' => [
398 'type' => 'string',
399 'default' => '#0a31da',
400 'style' => [
401 (object)[
402 'depends' => [
403 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style11'],
404 ],
405 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-btn:hover { color:{{headingBtnHoverColor}}; } {{ULTP}} .ultp-heading-wrap .ultp-heading-btn:hover svg { fill:{{headingBtnHoverColor}}; }'
406 ],
407 ],
408 ],
409
410 'headingBorder' => [
411 'type' => 'string',
412 'default' => '3',
413 'style' => [
414 (object)[
415 'depends' => [
416 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'],
417 ],
418 'selector'=>'{{ULTP}} .ultp-heading-inner { border-bottom-width:{{headingBorder}}px; }'
419 ],
420 (object)[
421 'depends' => [
422 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style4'],
423 ],
424 'selector'=>'{{ULTP}} .ultp-heading-inner { border-width:{{headingBorder}}px; }'
425 ],
426 (object)[
427 'depends' => [
428 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style6'],
429 ],
430 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { width:{{headingBorder}}px; }'
431 ],
432 (object)[
433 'depends' => [
434 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style7'],
435 ],
436 'selector'=>'{{ULTP}} .ultp-heading-inner span:before, {{ULTP}} .ultp-heading-inner span:after { height:{{headingBorder}}px; }'
437 ],
438 (object)[
439 'depends' => [
440 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style8'],
441 ],
442 'selector'=>'{{ULTP}} .ultp-heading-inner:before, {{ULTP}} .ultp-heading-inner:after { height:{{headingBorder}}px; }'
443 ],
444 (object)[
445 'depends' => [
446 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style9'],
447 ],
448 'selector'=>'{{ULTP}} .ultp-heading-inner:before { height:{{headingBorder}}px; }'
449 ],
450 (object)[
451 'depends' => [
452 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style10'],
453 ],
454 'selector'=>'{{ULTP}} .ultp-heading-inner:before, {{ULTP}} .ultp-heading-inner:after { height:{{headingBorder}}px; }'
455 ],
456 (object)[
457 'depends' => [
458 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'],
459 ],
460 'selector'=>'{{ULTP}} .ultp-heading-inner { border-width:{{headingBorder}}px; }'
461 ],
462 (object)[
463 'depends' => [
464 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style14'],
465 ],
466 'selector'=>'{{ULTP}} .ultp-heading-inner:before, {{ULTP}} .ultp-heading-inner:after { height:{{headingBorder}}px; }'
467 ],
468 (object)[
469 'depends' => [
470 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style15'],
471 ],
472 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { height:{{headingBorder}}px; }'
473 ],
474 (object)[
475 'depends' => [
476 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style16'],
477 ],
478 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { height:{{headingBorder}}px; }'
479 ],
480 (object)[
481 'depends' => [
482 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style17'],
483 ],
484 'selector'=>'{{ULTP}} .ultp-heading-inner:before { height:{{headingBorder}}px; }'
485 ],
486 (object)[
487 'depends' => [
488 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style19'],
489 ],
490 'selector'=>'{{ULTP}} .ultp-heading-inner:after { width:{{headingBorder}}px; }'
491 ],
492 (object)[
493 'depends' => [
494 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'],
495 ],
496 'selector'=>'{{ULTP}} .ultp-heading-inner:after { width:{{headingBorder}}px; }'
497 ],
498 ],
499 ],
500 'headingSpacing' => [
501 'type' => 'object',
502 'default' => (object)['lg'=>20, 'sm'=>10, 'unit'=>'px'],
503 'style' => [(object)['selector'=>'{{ULTP}} .ultp-heading-wrap {margin-top:0; margin-bottom:{{headingSpacing}}; }']]
504 ],
505 'headingRadius' => [
506 'type' => 'object',
507 'default' => (object)['lg' =>(object)['top' => '','bottom' => '','left' => '', 'right' => '', 'unit' =>'px']],
508 'style' => [
509 (object)[
510 'depends' => [
511 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style2'],
512 ],
513 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { border-radius:{{headingRadius}}; }'
514 ],
515 (object)[
516 'depends' => [
517 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'],
518 ],
519 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { border-radius:{{headingRadius}}; }'
520 ],
521 (object)[
522 'depends' => [
523 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style4'],
524 ],
525 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner { border-radius:{{headingRadius}}; }'
526 ],
527 (object)[
528 'depends' => [
529 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style5'],
530 ],
531 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { border-radius:{{headingRadius}}; }'
532 ],
533 (object)[
534 'depends' => [
535 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style12'],
536 ],
537 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner { border-radius:{{headingRadius}}; }'
538 ],
539 (object)[
540 'depends' => [
541 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'],
542 ],
543 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner { border-radius:{{headingRadius}}; }'
544 ],
545 (object)[
546 'depends' => [
547 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'],
548 ],
549 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner { border-radius:{{headingRadius}}; }'
550 ],
551 (object)[
552 'depends' => [
553 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style20'],
554 ],
555 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner { border-radius:{{headingRadius}}; }'
556 ],
557 ]
558 ],
559 'headingPadding' => [
560 'type' => 'object',
561 'default' => (object)['lg' =>(object)['unit' =>'px']],
562 'style' => [
563 (object)[
564 'depends' => [
565 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style2'],
566 ],
567 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
568 ],
569 (object)[
570 'depends' => [
571 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'],
572 ],
573 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
574 ],
575 (object)[
576 'depends' => [
577 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style4'],
578 ],
579 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
580 ],
581 (object)[
582 'depends' => [
583 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style5'],
584 ],
585 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
586 ],
587 (object)[
588 'depends' => [
589 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style6'],
590 ],
591 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
592 ],
593 (object)[
594 'depends' => [
595 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style12'],
596 ],
597 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
598 ],
599 (object)[
600 'depends' => [
601 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'],
602 ],
603 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
604 ],
605 (object)[
606 'depends' => [
607 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'],
608 ],
609 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
610 ],
611 (object)[
612 'depends' => [
613 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style19'],
614 ],
615 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
616 ],
617 (object)[
618 'depends' => [
619 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style20'],
620 ],
621 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
622 ],
623 (object)[
624 'depends' => [
625 (object)['key'=>'headingStyle','condition'=>'==','value'=>'style21'],
626 ],
627 'selector'=>'{{ULTP}} .ultp-heading-inner span { padding:{{headingPadding}}; }'
628 ],
629 ]
630 ],
631 'subHeadingShow' => [
632 'type' => 'boolean',
633 'default' => false,
634 ],
635 'subHeadingText' => [
636 'type' => 'string',
637 'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ut sem augue. Sed at felis ut enim dignissim sodales.',
638 'style' => [
639 (object)[
640 'depends' => [
641 (object)['key'=>'subHeadingShow','condition'=>'==','value'=>true],
642 ],
643 ],
644 ],
645 ],
646 'subHeadingTypo' => [
647 'type' => 'object',
648 'default' => (object)['openTypography'=>1,'size'=>(object)['lg'=>'16', 'unit'=>'px'], 'spacing'=>(object)[ 'lg'=>'0', 'unit'=>'px'], 'height'=>(object)[ 'lg'=>'27', 'unit'=>'px'],'decoration'=>'none','transform' => '','family'=>'','weight'=>'500'],
649 'style' => [
650 (object)[
651 'depends' => [
652 (object)['key'=>'subHeadingShow','condition'=>'==','value'=>true],
653 ],
654 'selector'=>'{{ULTP}} .ultp-sub-heading div'
655 ],
656 ],
657 ],
658 'subHeadingColor' => [
659 'type' => 'string',
660 'default' => '#989898',
661 'style' => [
662 (object)[
663 'depends' => [
664 (object)['key'=>'subHeadingShow','condition'=>'==','value'=>true],
665 ],
666 'selector'=>'{{ULTP}} .ultp-sub-heading div{ color:{{subHeadingColor}}; }'
667 ],
668 ],
669 ],
670 'subHeadingSpacing' => [
671 'type' => 'object',
672 'default' => (object)['lg' =>(object)['top' => '8', 'unit' =>'px']],
673 'style' => [
674 (object)[
675 'depends' => [
676 (object)['key'=>'subHeadingShow','condition'=>'==','value'=>true],
677 ],
678 'selector'=>'{{ULTP}} div.ultp-sub-heading-inner{ margin:{{subHeadingSpacing}}; }'
679 ],
680 ],
681 ],
682
683 //--------------------------
684 // Title Setting/Style
685 //--------------------------
686 'titleTag' => [
687 'type' => 'string',
688 'default' => 'h3',
689 ],
690 'contentTitleAlign' => [
691 'type' => 'string',
692 'default' => 'left',
693 'style' => [
694 (object) [
695 'depends' => [
696 (object)['key'=>'layout','condition'=>'==','value'=> '1'],
697 (object)['key'=>'countShow','condition'=>'==','value'=> false],
698 ],
699 'selector' => '{{ULTP}} .ultp-block-items-wrap ul li a { justify-content: {{contentTitleAlign}};}'
700 ]
701 ]
702 ],
703 'titlePosition' => [
704 'type' => 'boolean',
705 'default' => true,
706 ],
707 'customTaxTitleColor' => [
708 'type' => 'boolean',
709 'default' => false,
710 'style' => [
711 (object)[
712 'depends' => [
713 (object)['key'=>'layout','condition'=>'!=','value'=>['2','3','6']],
714 ]
715 ]
716 ]
717 ],
718 'seperatorTaxTitleLink' => [
719 'type' => 'string',
720 'default' => admin_url( 'edit-tags.php?taxonomy=category' ),
721 'style' => [
722 (object)[
723 'depends' => [
724 (object)['key'=>'customTaxTitleColor','condition'=>'==','value'=>true],
725 (object)['key'=>'layout','condition'=>'!=','value'=>['2','3','6']],
726 ]
727 ]
728 ]
729 ],
730 'titleColor' => [
731 'type' => 'string',
732 'default' => '',
733 'style' => [
734 (object)[
735 'depends' => [
736 (object)['key'=>'layout','condition'=>'==','value'=>['7','8']],
737 ],
738 'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-name { color:{{titleColor}}; }'
739 ],
740 (object)[
741 'depends' => [
742 (object)['key'=>'customTaxTitleColor','condition'=>'==','value'=>false],
743 ],
744 'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-name { color:{{titleColor}}; }'
745 ],
746
747 ],
748 ],
749 'TitleBgColor' => [
750 'type' => 'string',
751 'default' => '#f2f2f2',
752 'style' => [
753 (object)[
754 'depends' => [
755 (object)['key'=>'layout','condition'=>'==','value'=>['7','8']],
756 (object)['key'=>'customTaxTitleColor','condition'=>'==','value'=>false],
757 ],
758 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-7 li a .ultp-taxonomy-name, {{ULTP}} .ultp-taxonomy-layout-8 li a .ultp-taxonomy-name { background:{{TitleBgColor}}; }'
759 ],
760 ],
761 ],
762 'TitleBgHoverColor' => [
763 'type' => 'string',
764 'default' => '#c5c5c5',
765 'style' => [
766 (object)[
767 'depends' => [
768 (object)['key'=>'layout','condition'=>'==','value'=>['7','8']],
769 (object)['key'=>'customTaxTitleColor','condition'=>'==','value'=>false],
770 ],
771 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-7 li a:hover .ultp-taxonomy-name, {{ULTP}} .ultp-taxonomy-layout-8 li a:hover .ultp-taxonomy-name { background:{{TitleBgHoverColor}}; }'
772 ],
773 ],
774 ],
775 'titleHoverColor' => [
776 'type' => 'string',
777 'default' => '',
778 'style' => [
779 (object)[
780 'selector'=>'{{ULTP}} .ultp-block-item a:hover .ultp-taxonomy-name, {{ULTP}} .ultp-block-item a:hover .ultp-taxonomy-count { color:{{titleHoverColor}}!important; }'
781 ],
782 ],
783 ],
784 'titleTypo' => [
785 'type' => 'object',
786 'default' => (object)['openTypography'=>1,'size'=>(object)['lg'=>'14', 'unit'=>'px'], 'spacing'=>(object)[ 'lg'=>'0', 'unit'=>'px'], 'height'=>(object)['lg'=>'22', 'unit'=>'px'],'transform' => '', 'decoration'=>'none','family'=>'','weight'=>''],
787 'style' => [
788 (object)[
789 'depends' => [
790 (object)['key'=>'titleShow','condition'=>'==','value'=>true],
791 ],
792 'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-name'
793 ],
794 ],
795 ],
796 'titleDotColor' => [
797 'type' => 'string',
798 'default' => '#cacaca',
799 'style' => [
800 (object)[
801 'depends' => [
802 (object)['key'=>'layout','condition'=>'==','value'=>['2','3']],
803 ],
804 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-2 li a .ultp-taxonomy-bar, {{ULTP}} .ultp-taxonomy-layout-3 li a .ultp-taxonomy-bar { border-bottom-color:{{titleDotColor}}; }'
805 ],
806 ],
807 ],
808 'titleDotSize' => [
809 'type' => 'string',
810 'default' => 'solid',
811 'style' => [
812 (object)[
813 'depends' => [
814 (object)['key'=>'layout','condition'=>'==','value'=>['2','3']],
815 ],
816 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-2 li a .ultp-taxonomy-bar, {{ULTP}} .ultp-taxonomy-layout-3 li a .ultp-taxonomy-bar { border-bottom-width:{{titleDotSize}}px; }'
817 ],
818 ],
819 ],
820 'titleDotStyle' => [
821 'type' => 'string',
822 'default' => (object)['lg'=>'1'],
823 'style' => [
824 (object)[
825 'depends' => [
826 (object)['key'=>'layout','condition'=>'==','value'=>['2','3']],
827 ],
828 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-2 li a .ultp-taxonomy-bar, {{ULTP}} .ultp-taxonomy-layout-3 li a .ultp-taxonomy-bar { border-bottom-style: {{titleDotStyle}}; }'
829 ],
830 ],
831 ],
832 'titlePadding' => [
833 'type' => 'object',
834 'default' => (object)['lg'=>(object)['unit'=>'px']],
835 'style' => [
836 (object)[
837 'depends' => [
838 (object)['key'=>'titleShow','condition'=>'==','value'=>true],
839 ],
840 'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-name { padding:{{titlePadding}}; }'
841 ],
842 ],
843 ],
844 'titleRadius' => [
845 'type' => 'object',
846 'default' => (object)['lg'=>'20', 'unit'=>'px'],
847 'style' => [
848 (object)[
849 'depends' => [
850 (object)['key'=>'titleShow','condition'=>'==','value'=>true],
851 (object)['key'=>'layout','condition'=>'==','value'=>['7','8']],
852 ],
853 'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-name { border-radius:{{titleRadius}}; }'
854 ],
855 ],
856 ],
857
858 //--------------------------
859 // Content Setting/Style
860 //--------------------------
861 'excerptLimit' => [
862 'type' => 'string',
863 'default' => 30,
864 ],
865 'excerptColor' => [
866 'type' => 'string',
867 'default' => '',
868 'style' => [
869 (object)[
870 'depends' => [
871 (object)['key'=>'excerptShow','condition'=>'==','value'=>true],
872 ],
873 'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-desc { color:{{excerptColor}}; }'
874 ],
875 ],
876 ],
877 'excerptTypo' => [
878 'type' => 'object',
879 'default' => (object)['openTypography' => 1,'size' => (object)['lg' =>14, 'unit' =>'px'],'height' => (object)['lg' =>'22', 'unit' =>'px'], 'decoration' => 'none','family'=>''],
880 'style' => [
881 (object)[
882 'depends' => [
883 (object)['key'=>'excerptShow','condition'=>'==','value'=>true],
884 ],
885 'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-desc'
886 ],
887 ],
888 ],
889 'excerptPadding' => [
890 'type' => 'object',
891 'default' => (object)['lg' =>(object)['top' => '0','bottom' => '', 'unit' =>'px']],
892 'style' => [
893 (object)[
894 'depends' => [
895 (object)['key'=>'excerptShow','condition'=>'==','value'=>true],
896 ],
897 'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-desc { padding: {{excerptPadding}}; }'
898 ],
899 ],
900 ],
901
902
903 //--------------------------
904 // Count Style Setting/Style
905 //--------------------------
906 'counterTypo' => [
907 'type' => 'object',
908 'default' => (object)['openTypography' => 1, 'size' => (object)['lg' =>14, 'unit' =>'px'], 'height' => (object)['lg' =>'22', 'unit' =>'px'], 'spacing' => (object)['lg' =>0, 'unit' =>'px'], 'transform' => '', 'weight' => '400', 'decoration' => 'none','family'=>'' ],
909 'style' => [
910 (object)[
911 'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-count'
912 ],
913 ],
914 ],
915 'counterColor' => [
916 'type' => 'string',
917 'default' => '',
918 'style' => [
919 (object)[
920 'selector' => '{{ULTP}} .ultp-block-item .ultp-taxonomy-count { color:{{counterColor}}; }'
921 ],
922 ]
923 ],
924 'counterBgColor' => [
925 'type' => 'object',
926 'default' => (object)['openColor' => 1,'type' => 'color', 'color' => ''],
927 'style' => [
928 (object)[
929 'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-count'
930 ],
931 ],
932 ],
933 'counterWidth' => [
934 'type' => 'string',
935 'default' => '',
936 'style' => [
937 (object)[
938 'selector' => '{{ULTP}} .ultp-block-item .ultp-taxonomy-count { width:{{counterWidth}}px; }'
939 ],
940 ]
941 ],
942 'counterHeight' => [
943 'type' => 'string',
944 'default' => '',
945 'style' => [
946 (object)[
947 'selector' => '{{ULTP}} .ultp-block-item .ultp-taxonomy-count { height:{{counterHeight}}px; line-height:{{counterHeight}}px !important; }'
948 ],
949 ]
950 ],
951 'counterBorder' => [
952 'type' => 'object',
953 'default' => (object)['openBorder'=>0, 'width' => (object)[ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid' ],
954 'style' => [
955 (object)[
956 'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-count'
957 ],
958 ],
959 ],
960 'counterRadius' => [
961 'type' => 'object',
962 'default' => (object)['lg' =>'', 'unit' =>'px'],
963 'style' => [
964 (object)[
965 'selector'=>'{{ULTP}} .ultp-block-item .ultp-taxonomy-count { border-radius:{{counterRadius}}; }'
966 ],
967 ],
968 ],
969
970 //--------------------------
971 // Inner Content Setting/Style
972 //--------------------------
973 'contentWrapBg' => [
974 'type' => 'string',
975 'default' => '',
976 'style' => [
977 (object)[
978 'depends' => [
979 (object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']],
980 ],
981 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-item a .ultp-taxonomy-lt5-content { background:{{contentWrapBg}}; }'
982 ],
983 ],
984 ],
985 'contentWrapHoverBg' => [
986 'type' => 'string',
987 'style' => [
988 (object)[
989 'depends' => [
990 (object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']],
991 ],
992 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a:hover, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a:hover, {{ULTP}} .ultp-taxonomy-item a:hover .ultp-taxonomy-lt5-content { background:{{contentWrapHoverBg}}; }'
993 ],
994 ],
995 ],
996 'contentWrapBorder' => [
997 'type' => 'object',
998 'default' => (object)['openBorder'=>0, 'width' => (object)[ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid' ],
999 'style' => [
1000 (object)[
1001 'depends' => [
1002 (object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']],
1003 ],
1004 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-layout-5 .ultp-taxonomy-item a'
1005 ],
1006 ],
1007 ],
1008 'contentWrapHoverBorder' => [
1009 'type' => 'object',
1010 'default' => (object)['openBorder'=>0, 'width' => (object)[ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid' ],
1011 'style' => [
1012 (object)[
1013 'depends' => [
1014 (object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']],
1015 ],
1016 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a:hover, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a:hover, {{ULTP}} .ultp-taxonomy-layout-5 .ultp-taxonomy-item a:hover'
1017 ],
1018 ],
1019 ],
1020 'contentWrapRadius' => [
1021 'type' => 'object',
1022 'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'unit' =>'px']],
1023 'style' => [
1024 (object)[
1025 'depends' => [
1026 (object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']],
1027 ],
1028 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-layout-5 .ultp-taxonomy-item a { border-radius: {{contentWrapRadius}}; }'
1029 ],
1030 ],
1031 ],
1032 'contentWrapHoverRadius' => [
1033 'type' => 'object',
1034 'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'unit' =>'px']],
1035 'style' => [
1036 (object)[
1037 'depends' => [
1038 (object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']],
1039 ],
1040 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a:hover, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a:hover, {{ULTP}} .ultp-taxonomy-layout-5 .ultp-taxonomy-item a:hover { border-radius: {{contentWrapHoverRadius}}; }'
1041 ],
1042 ],
1043 ],
1044 'contentWrapShadow' => [
1045 'type' => 'object',
1046 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'],
1047 'style' => [
1048 (object)[
1049 'depends' => [
1050 (object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']],
1051 ],
1052 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-layout-5 .ultp-taxonomy-item a'
1053 ],
1054 ],
1055 ],
1056 'contentWrapHoverShadow' => [
1057 'type' => 'object',
1058 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'],
1059 'style' => [
1060 (object)[
1061 'depends' => [
1062 (object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']],
1063 ],
1064 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a:hover, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a:hover, {{ULTP}} .ultp-taxonomy-layout-5 .ultp-taxonomy-item a:hover'
1065 ],
1066 ],
1067 ],
1068 'contentWrapPadding' => [
1069 'type' => 'object',
1070 'default' => (object)['lg' =>(object)['unit' =>'px']],
1071 'style' => [
1072 (object)[
1073 'depends' => [
1074 (object)['key'=>'layout','condition'=>'==','value'=>['1','4','5']],
1075 ],
1076 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-1 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-layout-4 .ultp-taxonomy-item a, {{ULTP}} .ultp-taxonomy-item a .ultp-taxonomy-lt5-content { padding: {{contentWrapPadding}}; }'
1077 ],
1078 ],
1079 ],
1080
1081 //--------------------------
1082 // Image Setting/Style
1083 //--------------------------
1084 'imgWidth' => [
1085 'type' => 'object',
1086 'default' => (object)['lg' =>'', 'ulg' =>'%'],
1087 'style' => [
1088 (object)[
1089 'depends' => [
1090 (object)['key'=>'layout','condition'=>'==','value'=>['4','5']],
1091 ],
1092 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-4 a img, {{ULTP}} .ultp-taxonomy-layout-5 a img { max-width: {{imgWidth}}; }'
1093 ],
1094 ],
1095 ],
1096 'imgHeight' => [
1097 'type' => 'object',
1098 'default' => (object)['lg' =>'', 'unit' =>'px'],
1099 'style' => [
1100 (object)[
1101 'depends' => [
1102 (object)['key'=>'layout','condition'=>'==','value'=>['4','5']],
1103 ],
1104 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-4 a img, {{ULTP}} .ultp-taxonomy-layout-5 a img {object-fit: cover; height: {{imgHeight}}; }'
1105 ],
1106 ],
1107 ],
1108 'imgSpacing' => [
1109 'type' => 'object',
1110 'default' => (object)['lg'=>''],
1111 'style' => [
1112 (object)[
1113 'depends' => [
1114 (object)['key'=>'layout','condition'=>'==','value'=>['4','5']],
1115 ],
1116 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-4 a img, {{ULTP}} .ultp-taxonomy-layout-5 a img { margin-bottom: {{imgSpacing}}px; }'
1117 ],
1118 ],
1119 ],
1120 'contentAlign' => [
1121 'type' => 'string',
1122 'default' => "center",
1123 'style' => [
1124 (object)[
1125 'depends' => [
1126 (object)['key'=>'contentAlign','condition'=>'==','value'=>'left'],
1127 ],
1128 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-5 li a, {{ULTP}} .ultp-taxonomy-layout-4 li a { text-align:{{contentAlign}}; } {{ULTP}} .ultp-taxonomy-layout-5 li a .ultp-taxonomy-lt5-content { justify-content: start; }'
1129 ],
1130 (object)[
1131 'depends' => [
1132 (object)['key'=>'contentAlign','condition'=>'==','value'=>'center'],
1133 ],
1134 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-5 li a, {{ULTP}} .ultp-taxonomy-layout-4 li a { text-align:{{contentAlign}}; } {{ULTP}} .ultp-taxonomy-layout-5 li a .ultp-taxonomy-lt5-content { justify-content: center; }'
1135 ],
1136 (object)[
1137 'depends' => [
1138 (object)['key'=>'contentAlign','condition'=>'==','value'=>'right'],
1139 ],
1140 'selector'=>'{{ULTP}} .ultp-taxonomy-layout-5 li a, {{ULTP}} .ultp-taxonomy-layout-4 li a { text-align:{{contentAlign}}; } {{ULTP}} .ultp-taxonomy-layout-5 li a .ultp-taxonomy-lt5-content { justify-content: end; }'
1141 ],
1142 ],
1143 ],
1144
1145 //--------------------------
1146 // Separator
1147 //--------------------------
1148 'separatorShow' => [
1149 'type' => 'boolean',
1150 'default' => false,
1151 'depends' => [
1152 (object)['key'=>'taxGridEn','condition'=>'!=','value'=>true],
1153 ],
1154 ],
1155 'septColor' => [
1156 'type' => 'string',
1157 'default' => '#e5e5e5',
1158 'style' => [
1159 (object)[
1160 'depends' => [
1161 (object)['key'=>'separatorShow','condition'=>'==','value'=>true],
1162 ],
1163 'selector'=>'{{ULTP}} .ultp-block-item:not(:last-of-type) { border-bottom-color:{{septColor}}; }'
1164 ],
1165 ],
1166 ],
1167 'septStyle' => [
1168 'type' => 'string',
1169 'default' => 'solid',
1170 'style' => [
1171 (object)[
1172 'depends' => [
1173 (object)['key'=>'separatorShow','condition'=>'==','value'=>true],
1174 ],
1175 'selector'=>'{{ULTP}} .ultp-block-item:not(:last-of-type) { border-bottom-style:{{septStyle}}; }'
1176 ],
1177 ],
1178 ],
1179 'septSize' => [
1180 'type' => 'string',
1181 'default' => (object)['lg'=>'1'],
1182 'style' => [
1183 (object)[
1184 'depends' => [
1185 (object)['key'=>'separatorShow','condition'=>'==','value'=>true],
1186 ],
1187 'selector'=>'{{ULTP}} .ultp-block-item:not(:last-of-type) { border-bottom-width: {{septSize}}px; }'
1188 ],
1189 ],
1190 ],
1191 'septSpace' => [
1192 'type' => 'object',
1193 'default' => (object)['lg'=>'5'],
1194 'style' => [
1195 (object)[
1196 'depends' => [
1197 (object)['key'=>'taxGridEn','condition'=>'!=','value'=>true],
1198 ],
1199 'selector'=>'{{ULTP}} .ultp-block-item:not(:last-of-type) { padding-bottom: {{septSpace}}px; } {{ULTP}} .ultp-block-item:not(:last-of-type) { margin-bottom: {{septSpace}}px; }'
1200 ],
1201 ],
1202 ],
1203
1204 //--------------------------
1205 // Custom Wrapper Style
1206 //--------------------------
1207 'customTaxColor' => [
1208 'type' => 'boolean',
1209 'default' => false,
1210 ],
1211 'seperatorTaxLink' => [
1212 'type' => 'string',
1213 'default' => admin_url( 'edit-tags.php?taxonomy=category' ),
1214 'style' => [
1215 (object)[
1216 'depends' => [
1217 (object)['key'=>'customTaxColor','condition'=>'==','value'=>true],
1218 ]
1219 ]
1220 ]
1221 ],
1222 'TaxAnimation' => [
1223 'type' => 'string',
1224 'default' => 'none'
1225 ],
1226
1227 'TaxWrapBg' => [
1228 'type' => 'string',
1229 'default' => '',
1230 'style' => [
1231 (object)[
1232 'depends' => [
1233 // (object)['key'=>'layout','condition'=>'==','value'=>[2, 3, 6, 7, 8]],
1234 (object)['key'=>'customTaxColor','condition'=>'!=','value'=>true],
1235 ],
1236 'selector'=>'{{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt2-overlay, {{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt3-overlay, {{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt6-overlay, {{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt7-overlay, {{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt8-overlay { background:{{TaxWrapBg}}; }'
1237 ],
1238 ],
1239 ],
1240 'TaxWrapHoverBg' => [
1241 'type' => 'string',
1242 'style' => [
1243 (object)[
1244 'depends' => [
1245 (object)['key'=>'layout','condition'=>'==','value'=>['2', '3', '6', '7', '8']],
1246 (object)['key'=>'customTaxColor','condition'=>'!=','value'=>true],
1247 ],
1248 'selector'=>'{{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt2-overlay, {{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt3-overlay, {{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt6-overlay, {{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt7-overlay, {{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt8-overlay { background:{{TaxWrapHoverBg}}; }'
1249 ],
1250 ],
1251 ],
1252 'TaxWrapBorder' => [
1253 'type' => 'object',
1254 'default' => (object)['openBorder'=>0, 'width' => (object)[ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid' ],
1255 'style' => [
1256 (object)[
1257 'depends' => [
1258 (object)['key'=>'layout','condition'=>'==','value'=>['2', '3', '6', '7', '8']],
1259 ],
1260 'selector'=>'{{ULTP}} .ultp-taxonomy-item a'
1261 ],
1262 ],
1263 ],
1264 'TaxWrapHoverBorder' => [
1265 'type' => 'object',
1266 'default' => (object)['openBorder'=>0, 'width' => (object)[ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid' ],
1267 'style' => [
1268 (object)[
1269 'depends' => [
1270 (object)['key'=>'layout','condition'=>'==','value'=>['2', '3', '6', '7', '8']],
1271 ],
1272 'selector'=>'{{ULTP}} .ultp-taxonomy-item a:hover'
1273 ],
1274 ],
1275 ],
1276 'TaxWrapShadow' => [
1277 'type' => 'object',
1278 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'],
1279 'style' => [
1280 (object)[
1281 'depends' => [
1282 (object)['key'=>'layout','condition'=>'==','value'=>['2', '3', '6', '7', '8']],
1283 ],
1284 'selector'=>'{{ULTP}} .ultp-taxonomy-item a'
1285 ],
1286 ],
1287 ],
1288 'TaxWrapHoverShadow' => [
1289 'type' => 'object',
1290 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'],
1291 'style' => [
1292 (object)[
1293 'depends' => [
1294 (object)['key'=>'layout','condition'=>'==','value'=>['2', '3', '6', '7', '8']],
1295 ],
1296 'selector'=>'{{ULTP}} .ultp-taxonomy-item a:hover'
1297 ],
1298 ],
1299 ],
1300 'TaxWrapRadius' => [
1301 'type' => 'object',
1302 'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'unit' =>'px']],
1303 'style' => [
1304 (object)[
1305 'depends' => [
1306 (object)['key'=>'layout','condition'=>'==','value'=>['2', '3', '6', '7', '8']],
1307 ],
1308 'selector'=>'{{ULTP}} .ultp-taxonomy-item a { border-radius: {{TaxWrapRadius}}; }'
1309 ],
1310 ],
1311 ],
1312 'TaxWrapHoverRadius' => [
1313 'type' => 'object',
1314 'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'unit' =>'px']],
1315 'style' => [
1316 (object)[
1317 'depends' => [
1318 (object)['key'=>'layout','condition'=>'==','value'=>['2', '3', '6', '7', '8']],
1319 ],
1320 'selector'=>'{{ULTP}} .ultp-taxonomy-item a:hover { border-radius: {{TaxWrapHoverRadius}}; }'
1321 ],
1322 ],
1323 ],
1324 'customOpacityTax' => [
1325 'type' => 'string',
1326 'default' => .6,
1327 'style' => [
1328 (object)[
1329 'selector'=>'{{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt2-overlay, {{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt3-overlay, {{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt6-overlay, {{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt7-overlay, {{ULTP}} .ultp-taxonomy-items li a .ultp-taxonomy-lt8-overlay { opacity: {{customOpacityTax}}; }'
1330 ],
1331 ],
1332 ],
1333 'customTaxOpacityHover' => [
1334 'type' => 'string',
1335 'default' => .9,
1336 'style' => [
1337 (object)[
1338 'selector'=>'{{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt2-overlay, {{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt3-overlay, {{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt6-overlay, {{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt7-overlay, {{ULTP}} .ultp-taxonomy-items li a:hover .ultp-taxonomy-lt8-overlay { opacity: {{customTaxOpacityHover}}; }'
1339 ],
1340 ],
1341 ],
1342 'TaxWrapPadding' => [
1343 'type' => 'object',
1344 'default' => (object)['lg' =>(object)[ 'unit' =>'px']],
1345 'style' => [
1346 (object)[
1347 'depends' => [
1348 (object)['key'=>'layout','condition'=>'==','value'=>['2', '3', '6', '7', '8']],
1349 ],
1350 'selector'=>'{{ULTP}} .ultp-taxonomy-item a { padding: {{TaxWrapPadding}}; }'
1351 ],
1352 ],
1353 ],
1354
1355
1356 //--------------------------
1357 // Wrapper Style
1358 //--------------------------
1359 'wrapBg' => [
1360 'type' => 'object',
1361 'default' => (object)['openColor' => 0, 'type' => 'color', 'color' => '#f5f5f5'],
1362 'style' => [
1363 (object)[
1364 'selector'=>'{{ULTP}} .ultp-block-wrapper'
1365 ],
1366 ],
1367 ],
1368 'wrapBorder' => [
1369 'type' => 'object',
1370 'default' => (object)['openBorder'=>0, 'width' =>(object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'],
1371 'style' => [
1372 (object)[
1373 'selector'=>'{{ULTP}} .ultp-block-wrapper'
1374 ],
1375 ],
1376 ],
1377 'wrapShadow' => [
1378 'type' => 'object',
1379 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'],
1380 'style' => [
1381 (object)[
1382 'selector'=>'{{ULTP}} .ultp-block-wrapper'
1383 ],
1384 ],
1385 ],
1386 'wrapRadius' => [
1387 'type' => 'object',
1388 'default' => (object)['lg' =>'', 'unit' =>'px'],
1389 'style' => [
1390 (object)[
1391 'selector'=>'{{ULTP}} .ultp-block-wrapper { border-radius:{{wrapRadius}}; }'
1392 ],
1393 ],
1394 ],
1395 'wrapHoverBackground' => [
1396 'type' => 'object',
1397 'default' => (object)['openColor' => 0, 'type' => 'color', 'color' => '#037fff'],
1398 'style' => [
1399 (object)[
1400 'selector'=>'{{ULTP}} .ultp-block-wrapper:hover'
1401 ],
1402 ],
1403 ],
1404 'wrapHoverBorder' => [
1405 'type' => 'object',
1406 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'],
1407 'style' => [
1408 (object)[
1409 'selector'=>'{{ULTP}} .ultp-block-wrapper:hover'
1410 ],
1411 ],
1412 ],
1413 'wrapHoverRadius' => [
1414 'type' => 'object',
1415 'default' => (object)['lg' =>'', 'unit' =>'px'],
1416 'style' => [
1417 (object)[
1418 'selector'=>'{{ULTP}} .ultp-block-wrapper:hover { border-radius:{{wrapHoverRadius}}; }'
1419 ],
1420 ],
1421 ],
1422 'wrapHoverShadow' => [
1423 'type' => 'object',
1424 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'],
1425 'style' => [
1426 (object)[
1427 'selector'=>'{{ULTP}} .ultp-block-wrapper:hover'
1428 ],
1429 ],
1430 ],
1431 'wrapMargin' => [
1432 'type' => 'object',
1433 'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'unit' =>'px']],
1434 'style' => [
1435 (object)[
1436 'selector'=>'{{ULTP}} .ultp-block-wrapper { margin:{{wrapMargin}}; }'
1437 ],
1438 ],
1439 ],
1440 'wrapOuterPadding' => [
1441 'type' => 'object',
1442 'default' => (object)['lg' =>(object)['top' => '','bottom' => '','left' => '', 'right' => '', 'unit' =>'px']],
1443 'style' => [
1444 (object)[
1445 'selector'=>'{{ULTP}} .ultp-block-wrapper { padding:{{wrapOuterPadding}}; }'
1446 ],
1447 ],
1448 ],
1449 'advanceId' => [
1450 'type' => 'string',
1451 'default' => '',
1452 ],
1453 'advanceZindex' => [
1454 'type' => 'string',
1455 'default' => '',
1456 'style' => [
1457 (object)[
1458 'selector' => '{{ULTP}} .ultp-block-wrapper{z-index:{{advanceZindex}};}'
1459 ],
1460 ],
1461 ],
1462 'hideExtraLarge' => [
1463 'type' => 'boolean',
1464 'default' => false,
1465 'style' => [
1466 (object)[
1467 'selector' => '{{ULTP}} {display:none;}'
1468 ],
1469 ],
1470 ],
1471 'hideTablet' => [
1472 'type' => 'boolean',
1473 'default' => false,
1474 'style' => [
1475 (object)[
1476 'selector' => '{{ULTP}} {display:none;}'
1477 ],
1478 ],
1479 ],
1480 'hideMobile' => [
1481 'type' => 'boolean',
1482 'default' => false,
1483 'style' => [
1484 (object)[
1485 'selector' => '{{ULTP}} {display:none;}'
1486 ],
1487 ],
1488 ],
1489 'advanceCss' => [
1490 'type' => 'string',
1491 'default' => '',
1492 'style' => [(object)['selector' => '']],
1493 ]
1494 );
1495
1496 if( $default ){
1497 $temp = array();
1498 foreach ($attributes as $key => $value) {
1499 if( isset($value['default']) ){
1500 $temp[$key] = $value['default'];
1501 }
1502 }
1503 return $temp;
1504 }else{
1505 return $attributes;
1506 }
1507 }
1508
1509 public function register() {
1510 register_block_type( 'ultimate-post/ultp-taxonomy',
1511 array(
1512 // 'title' => __('Taxonomy', 'ultimate-post'),
1513 'attributes' => $this->get_attributes(),
1514 'render_callback' => array($this, 'content')
1515 )
1516 );
1517 }
1518
1519 public function content($attr, $noAjax) {
1520
1521 if(!$noAjax){
1522 $paged = is_front_page() ? get_query_var('page') : get_query_var('paged');
1523 $attr['paged'] = $paged ? $paged : 1;
1524 }
1525
1526 $block_name = 'ultp-taxonomy';
1527 $wraper_before = $wraper_after = $post_loop = '';
1528
1529 $recent_posts = ultimate_post()->get_category_data( json_decode($attr['taxValue']), $attr['queryNumber'], $attr['taxType'], $attr['taxSlug'] );
1530
1531 if (!empty($recent_posts)) {
1532 $wraper_before .= '<div '.($attr['advanceId']?'id="'.$attr['advanceId'].'" ':'').' class="wp-block-ultimate-post-'.$block_name.' ultp-block-'.$attr["blockId"].' '.(isset($attr["class"])?$attr["class"]:'').'">';
1533 $wraper_before .= '<div class="ultp-block-wrapper">';
1534
1535 // Loading
1536 $wraper_before .= ultimate_post()->loading();
1537
1538 if ($attr['headingShow']) {
1539 $wraper_before .= '<div class="ultp-heading-filter">';
1540 $wraper_before .= '<div class="ultp-heading-filter-in">';
1541 // Heading
1542 include ULTP_PATH.'blocks/template/heading.php';
1543 $wraper_before .= '</div>';
1544 $wraper_before .= '</div>';
1545 }
1546 $wraper_before .= '<div class="ultp-block-items-wrap">';
1547 $idx = $noAjax ? 1 : 0;
1548
1549 $wraper_before .= '<ul class="ultp-taxonomy-items '.(isset($attr["TaxAnimation"])? ' ultp-taxonomy-animation-' .$attr["TaxAnimation"]:'').' ultp-taxonomy-column-'.json_decode(json_encode($attr['columns']), True)['lg'].' ultp-taxonomy-layout-'.$attr['layout'].'">';
1550 foreach ($recent_posts as $value) {
1551 $_style = ( ($attr["customTaxColor"] && $value['color']) ? ' style="background-color:'.$value['color'].';"' : '');
1552 $_style_color = ((in_array($attr['layout'], [1,4,5]) && $value['color'] && $attr["customTaxTitleColor"] ) ? ' style="color:'.$value['color'].';"' : '');
1553 $_style_title_bg = ((in_array($attr['layout'], [7,8]) && $value['color'] && $attr["customTaxTitleColor"] ) ? ' style="background:'.$value['color'].';"' : '');
1554
1555 $post_loop .= '<li class="ultp-block-item ultp-taxonomy-item">';
1556
1557 $style = in_array($attr['layout'], [2,3,6,7,8]) ? 'style="'.($value['image'] ? 'background-image: url('.$value['image'].')' : 'background-color:'.$value['color']).'"' : '';
1558 $name = ($attr['titleShow'] && $value['name']) ? '<span class="ultp-taxonomy-name" '.$_style_color.'>'.$value['name'].'</span>' : '';
1559 $count = ($attr['countShow'] && $value['count']) ? '<span class="ultp-taxonomy-count" '.$_style_color.'>'.$value['count'].'</span>' : '';
1560 $excerpt = ($attr['excerptShow'] && $value['desc']) ? '<div class="ultp-taxonomy-desc">'.$value['desc'].'</div>' : '';
1561
1562 $post_loop .= '<a href="'.$value['url'].'" '.($attr['layout'] != 3 ? $style : '').'>';
1563 switch ($attr['layout']) {
1564 case 1:
1565 $post_loop .= $name.$count.$excerpt;
1566 break;
1567 case 2:
1568 $post_loop .= '<div class="ultp-taxonomy-lt2-overlay"'.$_style.'></div><div class="ultp-taxonomy-lt2-content">'.$name.'<span class="ultp-taxonomy-bar"></span>'.$count.'</div>'.$excerpt;
1569 break;
1570 case 3:
1571 $post_loop .= '<div class="ultp-taxonomy-lt3-img" '.$style.'></div><div class="ultp-taxonomy-lt3-overlay"'.$_style.'></div><div class="ultp-taxonomy-lt3-content">'.$name.'<span class="ultp-taxonomy-bar"></span>'.$count.'</div>'.$excerpt;
1572 break;
1573 case 4:
1574 $img = $value['image'] ? '<img src="'.$value['image'].'" alt="'.$value['name'].'"/>' : '';
1575 $post_loop .= $img.'<div class="ultp-taxonomy-lt4-content">'.$name.$count.'</div>'.$excerpt;
1576 break;
1577 case 5:
1578 $img = $value['image'] ? '<img src="'.$value['image'].'" alt="'.$value['name'].'"/>' : '';
1579 $post_loop .= $img.'<span class="ultp-taxonomy-lt5-content">'.$name.$count.$excerpt.'</span>';
1580 break;
1581 case 6:
1582 $post_loop .= '<div class="ultp-taxonomy-lt6-overlay"'.$_style.'></div>'.$name.$count.$excerpt;
1583 break;
1584 case 7:
1585 $post_loop .= '<div class="ultp-taxonomy-lt7-overlay"'.$_style.'></div><span class="ultp-taxonomy-name" '.$_style_title_bg.'>'.$value['name'].$count.'</span>'.$excerpt;
1586 break;
1587 case 8:
1588 $post_loop .= '<div class="ultp-taxonomy-lt8-overlay"'.$_style.'></div><span class="ultp-taxonomy-name" '.$_style_title_bg.'>'.$value['name'].$count.'</span>'.$excerpt;
1589 break;
1590 default:
1591 # code...
1592 break;
1593 }
1594 $post_loop .= '</a>';
1595 $post_loop .= '</li>';
1596 $idx ++;
1597 }
1598 $wraper_after .= '</ul>';
1599 $wraper_after .= '</div>';//ultp-block-items-wrap
1600 $wraper_after .= '</div>';
1601 $wraper_after .= '</div>';
1602 wp_reset_query();
1603 }
1604
1605 return $noAjax ? $post_loop : $wraper_before.$post_loop.$wraper_after;
1606 }
1607
1608 }