PluginProbe
Post Grid Gutenberg Blocks – PostX / 2.5.6
Post Grid Gutenberg Blocks – PostX v2.5.6
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.5.6, at blocks/Taxonomy.php

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