PluginProbe
Post Grid Gutenberg Blocks – PostX / 5.0.41
Post Grid Gutenberg Blocks – PostX v5.0.41
5.0.41 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 All 238 releases
← All changes | blocks/Taxonomy.php +155 -2283 2.1.15.0.41 View file →
@@ -1,2308 +1,180 @@
1 1 <?php
2 2 namespace ULTP\blocks;
3 3
4 -defined('ABSPATH') || exit;
4 +defined( 'ABSPATH' ) || exit;
5 5
6 -class Taxonomy{
7 - public function __construct() {
8 - add_action('init', array($this, 'register'));
9 - }
10 - public function get_attributes($default = false){
6 +class Taxonomy {
11 7
12 - $attributes = array(
13 - 'blockId' => [
14 - 'type' => 'string',
15 - 'default' => '',
16 - ],
17 - //--------------------------
18 - // Query Setting
19 - //--------------------------
20 - 'queryQuick' => [
21 - 'type' => 'string',
22 - 'default' =>'',
23 - ],
24 - 'queryNumber' => [
25 - 'type' => 'string',
26 - 'default' =>5,
27 - ],
28 - 'queryType' => [
29 - 'type' => 'string',
30 - 'default' => 'post'
31 - ],
32 - 'queryTax' => [
33 - 'type' => 'string',
34 - 'default' => 'category'
35 - ],
36 - 'queryCat' => [
37 - 'type' => 'string',
38 - 'default' => '[]',
39 - 'style' => [
40 - (object)[
41 - 'depends' => [(object)['key' => 'queryTax','condition' => '==','value' => 'category']]
42 - ],
43 - ],
44 - ],
45 - 'queryTag' => [
46 - 'type' => 'string',
47 - 'default' => '[]',
48 - 'style' => [
49 - (object)[
50 - 'depends' => [(object)['key' => 'queryTax','condition' => '==','value' => 'post_tag']]
51 - ],
52 - ],
53 - ],
54 - 'queryOrderBy' => [
55 - 'type' => 'string',
56 - 'default' => 'date',
57 - ],
58 - 'metaKey' => [
59 - 'type' => 'string',
60 - 'default' => 'custom_meta_key',
61 - 'style' => [
62 - (object)[
63 - 'depends' => [(object)['key' => 'queryOrderBy','condition' => '==','value' => 'meta_value_num']]
64 - ],
65 - ],
66 - ],
67 - 'queryOrder' => [
68 - 'type' => 'string',
69 - 'default' => 'desc',
70 - ],
71 - 'queryInclude' => [
72 - 'type' => 'string',
73 - 'default' => ''
74 - ],
75 - 'queryExclude' => [
76 - 'type' => 'string',
77 - 'default' => ''
78 - ],
79 - 'queryOffset' => [
80 - 'type' => 'string',
81 - 'default' => '0',
82 - ],
83 - //--------------------------
84 - // General Setting
85 - //--------------------------
86 - 'columns' => [
87 - 'type' => 'object',
88 - 'default' => (object)['lg' =>'2'],
89 - 'style' => [
90 - (object)[
91 - 'selector'=>'{{ULTP}} .ultp-block-row { grid-template-columns: repeat({{columns}}, 1fr); }'
92 - ],
93 - ],
94 - ],
95 - 'columnGridGap' => [
96 - 'type' => 'object',
97 - 'default' => (object)['lg' =>'30', 'unit' =>'px'],
98 - 'style' => [
99 - (object)[
100 - 'selector'=>'{{ULTP}} .ultp-block-row { grid-gap: {{columnGridGap}}; }'
101 - ],
102 - ],
103 - ],
104 - 'titleShow' => [
105 - 'type' => 'boolean',
106 - 'default' => true,
107 - ],
108 - 'headingShow' => [
109 - 'type' => 'boolean',
110 - 'default' => true,
111 - ],
112 - 'excerptShow' => [
113 - 'type' => 'boolean',
114 - 'default' => true
115 - ],
116 - 'catShow' => [
117 - 'type' => 'boolean',
118 - 'default' => true,
119 - ],
120 - 'metaShow' => [
121 - 'type' => 'boolean',
122 - 'default' => true,
123 - ],
124 - 'showImage' => [
125 - 'type' => 'boolean',
126 - 'default' => true,
127 - ],
128 - 'filterShow' => [
129 - 'type' => 'boolean',
130 - 'default' => false,
131 - ],
132 - 'paginationShow' => [
133 - 'type' => 'boolean',
134 - 'default' => true,
135 - ],
136 - 'readMore' => [
137 - 'type' => 'boolean',
138 - 'default' => false,
139 - ],
140 - 'openInTab' => [
141 - 'type' => 'boolean',
142 - 'default' => false,
143 - ],
8 + public function __construct() {
9 + add_action( 'init', array( $this, 'register' ) );
10 + }
144 11
12 + public function get_attributes() {
13 + return array(
14 + 'blockId' => '',
15 + 'previewImg' => '',
16 + // Layout
17 + 'layout' => '1',
18 + // Query Setting
19 + 'taxType' => 'regular',
20 + 'taxSlug' => 'category',
21 + 'taxValue' => '[]',
22 + 'queryNumber' => 6,
23 + // General Setting
24 + 'taxGridEn' => true,
25 + 'columns' => (object) array( 'lg' => '1' ),
26 + 'rowGap' => (object) array(
27 + 'lg' => '20',
28 + 'unit' => 'px',
29 + ),
30 + 'titleShow' => true,
31 + 'headingShow' => true,
32 + 'excerptShow' => false,
33 + 'countShow' => true,
34 + 'openInTab' => false,
35 + 'notFoundMessage' => 'No Taxonomy Found.',
145 36
146 - //--------------------------
147 - // Heading Setting/Style
148 - //--------------------------
149 - 'headingText' => [
150 - 'type' => 'string',
151 - 'default' => 'Post Taxonomy',
152 - ],
153 - 'headingURL' => [
154 - 'type' => 'string',
155 - 'default' => '',
156 - ],
157 - 'headingBtnText' => [
158 - 'type' => 'string',
159 - 'default' => 'View More',
160 - 'style' => [
161 - (object)[
162 - 'depends' => [
163 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style11'],
164 - ],
165 - ],
166 - ],
167 - ],
168 - 'headingStyle' => [
169 - 'type' => 'string',
170 - 'default' => 'style9',
171 - ],
172 - 'headingTag' => [
173 - 'type' => 'string',
174 - 'default' => 'h2',
175 - ],
176 - 'headingAlign' => [
177 - 'type' => 'string',
178 - 'default' => 'left',
179 - 'style' => [(object)['selector' => '{{ULTP}} .ultp-heading-inner, {{ULTP}} .ultp-sub-heading-inner{ text-align:{{headingAlign}}; }']]
180 - ],
181 - 'headingTypo' => [
182 - 'type' => 'object',
183 - 'default' => (object)['openTypography' => 1,'size' => (object)['lg' => '20', 'unit' => 'px'], 'height' => (object)['lg' => '', 'unit' => 'px'],'decoration' => 'none', 'transform' => 'uppercase', 'family'=>'','weight'=>'700'],
184 - 'style' => [(object)['selector' => '{{ULTP}} .ultp-heading-wrap .ultp-heading-inner']]
185 - ],
186 - 'headingColor' => [
187 - 'type' => 'string',
188 - 'default' => '#0e1523',
189 - 'style' => [(object)['selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { color:{{headingColor}}; }']],
190 - ],
191 - 'headingBorderBottomColor' => [
192 - 'type' => 'string',
193 - 'default' => '#0e1523',
194 - 'style' => [
195 - (object)[
196 - 'depends' => [
197 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'],
198 - ],
199 - 'selector'=>'{{ULTP}} .ultp-heading-inner { border-bottom-color:{{headingBorderBottomColor}}; }'
200 - ],
201 - (object)[
202 - 'depends' => [
203 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style4'],
204 - ],
205 - 'selector'=>'{{ULTP}} .ultp-heading-inner { border-color:{{headingBorderBottomColor}}; }'
206 - ],
207 - (object)[
208 - 'depends' => [
209 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style6'],
210 - ],
211 - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { background-color: {{headingBorderBottomColor}}; }'
212 - ],
213 - (object)[
214 - 'depends' => [
215 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style7'],
216 - ],
217 - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { background-color: {{headingBorderBottomColor}}; }'
218 - ],
219 - (object)[
220 - 'depends' => [
221 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style8'],
222 - ],
223 - 'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor}}; }'
224 - ],
225 - (object)[
226 - 'depends' => [
227 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style9'],
228 - ],
229 - 'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor}}; }'
230 - ],
231 - (object)[
232 - 'depends' => [
233 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style10'],
234 - ],
235 - 'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor}}; }'
236 - ],
237 - (object)[
238 - 'depends' => [
239 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'],
240 - ],
241 - 'selector'=>'{{ULTP}} .ultp-heading-inner { border-color:{{headingBorderBottomColor}}; }'
242 - ],
243 - (object)[
244 - 'depends' => [
245 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style14'],
246 - ],
247 - 'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor}}; }'
248 - ],
249 - (object)[
250 - 'depends' => [
251 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style15'],
252 - ],
253 - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { background-color:{{headingBorderBottomColor}}; }'
254 - ],
255 - (object)[
256 - 'depends' => [
257 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style16'],
258 - ],
259 - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { background-color:{{headingBorderBottomColor}}; }'
260 - ],
261 - (object)[
262 - 'depends' => [
263 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style17'],
264 - ],
265 - 'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor}}; }'
266 - ],
267 - (object)[
268 - 'depends' => [
269 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'],
270 - ],
271 - 'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor}}; }'
272 - ],
273 - (object)[
274 - 'depends' => [
275 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style19'],
276 - ],
277 - 'selector'=>'{{ULTP}} .ultp-heading-inner:before { border-color:{{headingBorderBottomColor}}; }'
278 - ],
279 - ],
280 - ],
281 - 'headingBorderBottomColor2' => [
282 - 'type' => 'string',
283 - 'default' => '#e5e5e5',
284 - 'style' => [
285 - (object)[
286 - 'depends' => [
287 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style8'],
288 - ],
289 - 'selector'=>'{{ULTP}} .ultp-heading-inner:before { background-color:{{headingBorderBottomColor2}}; }'
290 - ],
291 - (object)[
292 - 'depends' => [
293 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style10'],
294 - ],
295 - 'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor2}}; }'
296 - ],
297 - (object)[
298 - 'depends' => [
299 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style14'],
300 - ],
301 - 'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor2}}; }'
302 - ],
303 - (object)[
304 - 'depends' => [
305 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style19'],
306 - ],
307 - 'selector'=>'{{ULTP}} .ultp-heading-inner:after { background-color:{{headingBorderBottomColor2}}; }'
308 - ],
309 - ],
310 - ],
311 - 'headingBg' => [
312 - 'type' => 'string',
313 - 'default' => '#1740f5',
314 - 'style' => [
315 - (object)[
316 - 'depends' => [
317 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style5'],
318 - ],
319 - 'selector'=>'{{ULTP}} .ultp-heading-style5 .ultp-heading-inner span:before { border-color:{{headingBg}} transparent transparent; } {{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }'
320 - ],
321 - (object)[
322 - 'depends' => [
323 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style2'],
324 - ],
325 - 'selector'=>'{{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }'
326 - ],
327 - (object)[
328 - 'depends' => [
329 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'],
330 - ],
331 - 'selector'=>'{{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }'
332 - ],
333 - (object)[
334 - 'depends' => [
335 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style12'],
336 - ],
337 - 'selector'=>'{{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }'
338 - ],
339 - (object)[
340 - 'depends' => [
341 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'],
342 - ],
343 - 'selector'=>'{{ULTP}} .ultp-heading-inner span { background-color:{{headingBg}}; }'
344 - ],
345 - (object)[
346 - 'depends' => [
347 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'],
348 - ],
349 - 'selector'=>'{{ULTP}} .ultp-heading-inner { background-color:{{headingBg}}; }'
350 - ],
351 - (object)[
352 - 'depends' => [
353 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style20'],
354 - ],
355 - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { border-color:{{headingBg}} transparent transparent; } {{ULTP}} .ultp-heading-inner { background-color:{{headingBg}}; }'
356 - ],
357 - ],
358 - ],
359 - 'headingBg2' => [
360 - 'type' => 'string',
361 - 'default' => '#e5e5e5',
362 - 'style' => [
363 - (object)[
364 - 'depends' => [
365 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style12'],
366 - ],
367 - 'selector'=>'{{ULTP}} .ultp-heading-inner { background-color:{{headingBg2}}; }'
368 - ],
369 - ],
370 - ],
371 - 'headingBtnTypo' => [
372 - 'type' => 'object',
373 - 'default' => (object)['openTypography' => 1,'size' => (object)['lg' => '14', 'unit' => 'px'], 'height' => (object)['lg' => '', 'unit' => 'px'],'decoration' => 'none','family'=>''],
374 - 'style' => [
375 - (object)[
376 - 'depends' => [
377 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style11'],
378 - ],
379 - 'selector'=>'{{ULTP}} .ultp-block-wrapper .ultp-heading-wrap .ultp-heading-btn'
380 - ],
381 - ],
382 - ],
383 - 'headingBtnColor' => [
384 - 'type' => 'string',
385 - 'default' => '#1740f5',
386 - 'style' => [
387 - (object)[
388 - 'depends' => [
389 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style11'],
390 - ],
391 - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-btn { color:{{headingBtnColor}}; } {{ULTP}} .ultp-heading-wrap .ultp-heading-btn svg { fill:{{headingBtnColor}}; }'
392 - ],
393 - ],
394 - ],
395 - 'headingBtnHoverColor' => [
396 - 'type' => 'string',
397 - 'default' => '#0a31da',
398 - 'style' => [
399 - (object)[
400 - 'depends' => [
401 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style11'],
402 - ],
403 - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-btn:hover { color:{{headingBtnHoverColor}}; } {{ULTP}} .ultp-heading-wrap .ultp-heading-btn:hover svg { fill:{{headingBtnHoverColor}}; }'
404 - ],
405 - ],
406 - ],
407 -
408 - 'headingBorder' => [
409 - 'type' => 'string',
410 - 'default' => '3',
411 - 'style' => [
412 - (object)[
413 - 'depends' => [
414 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'],
415 - ],
416 - 'selector'=>'{{ULTP}} .ultp-heading-inner { border-bottom-width:{{headingBorder}}px; }'
417 - ],
418 - (object)[
419 - 'depends' => [
420 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style4'],
421 - ],
422 - 'selector'=>'{{ULTP}} .ultp-heading-inner { border-width:{{headingBorder}}px; }'
423 - ],
424 - (object)[
425 - 'depends' => [
426 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style6'],
427 - ],
428 - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { width:{{headingBorder}}px; }'
429 - ],
430 - (object)[
431 - 'depends' => [
432 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style7'],
433 - ],
434 - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { height:{{headingBorder}}px; }'
435 - ],
436 - (object)[
437 - 'depends' => [
438 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style8'],
439 - ],
440 - 'selector'=>'{{ULTP}} .ultp-heading-inner:before, {{ULTP}} .ultp-heading-inner:after { height:{{headingBorder}}px; }'
441 - ],
442 - (object)[
443 - 'depends' => [
444 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style9'],
445 - ],
446 - 'selector'=>'{{ULTP}} .ultp-heading-inner:before { height:{{headingBorder}}px; }'
447 - ],
448 - (object)[
449 - 'depends' => [
450 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style10'],
451 - ],
452 - 'selector'=>'{{ULTP}} .ultp-heading-inner:before, {{ULTP}} .ultp-heading-inner:after { height:{{headingBorder}}px; }'
453 - ],
454 - (object)[
455 - 'depends' => [
456 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'],
457 - ],
458 - 'selector'=>'{{ULTP}} .ultp-heading-inner { border-width:{{headingBorder}}px; }'
459 - ],
460 - (object)[
461 - 'depends' => [
462 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style14'],
463 - ],
464 - 'selector'=>'{{ULTP}} .ultp-heading-inner:before, {{ULTP}} .ultp-heading-inner:after { height:{{headingBorder}}px; }'
465 - ],
466 - (object)[
467 - 'depends' => [
468 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style15'],
469 - ],
470 - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { height:{{headingBorder}}px; }'
471 - ],
472 - (object)[
473 - 'depends' => [
474 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style16'],
475 - ],
476 - 'selector'=>'{{ULTP}} .ultp-heading-inner span:before { height:{{headingBorder}}px; }'
477 - ],
478 - (object)[
479 - 'depends' => [
480 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style17'],
481 - ],
482 - 'selector'=>'{{ULTP}} .ultp-heading-inner:before { height:{{headingBorder}}px; }'
483 - ],
484 - (object)[
485 - 'depends' => [
486 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style19'],
487 - ],
488 - 'selector'=>'{{ULTP}} .ultp-heading-inner:after { width:{{headingBorder}}px; }'
489 - ],
490 - (object)[
491 - 'depends' => [
492 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'],
493 - ],
494 - 'selector'=>'{{ULTP}} .ultp-heading-inner:after { width:{{headingBorder}}px; }'
495 - ],
496 - ],
497 - ],
498 - 'headingSpacing' => [
499 - 'type' => 'object',
500 - 'default' => (object)['lg'=>30, 'sm'=>10, 'unit'=>'px'],
501 - 'style' => [(object)['selector'=>'{{ULTP}} .ultp-heading-wrap {margin-top:0; margin-bottom:{{headingSpacing}}; }']]
502 - ],
503 - 'headingPadding' => [
504 - 'type' => 'object',
505 - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '','left' => '', 'right' => '', 'unit' =>'px']],
506 - 'style' => [
507 - (object)[
508 - 'depends' => [
509 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style2'],
510 - ],
511 - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
512 - ],
513 - (object)[
514 - 'depends' => [
515 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style3'],
516 - ],
517 - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
518 - ],
519 - (object)[
520 - 'depends' => [
521 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style4'],
522 - ],
523 - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
524 - ],
525 - (object)[
526 - 'depends' => [
527 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style5'],
528 - ],
529 - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
530 - ],
531 - (object)[
532 - 'depends' => [
533 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style6'],
534 - ],
535 - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
536 - ],
537 - (object)[
538 - 'depends' => [
539 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style12'],
540 - ],
541 - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
542 - ],
543 - (object)[
544 - 'depends' => [
545 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style13'],
546 - ],
547 - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
548 - ],
549 - (object)[
550 - 'depends' => [
551 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style18'],
552 - ],
553 - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
554 - ],
555 - (object)[
556 - 'depends' => [
557 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style19'],
558 - ],
559 - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
560 - ],
561 - (object)[
562 - 'depends' => [
563 - (object)['key'=>'headingStyle','condition'=>'==','value'=>'style20'],
564 - ],
565 - 'selector'=>'{{ULTP}} .ultp-heading-wrap .ultp-heading-inner span { padding:{{headingPadding}}; }'
566 - ],
567 - ]
568 - ],
569 - 'subHeadingShow' => [
570 - 'type' => 'boolean',
571 - 'default' => false,
572 - ],
573 - 'subHeadingText' => [
574 - 'type' => 'string',
575 - 'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ut sem augue. Sed at felis ut enim dignissim sodales.',
576 - 'style' => [
577 - (object)[
578 - 'depends' => [
579 - (object)['key'=>'subHeadingShow','condition'=>'==','value'=>true],
580 - ],
581 - ],
582 - ],
583 - ],
584 - 'subHeadingTypo' => [
585 - 'type' => 'object',
586 - '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' => 'capitalize','family'=>'','weight'=>'500'],
587 - 'style' => [
588 - (object)[
589 - 'depends' => [
590 - (object)['key'=>'subHeadingShow','condition'=>'==','value'=>true],
591 - ],
592 - 'selector'=>'{{ULTP}} .ultp-sub-heading div'
593 - ],
594 - ],
595 - ],
596 - 'subHeadingColor' => [
597 - 'type' => 'string',
598 - 'default' => '#989898',
599 - 'style' => [
600 - (object)[
601 - 'depends' => [
602 - (object)['key'=>'subHeadingShow','condition'=>'==','value'=>true],
603 - ],
604 - 'selector'=>'{{ULTP}} .ultp-sub-heading div{ color:{{subHeadingColor}}; }'
605 - ],
606 - ],
607 - ],
608 - 'subHeadingSpacing' => [
609 - 'type' => 'object',
610 - 'default' => (object)['lg' =>(object)['unit' =>'px']],
611 - 'style' => [
612 - (object)[
613 - 'depends' => [
614 - (object)['key'=>'subHeadingShow','condition'=>'==','value'=>true],
615 - ],
616 - 'selector'=>'{{ULTP}} div.ultp-sub-heading-inner{ margin:{{subHeadingSpacing}}; }'
617 - ],
618 - ],
619 - ],
37 + // Heading Setting/Style
38 + 'headingText' => 'Post Taxonomy',
39 + 'headingURL' => '',
40 + 'headingBtnText' => 'View More',
41 + 'headingStyle' => 'style9',
42 + 'headingTag' => 'h2',
43 + 'headingAlign' => 'left',
44 + 'subHeadingShow' => false,
45 + 'subHeadingText' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ut sem augue. Sed at felis ut enim dignissim sodales.',
46 + 'titleTag' => 'span',
47 + 'contentTitleAlign' => 'left',
48 + 'titlePosition' => true,
49 + 'customTaxTitleColor' => false,
50 + 'seperatorTaxTitleLink' => admin_url( 'edit-tags.php?taxonomy=category' ),
620 51
621 - //--------------------------
622 - // Title Setting/Style
623 - //--------------------------
624 - 'titleTag' => [
625 - 'type' => 'string',
626 - 'default' => 'h3',
627 - ],
628 - 'titlePosition' => [
629 - 'type' => 'boolean',
630 - 'default' => true,
631 - ],
632 - 'titleColor' => [
633 - 'type' => 'string',
634 - 'default' => '#0e1523',
635 - 'style' => [
636 - (object)[
637 - 'depends' => [
638 - (object)['key'=>'titleShow','condition'=>'==','value'=>true],
639 - ],
640 - 'selector'=>'{{ULTP}} .ultp-block-content .ultp-block-title a { color:{{titleColor}}; }'
641 - ],
642 - ],
643 - ],
644 - 'titleHoverColor' => [
645 - 'type' => 'string',
646 - 'default' => '#828282',
647 - 'style' => [
648 - (object)[
649 - 'depends' => [
650 - (object)['key'=>'titleShow','condition'=>'==','value'=>true],
651 - ],
652 - 'selector'=>'{{ULTP}} .ultp-block-content .ultp-block-title a:hover { color:{{titleHoverColor}}; }'
653 - ],
654 - ],
655 - ],
656 - 'titleTypo' => [
657 - 'type' => 'object',
658 - 'default' => (object)['openTypography'=>1,'size'=>(object)['lg'=>'18', 'unit'=>'px'], 'spacing'=>(object)[ 'lg'=>'0.8', 'unit'=>'px'], 'height'=>(object)['lg'=>'26', 'unit'=>'px'],'transform' => 'uppercase', 'decoration'=>'none','family'=>'','weight'=>'500'],
659 - 'style' => [
660 - (object)[
661 - 'depends' => [
662 - (object)['key'=>'titleShow','condition'=>'==','value'=>true],
663 - ],
664 - 'selector'=>'{{ULTP}} .ultp-block-item .ultp-block-title, {{ULTP}} .ultp-block-item .ultp-block-title a'
665 - ],
666 - ],
667 - ],
668 - 'titlePadding' => [
669 - 'type' => 'object',
670 - 'default' => (object)['lg'=>(object)['top'=>10,'bottom'=>5, 'unit'=>'px']],
671 - 'style' => [
672 - (object)[
673 - 'depends' => [
674 - (object)['key'=>'titleShow','condition'=>'==','value'=>true],
675 - ],
676 - 'selector'=>'{{ULTP}} .ultp-block-content .ultp-block-title { padding:{{titlePadding}}; }'
677 - ],
678 - ],
679 - ],
52 + // Content Setting/Style
53 + 'excerptLimit' => 30,
680 54
681 - //--------------------------
682 - // Content Setting/Style
683 - //--------------------------
684 - 'excerptLimit' => [
685 - 'type' => 'string',
686 - 'default' => 30,
687 - ],
688 - 'excerptColor' => [
689 - 'type' => 'string',
690 - 'default' => '#777',
691 - 'style' => [
692 - (object)[
693 - 'depends' => [
694 - (object)['key'=>'excerptShow','condition'=>'==','value'=>true],
695 - ],
696 - 'selector'=>'{{ULTP}} .ultp-block-excerpt { color:{{excerptColor}}; }'
697 - ],
698 - ],
699 - ],
700 - 'excerptTypo' => [
701 - 'type' => 'object',
702 - 'default' => (object)['openTypography' => 1,'size' => (object)['lg' =>14, 'unit' =>'px'],'height' => (object)['lg' =>26, 'unit' =>'px'], 'decoration' => 'none','family'=>''],
703 - 'style' => [
704 - (object)[
705 - 'depends' => [
706 - (object)['key'=>'excerptShow','condition'=>'==','value'=>true],
707 - ],
708 - 'selector'=>'{{ULTP}} .ultp-block-excerpt'
709 - ],
710 - ],
711 - ],
712 - 'excerptPadding' => [
713 - 'type' => 'object',
714 - 'default' => (object)['lg' =>(object)['top' => 10,'bottom' => '', 'unit' =>'px']],
715 - 'style' => [
716 - (object)[
717 - 'depends' => [
718 - (object)['key'=>'excerptShow','condition'=>'==','value'=>true],
719 - ],
720 - 'selector'=>'{{ULTP}} .ultp-block-excerpt{ padding: {{excerptPadding}}; }'
721 - ],
722 - ],
723 - ],
55 + // Image Setting/Style
56 + 'imgCrop' => ( ultimate_post()->get_setting( 'disable_image_size' ) == 'yes' ? 'full' : 'ultp_layout_landscape' ),
724 57
725 - //--------------------------
726 - // Category Setting/Style
727 - //--------------------------
728 - 'catStyle' => [
729 - 'type' => 'string',
730 - 'default' => 'classic',
731 - ],
732 - 'catPosition' => [
733 - 'type' => 'string',
734 - 'default' => 'aboveTitle',
735 - ],
736 - 'customCatColor' => [
737 - 'type' => 'boolean',
738 - 'default' => false,
739 - ],
740 - 'seperatorLink' => [
741 - 'type' => 'string',
742 - 'default' => admin_url( 'edit-tags.php?taxonomy=category' ),
743 - 'style' => [
744 - (object)[
745 - 'depends' => [
746 - (object)['key'=>'customCatColor','condition'=>'==','value'=>true],
747 - ]
748 - ]
749 - ]
750 - ],
751 - 'onlyCatColor' => [
752 - 'type' => 'boolean',
753 - 'default' => false,
754 - 'style' => [
755 - (object)[
756 - 'depends' => [
757 - (object)['key'=>'customCatColor','condition'=>'==','value'=>true],
758 - ]
759 - ]
760 - ]
761 - ],
762 - 'catLineWidth' => [
763 - 'type' => 'object',
764 - 'default' => (object)['lg'=>'20'],
765 - 'style' => [
766 - (object)[
767 - 'depends' => [
768 - (object)['key'=>'catStyle','condition'=>'!=','value'=>'classic'],
769 - ],
770 - 'selector' => '{{ULTP}} .ultp-category-borderRight .ultp-category-in:before, {{ULTP}} .ultp-category-borderBoth .ultp-category-in:before, {{ULTP}} .ultp-category-borderBoth .ultp-category-in:after, {{ULTP}} .ultp-category-borderLeft .ultp-category-in:before { width:{{catLineWidth}}px; }'
771 - ],
772 - ]
773 - ],
774 - 'catLineSpacing' => [
775 - 'type' => 'object',
776 - 'default' => (object)['lg'=>'30'],
777 - 'style' => [
778 - (object)[
779 - 'depends' => [
780 - (object)['key'=>'catStyle','condition'=>'!=','value'=>'classic'],
781 - ],
782 - 'selector' => '{{ULTP}} .ultp-category-borderBoth .ultp-category-in { padding-left: {{catLineSpacing}}px; padding-right: {{catLineSpacing}}px; }
783 - {{ULTP}} .ultp-category-borderLeft .ultp-category-in { padding-left: {{catLineSpacing}}px; }
784 - {{ULTP}} .ultp-category-borderRight .ultp-category-in { padding-right:{{catLineSpacing}}px; }'
785 - ],
786 - ]
787 - ],
788 - 'catLineColor' => [
789 - 'type' => 'string',
790 - 'default' => '#1740f5',
791 - 'style' => [
792 - (object)[
793 - 'depends' => [
794 - (object)['key'=>'catStyle','condition'=>'!=','value'=>'classic'],
795 - ],
796 - 'selector' => '{{ULTP}} .ultp-category-borderRight .ultp-category-in:before, {{ULTP}} .ultp-category-borderLeft .ultp-category-in:before, {{ULTP}} .ultp-category-borderBoth .ultp-category-in:after, {{ULTP}} .ultp-category-borderBoth .ultp-category-in:before { background:{{catLineColor}}; }'
797 - ],
798 - ]
799 - ],
800 - 'catLineHoverColor' => [
801 - 'type' => 'string',
802 - 'default' => '#1740f5',
803 - 'style' => [
804 - (object)[
805 - 'depends' => [
806 - (object)['key'=>'catStyle','condition'=>'!=','value'=>'classic'],
807 - ],
808 - 'selector' => '{{ULTP}} .ultp-category-borderBoth:hover .ultp-category-in:before, {{ULTP}} .ultp-category-borderBoth:hover .ultp-category-in:after, {{ULTP}} .ultp-category-borderLeft:hover .ultp-category-in:before, {{ULTP}} .ultp-category-borderRight:hover .ultp-category-in:before { background:{{catLineHoverColor}}; }'
809 - ],
810 - ]
811 - ],
812 - 'catTypo' => [
813 - 'type' => 'object',
814 - 'default' => (object)['openTypography' => 1, 'size' => (object)['lg' =>20, 'unit' =>'px'], 'height' => (object)['lg' =>24, 'unit' =>'px'], 'spacing' => (object)['lg' =>1, 'unit' =>'px'], 'transform' => 'capitalize', 'weight' => '400', 'decoration' => 'none','family'=>'Dancing Script' ],
815 - 'style' => [
816 - (object)[
817 - 'depends' => [
818 - (object)['key'=>'catShow','condition'=>'==','value'=>true],
819 - ],
820 - 'selector'=>'{{ULTP}} .ultp-category-grid a'
821 - ],
822 - ],
823 - ],
824 - 'catColor' => [
825 - 'type' => 'string',
826 - 'default' => '#1740f5',
827 - 'style' => [
828 - (object)[
829 - 'depends' => [
830 - (object)['key'=>'catShow','condition'=>'==','value'=>true],
831 - (object)['key'=>'customCatColor','condition'=>'!=','value'=>true],
832 - ],
833 - 'selector'=>'{{ULTP}} .ultp-category-grid a { color:{{catColor}}; }'
834 - ],
835 - ],
836 - ],
837 - 'catBgColor' => [
838 - 'type' => 'object',
839 - 'default' => (object)['openColor' => 1,'type' => 'color', 'color' => ''],
840 - 'style' => [
841 - (object)[
842 - 'depends' => [
843 - (object)['key'=>'catShow','condition'=>'==','value'=>true],
844 - (object)['key'=>'customCatColor','condition'=>'!=','value'=>true],
845 - ],
846 - 'selector'=>'{{ULTP}} .ultp-category-grid a'
847 - ],
848 - ],
849 - ],
850 - 'catBorder' => [
851 - 'type' => 'object',
852 - 'default' => (object)['openBorder'=>0, 'width' => (object)[ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid' ],
853 - 'style' => [
854 - (object)[
855 - 'depends' => [
856 - (object)['key'=>'catShow','condition'=>'==','value'=>true],
857 - (object)['key'=>'onlyCatColor','condition'=>'!=','value'=>true],
858 - ],
859 - 'selector'=>'{{ULTP}} .ultp-category-grid a'
860 - ],
861 - ],
862 - ],
863 - 'catRadius' => [
864 - 'type' => 'object',
865 - 'default' => (object)['lg' =>'0', 'unit' =>'px'],
866 - 'style' => [
867 - (object)[
868 - 'depends' => [
869 - (object)['key'=>'catShow','condition'=>'==','value'=>true],
870 - (object)['key'=>'onlyCatColor','condition'=>'!=','value'=>true],
871 - ],
872 - 'selector'=>'{{ULTP}} .ultp-category-grid a { border-radius:{{catRadius}}; }'
873 - ],
874 - ],
875 - ],
876 - 'catHoverColor' => [
877 - 'type' => 'string',
878 - 'default' => '#828282',
879 - 'style' => [
880 - (object)[
881 - 'depends' => [
882 - (object)['key'=>'catShow','condition'=>'==','value'=>true],
883 - (object)['key'=>'customCatColor','condition'=>'!=','value'=>true],
884 - ],
885 - 'selector'=>'{{ULTP}} .ultp-category-grid a:hover { color:{{catHoverColor}}; }'
886 - ],
887 - ],
888 - ],
889 - 'catBgHoverColor' => [
890 - 'type' => 'object',
891 - 'default' => (object)['openColor' => 1, 'type' => 'color', 'color' => ''],
892 - 'style' => [
893 - (object)[
894 - 'depends' => [
895 - (object)['key'=>'catShow','condition'=>'==','value'=>true],
896 - (object)['key'=>'customCatColor','condition'=>'!=','value'=>true],
897 - ],
898 - 'selector'=>'{{ULTP}} .ultp-category-grid a:hover'
899 - ],
900 - ],
901 - ],
902 - 'catHoverBorder' => [
903 - 'type' => 'object',
904 - 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'],
905 - 'style' => [
906 - (object)[
907 - 'depends' => [
908 - (object)['key'=>'catShow','condition'=>'==','value'=>true],
909 - (object)['key'=>'onlyCatColor','condition'=>'!=','value'=>true],
910 - ],
911 - 'selector'=>'{{ULTP}} .ultp-category-grid a:hover'
912 - ],
913 - ],
914 - ],
915 - 'catSacing' => [
916 - 'type' => 'object',
917 - 'default' => (object)['lg' =>(object)['top' => 30,'bottom' => 5,'left' => 0,'right' => 0, 'unit' =>'px']],
918 - 'style' => [
919 - (object)[
920 - 'depends' => [
921 - (object)['key'=>'catShow','condition'=>'==','value'=>true],
922 - ],
923 - 'selector'=>'{{ULTP}} .ultp-category-grid { margin:{{catSacing}}; }'
924 - ],
925 - ],
926 - ],
927 - 'catPadding' => [
928 - 'type' => 'object',
929 - 'default' => (object)['lg' =>(object)['top' => "0",'bottom' => "0",'left' => "0",'right' => "0", 'unit' =>'px']],
930 - 'style' => [
931 - (object)[
932 - 'depends' => [
933 - (object)['key'=>'catShow','condition'=>'==','value'=>true],
934 - (object)['key'=>'onlyCatColor','condition'=>'!=','value'=>true],
935 - ],
936 - 'selector'=>'{{ULTP}} .ultp-category-grid a { padding:{{catPadding}}; }'
937 - ],
938 - ],
939 - ],
58 + // Separator
59 + 'separatorShow' => false,
940 60
941 - //--------------------------
942 - // Meta Setting/Style
943 - //--------------------------
944 - 'metaPosition' => [
945 - 'type' => 'string',
946 - 'default' => 'top',
947 - ],
948 - 'metaStyle' => [
949 - 'type' => 'string',
950 - 'default' => 'icon',
951 - ],
952 - 'metaSeparator' => [
953 - 'type' => 'string',
954 - 'default' => 'dot',
955 - ],
956 - 'metaList' => [
957 - 'type' => 'string',
958 - 'default' => '["metaAuthor","metaDate","metaRead"]',
959 - ],
960 - 'metaTypo' => [
961 - 'type' => 'object',
962 - 'default' => (object)['openTypography' => 1,'size' => (object)['lg' =>12, 'unit' =>'px'],'height' => (object)['lg' =>20, 'unit' =>'px'], 'transform' => 'capitalize', 'decoration' => 'none','family'=>''],
963 - 'style' => [
964 - (object)[
965 - 'depends' => [
966 - (object)['key'=>'metaShow','condition'=>'==','value'=>true],
967 - ],
968 - 'selector'=>'{{ULTP}} .ultp-block-meta span, {{ULTP}} .ultp-block-meta span a'
969 - ],
970 - ],
971 - ],
972 - 'metaColor' => [
973 - 'type' => 'string',
974 - 'default' => '#989898',
975 - 'style' => [
976 - (object)[
977 - 'depends' => [
978 - (object)['key'=>'metaShow','condition'=>'==','value'=>true],
979 - ],
980 - 'selector'=>'{{ULTP}} .ultp-block-meta span { color: {{metaColor}}; } {{ULTP}} .ultp-block-meta span svg { fill: {{metaColor}}; } {{ULTP}} .ultp-block-meta span a { color: {{metaColor}}; }{{ULTP}} .ultp-block-meta-dot span:after { background:{{metaColor}}; } {{ULTP}} .ultp-block-meta span:after { color:{{metaColor}}; }'
981 - ],
982 - ],
983 - ],
984 - 'metaHoverColor' => [
985 - 'type' => 'string',
986 - 'default' => '#000',
987 - 'style' => [
988 - (object)[
989 - 'depends' => [
990 - (object)['key'=>'metaShow','condition'=>'==','value'=>true],
991 - ],
992 - 'selector'=>'{{ULTP}} .ultp-block-meta span a:hover { color: {{metaHoverColor}}; }'
993 - ],
994 - ],
995 - ],
996 - 'metaSpacing' => [
997 - 'type' => 'object',
998 - 'default' => (object)['lg' =>'15', 'unit' =>'px'],
999 - 'style' => [
1000 - (object)[
1001 - 'depends' => [
1002 - (object)['key'=>'metaShow','condition'=>'==','value'=>true],
1003 - ],
1004 - 'selector'=>'{{ULTP}} .ultp-block-meta span { margin-right:{{metaSpacing}}; } {{ULTP}} .ultp-block-meta span { padding-left: {{metaSpacing}}; } .rtl {{ULTP}} .ultp-block-meta span {margin-right:0; margin-left:{{metaSpacing}}; } .rtl {{ULTP}} .ultp-block-meta span { padding-left:0; padding-right: {{metaSpacing}}; }'
1005 - ],
1006 - ],
1007 - ],
1008 - 'metaMargin' => [
1009 - 'type' => 'object',
1010 - 'default' => (object)['lg' =>(object)['top' => '5','bottom' => '', 'left'=>'','right'=>'', 'unit' =>'px']],
1011 - 'style' => [
1012 - (object)[
1013 - 'depends' => [
1014 - (object)['key'=>'metaShow','condition'=>'==','value'=>true],
1015 - ],
1016 - 'selector'=>'{{ULTP}} .ultp-block-meta { margin:{{metaMargin}}; }'
1017 - ],
1018 - ],
1019 - ],
1020 - 'metaPadding' => [
1021 - 'type' => 'object',
1022 - 'default' => (object)['lg' =>(object)['top' => '5','bottom' => '5', 'left'=>'','right'=>'', 'unit' =>'px']],
1023 - 'style' => [
1024 - (object)[
1025 - 'depends' => [
1026 - (object)['key'=>'metaShow','condition'=>'==','value'=>true],
1027 - ],
1028 - 'selector'=>'{{ULTP}} .ultp-block-meta { padding:{{metaPadding}}; }'
1029 - ],
1030 - ],
1031 - ],
1032 - 'metaBorder' => [
1033 - 'type' => 'object',
1034 - 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => '0', 'bottom' => '0', 'left' => '0'],'color' => '#009fd4','type' => 'solid'],
1035 - 'style' => [
1036 - (object)[
1037 - 'depends' => [
1038 - (object)['key'=>'metaShow','condition'=>'==','value'=>true],
1039 - ],
1040 - 'selector'=>'{{ULTP}} .ultp-block-meta'
1041 - ],
1042 - ],
1043 - ],
1044 - 'metaBg' => [
1045 - 'type' => 'string',
1046 - 'default' => '',
1047 - 'style' => [
1048 - (object)[
1049 - 'depends' => [
1050 - (object)['key'=>'metaShow','condition'=>'==','value'=>true],
1051 - ],
1052 - 'selector'=>'{{ULTP}} .ultp-block-meta { background:{{metaBg}}; }'
1053 - ],
1054 - ],
1055 - ],
61 + // Custom Wrapper Style
62 + 'customTaxColor' => false,
63 + 'seperatorTaxLink' => admin_url( 'edit-tags.php?taxonomy=category' ),
64 + 'TaxAnimation' => 'none',
65 + 'advanceId' => '',
66 + 'advanceZindex' => '',
67 + 'hideExtraLarge' => false,
68 + 'hideTablet' => false,
69 + 'hideMobile' => false,
70 + 'advanceCss' => '',
71 + );
72 + }
1056 73
74 + public function register() {
75 + register_block_type(
76 + 'ultimate-post/ultp-taxonomy',
77 + array(
78 + 'editor_script' => 'ultp-blocks-editor-script',
79 + 'editor_style' => 'ultp-blocks-editor-css',
80 + 'render_callback' => array( $this, 'content' ),
81 + )
82 + );
83 + }
1057 84
1058 - //--------------------------
1059 - // Inner Content Setting/Style
1060 - //--------------------------
1061 - 'contentAlign' => [
1062 - 'type' => 'string',
1063 - 'default' => "center",
1064 - 'style' => [
1065 - (object)[
1066 - 'depends' => [
1067 - (object)['key'=>'contentAlign','condition'=>'==','value'=>'left'],
1068 - ],
1069 - 'selector'=>'{{ULTP}} .ultp-block-content { text-align:{{contentAlign}}; } {{ULTP}} .ultp-block-meta {justify-content: flex-start;}'
1070 - ],
1071 - (object)[
1072 - 'depends' => [
1073 - (object)['key'=>'contentAlign','condition'=>'==','value'=>'center'],
1074 - ],
1075 - 'selector'=>'{{ULTP}} .ultp-block-content { text-align:{{contentAlign}}; } {{ULTP}} .ultp-block-meta {justify-content: center;}'
1076 - ],
1077 - (object)[
1078 - 'depends' => [
1079 - (object)['key'=>'contentAlign','condition'=>'==','value'=>'right'],
1080 - ],
1081 - 'selector'=>'{{ULTP}} .ultp-block-content { text-align:{{contentAlign}}; } {{ULTP}} .ultp-block-meta {justify-content: flex-end;}'
1082 - ],
1083 - ],
1084 - ],
1085 - 'contentWrapBg' => [
1086 - 'type' => 'string',
1087 - 'default' => '',
1088 - 'style' => [
1089 - (object)[
1090 - 'selector'=>'{{ULTP}} .ultp-block-content-wrap { background:{{contentWrapBg}}; }'
1091 - ],
1092 - ],
1093 - ],
1094 - 'contentWrapHoverBg' => [
1095 - 'type' => 'string',
1096 - 'style' => [
1097 - (object)[
1098 - 'selector'=>'{{ULTP}} .ultp-block-content-wrap:hover { background:{{contentWrapHoverBg}}; }'
1099 - ],
1100 - ],
1101 - ],
1102 - 'contentWrapBorder' => [
1103 - 'type' => 'object',
1104 - 'default' => (object)['openBorder'=>0, 'width' => (object)[ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid' ],
1105 - 'style' => [
1106 - (object)[
1107 - 'selector'=>'{{ULTP}} .ultp-block-content-wrap'
1108 - ],
1109 - ],
1110 - ],
1111 - 'contentWrapHoverBorder' => [
1112 - 'type' => 'object',
1113 - 'default' => (object)['openBorder'=>0, 'width' => (object)[ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid' ],
1114 - 'style' => [
1115 - (object)[
1116 - 'selector'=>'{{ULTP}} .ultp-block-content-wrap:hover'
1117 - ],
1118 - ],
1119 - ],
1120 - 'contentWrapRadius' => [
1121 - 'type' => 'object',
1122 - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'unit' =>'px']],
1123 - 'style' => [
1124 - (object)[
1125 - 'selector'=>'{{ULTP}} .ultp-block-content-wrap { border-radius: {{contentWrapRadius}}; }'
1126 - ],
1127 - ],
1128 - ],
1129 - 'contentWrapHoverRadius' => [
1130 - 'type' => 'object',
1131 - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'unit' =>'px']],
1132 - 'style' => [
1133 - (object)[
1134 - 'selector'=>'{{ULTP}} .ultp-block-content-wrap:hover { border-radius: {{contentWrapHoverRadius}}; }'
1135 - ],
1136 - ],
1137 - ],
1138 - 'contentWrapShadow' => [
1139 - 'type' => 'object',
1140 - 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'],
1141 - 'style' => [
1142 - (object)[
1143 - 'selector'=>'{{ULTP}} .ultp-block-content-wrap'
1144 - ],
1145 - ],
1146 - ],
1147 - 'contentWrapHoverShadow' => [
1148 - 'type' => 'object',
1149 - 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'],
1150 - 'style' => [
1151 - (object)[
1152 - 'selector'=>'{{ULTP}} .ultp-block-content-wrap:hover'
1153 - ],
1154 - ],
1155 - ],
85 + public function content( $attr, $noAjax ) {
86 + $attr = wp_parse_args( $attr, $this->get_attributes() );
1156 87
1157 - 'contentWrapInnerPadding' => [
1158 - 'type' => 'object',
1159 - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'left'=>'','right'=>'', 'unit' =>'px']],
1160 - 'style' => [
1161 - (object)[
1162 - 'selector'=>'{{ULTP}} .ultp-block-content { padding: {{contentWrapInnerPadding}}; }'
1163 - ],
1164 - ],
1165 - ],
1166 - 'contentWrapPadding' => [
1167 - 'type' => 'object',
1168 - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'left'=>'','right'=>'', 'unit' =>'px']],
1169 - 'style' => [
1170 - (object)[
1171 - 'selector'=>'{{ULTP}} .ultp-block-content-wrap { padding: {{contentWrapPadding}}; }'
1172 - ],
1173 - ],
1174 - ],
88 + if ( ! $noAjax ) {
89 + $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' );
90 + $attr['paged'] = $paged ? $paged : 1;
91 + }
1175 92
1176 - //--------------------------
1177 - // Image Setting/Style
1178 - //--------------------------
1179 - 'imgCrop' => [
1180 - 'type' => 'string',
1181 - 'default' => 'ultp_layout_landscape',
1182 - 'depends' => [(object)['key' => 'showImage','condition' => '==','value' => 'true']]
1183 - ],
1184 - 'imgWidth' => [
1185 - 'type' => 'object',
1186 - 'default' => (object)['lg' =>'', 'unit' =>'%'],
1187 - 'style' => [
1188 - (object)[
1189 - 'depends' => [
1190 - (object)['key'=>'showImage','condition'=>'==','value'=>true],
1191 - ],
1192 - 'selector'=>'{{ULTP}} .ultp-block-item .ultp-block-image { max-width: {{imgWidth}}; }'
1193 - ],
1194 - ],
1195 - ],
1196 - 'imgHeight' => [
1197 - 'type' => 'object',
1198 - 'default' => (object)['lg' =>'', 'unit' =>'px'],
1199 - 'style' => [
1200 - (object)[
1201 - 'depends' => [
1202 - (object)['key'=>'showImage','condition'=>'==','value'=>true],
1203 - ],
1204 - 'selector'=>'{{ULTP}} .ultp-block-item .ultp-block-image img {object-fit: cover; height: {{imgHeight}}; }'
1205 - ],
1206 - ],
1207 - ],
1208 - 'imgAnimation' => [
1209 - 'type' => 'string',
1210 - 'default' => 'opacity',
1211 - ],
1212 - 'imgGrayScale' => [
1213 - 'type' => 'object',
1214 - 'default' => (object)['lg' =>'0', 'unit' =>'%'],
1215 - 'style' => [
1216 - (object)[
1217 - 'depends' => [
1218 - (object)['key'=>'showImage','condition'=>'==','value'=>true],
1219 - ],
1220 - 'selector'=>'{{ULTP}} .ultp-block-image img { filter: grayscale({{imgGrayScale}}); }'
1221 - ],
1222 - ],
1223 - ],
1224 - 'imgHoverGrayScale' => [
1225 - 'type' => 'object',
1226 - 'default' => (object)['lg' =>'0', 'unit' =>'%'],
1227 - 'style' => [
1228 - (object)[
1229 - 'depends' => [
1230 - (object)['key'=>'showImage','condition'=>'==','value'=>true],
1231 - ],
1232 - 'selector'=>'{{ULTP}} .ultp-block-item:hover .ultp-block-image img { filter: grayscale({{imgHoverGrayScale}}); }'
1233 - ],
1234 - ],
1235 - ],
1236 - 'imgRadius' => [
1237 - 'type' => 'object',
1238 - 'default' => (object)['lg' =>'', 'unit' =>'px'],
1239 - 'style' => [
1240 - (object)[
1241 - 'depends' => [
1242 - (object)['key'=>'showImage','condition'=>'==','value'=>true],
1243 - ],
1244 - 'selector'=>'{{ULTP}} .ultp-block-image { border-radius:{{imgRadius}}; }'
1245 - ],
1246 - ],
1247 - ],
1248 - 'imgHoverRadius' => [
1249 - 'type' => 'object',
1250 - 'default' => (object)['lg' =>'', 'unit' =>'px'],
1251 - 'style' => [
1252 - (object)[
1253 - 'depends' => [
1254 - (object)['key'=>'showImage','condition'=>'==','value'=>true],
1255 - ],
1256 - 'selector'=>'{{ULTP}} .ultp-block-item:hover .ultp-block-image { border-radius:{{imgHoverRadius}}; }'
1257 - ],
1258 - ],
1259 - ],
1260 - 'imgShadow' => [
1261 - 'type' => 'object',
1262 - 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'],
1263 - 'style' => [
1264 - (object)[
1265 - 'depends' => [
1266 - (object)['key'=>'showImage','condition'=>'==','value'=>true],
1267 - ],
1268 - 'selector'=>'{{ULTP}} .ultp-block-image'
1269 - ],
1270 - ],
1271 - ],
1272 - 'imgHoverShadow' => [
1273 - 'type' => 'object',
1274 - 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'],
1275 - 'style' => [
1276 - (object)[
1277 - 'depends' => [
1278 - (object)['key'=>'showImage','condition'=>'==','value'=>true],
1279 - ],
1280 - 'selector'=>'{{ULTP}} .ultp-block-item:hover .ultp-block-image'
1281 - ],
1282 - ],
1283 - ],
1284 - 'imgSpacing' => [
1285 - 'type' => 'object',
1286 - 'default' => (object)['lg'=>'20'],
1287 - 'style' => [
1288 - (object)[
1289 - 'depends' => [
1290 - (object)['key'=>'showImage','condition'=>'==','value'=>true],
1291 - ],
1292 - 'selector'=>'{{ULTP}} .ultp-block-item .ultp-block-image { margin-bottom: {{imgSpacing}}px; }'
1293 - ],
1294 - ],
1295 - ],
1296 - 'imgOverlay' => [
1297 - 'type' => 'boolean',
1298 - 'default' => false,
1299 - ],
1300 - 'imgOverlayType' => [
1301 - 'type' => 'string',
1302 - 'default' => 'default',
1303 - 'style' => [
1304 - (object)[
1305 - 'depends' => [
1306 - (object)['key'=>'imgOverlay','condition'=>'==','value'=>true],
1307 - ]
1308 - ],
1309 - ]
1310 - ],
1311 - 'overlayColor' => [
1312 - 'type' => 'object',
1313 - 'default' => (object)['openColor' => 1, 'type' => 'color', 'color' => '#0e1523'],
1314 - 'style' => [
1315 - (object)[
1316 - 'depends' => [
1317 - (object)['key'=>'imgOverlayType','condition'=>'==','value'=>'custom'],
1318 - ],
1319 - 'selector'=>'{{ULTP}} .ultp-block-image-custom > a::before'
1320 - ],
1321 - ],
93 + $block_name = 'ultp-taxonomy';
94 + $wraper_before = $wraper_after = $post_loop = '';
95 + $recent_posts = ultimate_post()->get_category_data( json_decode( $attr['taxValue'] ), $attr['queryNumber'], $attr['taxType'], $attr['taxSlug'] );
1322 96
1323 - ],
1324 - 'imgOpacity' => [
1325 - 'type' => 'string',
1326 - 'default' => .7,
1327 - 'style' => [
1328 - (object)[
1329 - 'depends' => [
1330 - (object)['key'=>'imgOverlayType','condition'=>'==','value'=>'custom'],
1331 - ],
1332 - 'selector'=>'{{ULTP}} .ultp-block-image-custom > a::before { opacity: {{imgOpacity}}; }'
1333 - ],
1334 - ],
1335 - ],
97 + if ( ! empty( $recent_posts ) ) {
1336 98
1337 - //--------------------------
1338 - // Separator
1339 - //--------------------------
1340 - 'separatorShow' => [
1341 - 'type' => 'boolean',
1342 - 'default' => true,
1343 - ],
1344 - 'septColor' => [
1345 - 'type' => 'string',
1346 - 'default' => '#e5e5e5',
1347 - 'style' => [
1348 - (object)[
1349 - 'depends' => [
1350 - (object)['key'=>'separatorShow','condition'=>'==','value'=>true],
1351 - ],
1352 - 'selector'=>'{{ULTP}} .ultp-block-item { border-bottom-color:{{septColor}}; }'
1353 - ],
1354 - ],
1355 - ],
1356 - 'septStyle' => [
1357 - 'type' => 'string',
1358 - 'default' => 'dashed',
1359 - 'style' => [
1360 - (object)[
1361 - 'depends' => [
1362 - (object)['key'=>'separatorShow','condition'=>'==','value'=>true],
1363 - ],
1364 - 'selector'=>'{{ULTP}} .ultp-block-item { border-bottom-style:{{septStyle}}; }'
1365 - ],
1366 - ],
1367 - ],
1368 - 'septSize' => [
1369 - 'type' => 'string',
1370 - 'default' => (object)['lg'=>'1'],
1371 - 'style' => [
1372 - (object)[
1373 - 'depends' => [
1374 - (object)['key'=>'separatorShow','condition'=>'==','value'=>true],
1375 - ],
1376 - 'selector'=>'{{ULTP}} .ultp-block-item { border-bottom-width: {{septSize}}px; }'
1377 - ],
1378 - ],
1379 - ],
1380 - 'septSpace' => [
1381 - 'type' => 'object',
1382 - 'default' => (object)['lg'=>'30'],
1383 - 'style' => [
1384 - (object)[
1385 - 'selector'=>'{{ULTP}} .ultp-block-item { padding-bottom: {{septSpace}}px; }'
1386 - ],
1387 - ],
1388 - ],
99 + $attr['className'] = isset( $attr['className'] ) && $attr['className'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['className'] ) : '';
100 + $attr['imgCrop'] = isset( $attr['imgCrop'] ) && $attr['imgCrop'] ? preg_replace( '/[^A-Za-z0-9_ -]/', '', $attr['imgCrop'] ) : '';
101 + $attr['advanceId'] = isset( $attr['advanceId'] ) ? sanitize_html_class( $attr['advanceId'] ) : '';
102 + $attr['blockId'] = isset( $attr['blockId'] ) ? sanitize_html_class( $attr['blockId'] ) : '';
103 + $attr['titleTag'] = in_array( $attr['titleTag'], ultimate_post()->ultp_allowed_block_tags() ) ? $attr['titleTag'] : 'span';
104 + $attr['layout'] = sanitize_html_class( $attr['layout'] );
105 + $attr['TaxAnimation'] = sanitize_html_class( $attr['TaxAnimation'] );
1389 106
1390 - //--------------------------
1391 - // Read more Setting/Style
1392 - //--------------------------
1393 - 'readMoreText' => [
1394 - 'type' => 'string',
1395 - 'default' => ''
1396 - ],
1397 - 'readMoreIcon' => [
1398 - 'type' => 'string',
1399 - 'default' => 'rightArrowLg',
1400 - ],
1401 - 'readMoreTypo' => [
1402 - 'type' => 'object',
1403 - 'default' => (object)['openTypography' => 1, 'size' => (object)['lg' =>12, 'unit' =>'px'], 'height' => (object)['lg' =>'', 'unit' =>'px'], 'spacing' => (object)['lg' =>1, 'unit' =>'px'], 'transform' => 'uppercase', 'weight' => '400', 'decoration' => 'none','family'=>'' ],
1404 - 'style' => [
1405 - (object)[
1406 - 'depends' => [
1407 - (object)['key'=>'readMore','condition'=>'==','value'=>true],
1408 - ],
1409 - 'selector'=>'{{ULTP}} .ultp-block-readmore a'
1410 - ],
1411 - ],
1412 - ],
1413 - 'readMoreIconSize' => [
1414 - 'type' => 'object',
1415 - 'default' => (object)['lg' =>'', 'unit' =>'px'],
1416 - 'style' => [
1417 - (object)[
1418 - 'depends' => [
1419 - (object)['key'=>'readMore','condition'=>'==','value'=>true],
1420 - ],
1421 - 'selector' => '{{ULTP}} .ultp-block-readmore svg{ width:{{readMoreIconSize}}; }'
1422 - ],
1423 - ]
1424 - ],
1425 - 'readMoreColor' => [
1426 - 'type' => 'string',
1427 - 'default' => '#0d1523',
1428 - 'style' => [
1429 - (object)[
1430 - 'depends' => [
1431 - (object)['key'=>'readMore','condition'=>'==','value'=>true],
1432 - ],
1433 - 'selector'=>'{{ULTP}} .ultp-block-readmore a { color:{{readMoreColor}}; } {{ULTP}} .ultp-block-readmore a svg { fill:{{readMoreColor}}; }'
1434 - ],
1435 - ],
1436 - ],
1437 - 'readMoreBgColor' => [
1438 - 'type' => 'object',
1439 - 'default' => (object)['openColor' => 0,'type' => 'color', 'color' => ''],
1440 - 'style' => [
1441 - (object)[
1442 - 'depends' => [
1443 - (object)['key'=>'readMore','condition'=>'==','value'=>true],
1444 - ],
1445 - 'selector'=>'{{ULTP}} .ultp-block-readmore a'
1446 - ],
1447 - ],
1448 - ],
1449 - 'readMoreBorder' => [
1450 - 'type' => 'object',
1451 - 'default' => (object)['openBorder'=>0, 'width' => (object)[ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid' ],
1452 - 'style' => [
1453 - (object)[
1454 - 'depends' => [
1455 - (object)['key'=>'readMore','condition'=>'==','value'=>true],
1456 - ],
1457 - 'selector'=>'{{ULTP}} .ultp-block-readmore a'
1458 - ],
1459 - ],
1460 - ],
1461 - 'readMoreRadius' => [
1462 - 'type' => 'object',
1463 - 'default' => (object)['lg' =>'', 'unit' =>'px'],
1464 - 'style' => [
1465 - (object)[
1466 - 'depends' => [
1467 - (object)['key'=>'readMore','condition'=>'==','value'=>true],
1468 - ],
1469 - 'selector'=>'{{ULTP}} .ultp-block-readmore a { border-radius:{{readMoreRadius}}; }'
1470 - ],
1471 - ],
1472 - ],
1473 - 'readMoreHoverColor' => [
1474 - 'type' => 'string',
1475 - 'default' => '#0c32d8',
1476 - 'style' => [
1477 - (object)[
1478 - 'depends' => [
1479 - (object)['key'=>'readMore','condition'=>'==','value'=>true],
1480 - ],
1481 - 'selector'=>'{{ULTP}} .ultp-block-readmore a:hover { color:{{readMoreHoverColor}}; } {{ULTP}} .ultp-block-readmore a:hover svg { fill:{{readMoreHoverColor}}; }'
1482 - ],
1483 - ],
1484 - ],
1485 - 'readMoreBgHoverColor' => [
1486 - 'type' => 'object',
1487 - 'default' => (object)['openColor' => 0, 'type' => 'color', 'color' => ''],
1488 - 'style' => [
1489 - (object)[
1490 - 'depends' => [
1491 - (object)['key'=>'readMore','condition'=>'==','value'=>true],
1492 - ],
1493 - 'selector'=>'{{ULTP}} .ultp-block-readmore a:hover'
1494 - ],
1495 - ],
1496 - ],
1497 - 'readMoreHoverBorder' => [
1498 - 'type' => 'object',
1499 - 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'],
1500 - 'style' => [
1501 - (object)[
1502 - 'depends' => [
1503 - (object)['key'=>'readMore','condition'=>'==','value'=>true],
1504 - ],
1505 - 'selector'=>'{{ULTP}} .ultp-block-readmore a:hover'
1506 - ],
1507 - ],
1508 - ],
1509 - 'readMoreHoverRadius' => [
1510 - 'type' => 'object',
1511 - 'default' => (object)['lg' =>'', 'unit' =>'px'],
1512 - 'style' => [
1513 - (object)[
1514 - 'depends' => [
1515 - (object)['key'=>'readMore','condition'=>'==','value'=>true],
1516 - ],
1517 - 'selector'=>'{{ULTP}} .ultp-block-readmore a:hover { border-radius:{{readMoreHoverRadius}}; }'
1518 - ],
1519 - ],
1520 - ],
1521 - 'readMoreSacing' => [
1522 - 'type' => 'object',
1523 - 'default' => (object)['lg' =>(object)['top' => 15,'bottom' => '','left' => '','right' => '', 'unit' =>'px']],
1524 - 'style' => [
1525 - (object)[
1526 - 'depends' => [
1527 - (object)['key'=>'readMore','condition'=>'==','value'=>true],
1528 - ],
1529 - 'selector'=>'{{ULTP}} .ultp-block-readmore { margin:{{readMoreSacing}}; }'
1530 - ],
1531 - ],
1532 - ],
1533 - 'readMorePadding' => [
1534 - 'type' => 'object',
1535 - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '','left' => '','right' => '', 'unit' =>'px']],
1536 - 'style' => [
1537 - (object)[
1538 - 'depends' => [
1539 - (object)['key'=>'readMore','condition'=>'==','value'=>true],
1540 - ],
1541 - 'selector'=>'{{ULTP}} .ultp-block-readmore a { padding:{{readMorePadding}}; }'
1542 - ],
1543 - ],
1544 - ],
107 + $wraper_before .= '<div ' . ( $attr['advanceId'] ? 'id="' . $attr['advanceId'] . '" ' : '' ) . ' class="wp-block-ultimate-post-' . $block_name . ' ultp-block-' . $attr['blockId'] . ' ' . ( $attr['className'] ? $attr['className'] : '' ) . '">';
108 + $wraper_before .= '<div class="ultp-block-wrapper">';
109 + $wraper_before .= ultimate_post()->postx_loading(); // Loading
1545 110
1546 - //--------------------------
1547 - // Filter Setting/Style
1548 - //--------------------------
1549 - 'filterType' => [
1550 - 'type' => 'string',
1551 - 'default' => 'category'
1552 - ],
1553 - 'filterText' => [
1554 - 'type' => 'string',
1555 - 'default' => 'all'
1556 - ],
1557 - 'filterCat' => [
1558 - 'type' => 'string',
1559 - 'default' => '[]',
1560 - 'style' => [
1561 - (object)[
1562 - 'depends' => [(object)['key' => 'filterType','condition' => '==','value' => 'category']]
1563 - ],
1564 - ],
1565 - ],
1566 - 'filterTag' => [
1567 - 'type' => 'string',
1568 - 'default' => '[]',
1569 - 'style' => [
1570 - (object)[
1571 - 'depends' => [(object)['key' => 'filterType','condition' => '==','value' => 'post_tag']]
1572 - ],
1573 - ],
1574 - ],
1575 - 'fliterTypo' => [
1576 - 'type' => 'object',
1577 - 'default' => (object)['openTypography' => 1,'size' => (object)['lg' =>14, 'unit' =>'px'],'height' => (object)['lg' =>18, 'unit' =>'px'], 'decoration' => 'none','family'=>'','weight'=>500],
1578 - 'style' => [
1579 - (object)[
1580 - 'depends' => [
1581 - (object)['key'=>'filterShow','condition'=>'==','value'=>true],
1582 - ],
1583 - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li a'
1584 - ],
1585 - ],
1586 - ],
1587 - 'filterColor' => [
1588 - 'type' => 'string',
1589 - 'default' => '#0e1523',
1590 - 'style' => [
1591 - (object)[
1592 - 'depends' => [
1593 - (object)['key'=>'filterShow','condition'=>'==','value'=>true],
1594 - ],
1595 - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li a { color:{{filterColor}}; }'
1596 - ],
1597 - ],
1598 - ],
1599 - 'filterHoverColor' => [
1600 - 'type' => 'string',
1601 - 'default' => '#828282',
1602 - 'style' => [
1603 - (object)[
1604 - 'depends' => [
1605 - (object)['key'=>'filterShow','condition'=>'==','value'=>true],
1606 - ],
1607 - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li a:hover, {{ULTP}} .ultp-filter-wrap ul li a.filter-active { color:{{filterHoverColor}}; }'
1608 - ],
1609 - ],
1610 - ],
1611 - 'filterBgColor' => [
1612 - 'type' => 'string',
1613 - 'style' => [
1614 - (object)[
1615 - 'depends' => [
1616 - (object)['key'=>'filterShow','condition'=>'==','value'=>true],
1617 - ],
1618 - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.filter-item > a { background:{{filterBgColor}}; }'
1619 - ],
1620 - ],
1621 - ],
1622 - 'filterHoverBgColor' => [
1623 - 'type' => 'string',
1624 - 'style' => [
1625 - (object)[
1626 - 'depends' => [
1627 - (object)['key'=>'filterShow','condition'=>'==','value'=>true],
1628 - ],
1629 - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.filter-item > a:hover, {{ULTP}} .ultp-filter-wrap ul li.filter-item > a.filter-active { background:{{filterHoverBgColor}}; }'
1630 - ],
1631 - ],
1632 - ],
1633 - 'filterBorder' => [
1634 - 'type' => 'object',
1635 - 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'],
1636 - 'style' => [
1637 - (object)[
1638 - 'depends' => [
1639 - (object)['key'=>'filterShow','condition'=>'==','value'=>true],
1640 - ],
1641 - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.filter-item > a'
1642 - ],
1643 - ],
1644 - ],
1645 - 'filterHoverBorder' => [
1646 - 'type' => 'object',
1647 - 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'],
1648 - 'style' => [
1649 - (object)[
1650 - 'depends' => [
1651 - (object)['key'=>'filterShow','condition'=>'==','value'=>true],
1652 - ],
1653 - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.filter-item > a:hover'
1654 - ],
1655 - ],
1656 - ],
1657 - 'filterRadius' => [
1658 - 'type' => 'object',
1659 - 'default' => (object)['lg' =>'', 'unit' =>'px'],
1660 - 'style' => [
1661 - (object)[
1662 - 'depends' => [
1663 - (object)['key'=>'filterShow','condition'=>'==','value'=>true],
1664 - ],
1665 - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.filter-item > a { border-radius:{{filterRadius}}; }'
1666 - ],
1667 - ],
1668 - ],
1669 - 'fliterSpacing' => [
1670 - 'type' => 'object',
1671 - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'right' => '', 'left' => '20', 'unit' =>'px']],
1672 - 'style' => [
1673 - (object)[
1674 - 'depends' => [
1675 - (object)['key'=>'filterShow','condition'=>'==','value'=>true],
1676 - ],
1677 - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li { margin:{{fliterSpacing}}; }'
1678 - ],
1679 - ],
1680 - ],
1681 - 'fliterPadding' => [
1682 - 'type' => 'object',
1683 - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'unit' =>'px']],
1684 - 'style' => [
1685 - (object)[
1686 - 'depends' => [
1687 - (object)['key'=>'filterShow','condition'=>'==','value'=>true],
1688 - ],
1689 - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.filter-item > a { padding:{{fliterPadding}}; }'
1690 - ],
1691 - ],
1692 - ],
1693 - 'filterDropdownColor' => [
1694 - 'type' => 'string',
1695 - 'default' => '#0e1523',
1696 - 'style' => [
1697 - (object)[
1698 - 'depends' => [
1699 - (object)['key'=>'filterShow','condition'=>'==','value'=>true],
1700 - ],
1701 - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.flexMenu-viewMore .flexMenu-popup li a { color:{{filterDropdownColor}}; }'
1702 - ],
1703 - ],
1704 - ],
1705 - 'filterDropdownHoverColor' => [
1706 - 'type' => 'string',
1707 - 'default' => '#1740f5',
1708 - 'style' => [
1709 - (object)[
1710 - 'depends' => [
1711 - (object)['key'=>'filterShow','condition'=>'==','value'=>true],
1712 - ],
1713 - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.flexMenu-viewMore .flexMenu-popup li a:hover { color:{{filterDropdownHoverColor}}; }'
1714 - ],
1715 - ],
1716 - ],
1717 - 'filterDropdownBg' => [
1718 - 'type' => 'string',
1719 - 'default' => '#fff',
1720 - 'style' => [
1721 - (object)[
1722 - 'depends' => [
1723 - (object)['key'=>'filterShow','condition'=>'==','value'=>true],
1724 - ],
1725 - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.flexMenu-viewMore .flexMenu-popup { background:{{filterDropdownBg}}; }'
1726 - ],
1727 - ],
1728 - ],
1729 - 'filterDropdownRadius' => [
1730 - 'type' => 'object',
1731 - 'default' => (object)['lg'=>'0'],
1732 - 'style' => [
1733 - (object)[
1734 - 'depends' => [
1735 - (object)['key'=>'filterShow','condition'=>'==','value'=>true],
1736 - ],
1737 - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.flexMenu-viewMore .flexMenu-popup { border-radius:{{filterDropdownRadius}}; }'
1738 - ],
1739 - ],
1740 - ],
1741 - 'filterDropdownPadding' => [
1742 - 'type' => 'object',
1743 - 'default' => (object)['lg' =>(object)['top' => '15','bottom' => '15','left' => '20','right' => '20', 'unit' =>'px']],
1744 - 'style' => [
1745 - (object)[
1746 - 'depends' => [
1747 - (object)['key'=>'filterShow','condition'=>'==','value'=>true],
1748 - ],
1749 - 'selector'=>'{{ULTP}} .ultp-filter-wrap ul li.flexMenu-viewMore .flexMenu-popup { padding:{{filterDropdownPadding}}; }'
1750 - ],
1751 - ],
1752 - ],
1753 - //--------------------------
1754 - // Pagination Setting/Style
1755 - //--------------------------
1756 - 'paginationType' => [
1757 - 'type' => 'string',
1758 - 'default' => 'pagination',
1759 - ],
1760 - 'loadMoreText' => [
1761 - 'type' => 'string',
1762 - 'default' => 'Load More',
1763 - 'style' => [
1764 - (object)[
1765 - 'depends' => [
1766 - (object)['key'=>'paginationType','condition'=>'==','value'=>'loadMore'],
1767 - ],
1768 - ],
1769 - ],
1770 - ],
1771 - 'paginationNav' => [
1772 - 'type' => 'string',
1773 - 'default' => 'textArrow',
1774 - 'style' => [
1775 - (object)[
1776 - 'depends' => [
1777 - (object)['key'=>'paginationType','condition'=>'==','value'=>'pagination'],
1778 - ],
1779 - ],
1780 - ],
1781 - ],
1782 - 'paginationAjax' => [
1783 - 'type' => 'boolean',
1784 - 'default' => true,
1785 - 'style' => [
1786 - (object)[
1787 - 'depends' => [
1788 - (object)['key'=>'paginationType','condition'=>'==','value'=>'pagination'],
1789 - ],
1790 - ],
1791 - ],
1792 - ],
1793 - 'navPosition' => [
1794 - 'type' => 'string',
1795 - 'default' => 'topRight',
1796 - 'style' => [
1797 - (object)[
1798 - 'depends' => [
1799 - (object)['key'=>'paginationType','condition'=>'==','value'=>'navigation'],
1800 - ],
1801 - ],
1802 - ],
1803 - ],
1804 - 'pagiAlign' => [
1805 - 'type' => 'object',
1806 - 'default' => (object)['lg' =>'center'],
1807 - 'style' => [
1808 - (object)[
1809 - 'depends' => [
1810 - (object)['key'=>'paginationShow','condition'=>'==','value'=>true],
1811 - ],
1812 - 'selector'=>'{{ULTP}} .ultp-loadmore, {{ULTP}} .ultp-next-prev-wrap ul, {{ULTP}} .ultp-pagination { text-align:{{pagiAlign}}; }'
1813 - ],
1814 - ],
1815 - ],
1816 - 'pagiTypo' => [
1817 - 'type' => 'object',
1818 - 'default' => (object)['openTypography' => 1,'size' => (object)['lg' =>14, 'unit' =>'px'],'height' => (object)['lg' =>20, 'unit' =>'px'], 'decoration' => 'none','family'=>''],
1819 - 'style' => [
1820 - (object)[
1821 - 'depends' => [
1822 - (object)['key'=>'paginationShow','condition'=>'==','value'=>true],
1823 - ],
1824 - 'selector'=>'{{ULTP}} .ultp-pagination li a, {{ULTP}} .ultp-loadmore-action'
1825 - ],
1826 - ],
111 + if ( $attr['headingShow'] ) {
112 + $wraper_before .= '<div class="ultp-heading-filter">';
113 + $wraper_before .= '<div class="ultp-heading-filter-in">';
114 + include ULTP_PATH . 'blocks/template/heading.php'; // Heading
115 + $wraper_before .= '</div>';
116 + $wraper_before .= '</div>';
117 + }
1827 118
1828 - ],
1829 - 'pagiArrowSize' => [
1830 - 'type' => 'object',
1831 - 'default' => (object)['lg'=>'14'],
1832 - 'style' => [
1833 - (object)[
1834 - 'depends' => [
1835 - (object)['key'=>'paginationType','condition'=>'==','value'=>'navigation'],
1836 - ],
1837 - 'selector'=>'{{ULTP}} .ultp-next-prev-wrap ul li a { font-size:{{pagiArrowSize}}px; }'
1838 - ],
1839 - ],
119 + $wraper_before .= '<div class="ultp-block-items-wrap">';
120 + $wraper_before .= '<ul class="ultp-taxonomy-items ' . ( isset( $attr['TaxAnimation'] ) ? ' ultp-taxonomy-animation-' . $attr['TaxAnimation'] : '' ) . ' ultp-taxonomy-column-' . sanitize_html_class( json_decode( wp_json_encode( $attr['columns'] ), true )['lg'] ) . ' ultp-taxonomy-layout-' . $attr['layout'] . '">';
1840 121
1841 - ],
1842 - 'pagiColor' => [
1843 - 'type' => 'string',
1844 - 'default' => '#fff',
1845 - 'style' => [
1846 - (object)[
1847 - 'depends' => [
1848 - (object)['key'=>'paginationShow','condition'=>'==','value'=>true],
1849 - ],
1850 - 'selector'=>'{{ULTP}} .ultp-pagination li a, {{ULTP}} .ultp-next-prev-wrap ul li a, {{ULTP}} .ultp-loadmore-action { color:{{pagiColor}}; } .ultp-next-prev-wrap ul li a svg { fill:{{pagiColor}}; } .ultp-pagination li a svg { fill:{{pagiColor}}; }'
1851 - ],
1852 - ],
1853 - ],
1854 - 'pagiBgColor' => [
1855 - 'type' => 'object',
1856 - 'default' => (object)['openColor' => 1, 'type' => 'color', 'color' => '#0e1523'],
1857 - 'style' => [
1858 - (object)[
1859 - 'depends' => [
1860 - (object)['key'=>'paginationShow','condition'=>'==','value'=>true],
1861 - ],
1862 - 'selector'=>'{{ULTP}} .ultp-pagination li a, {{ULTP}} .ultp-next-prev-wrap ul li a, {{ULTP}} .ultp-loadmore-action'
1863 - ],
1864 - ],
1865 - ],
1866 - 'pagiBorder' => [
1867 - 'type' => 'object',
1868 - 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'],
1869 - 'style' => [
1870 - (object)[
1871 - 'depends' => [
1872 - (object)['key'=>'paginationShow','condition'=>'==','value'=>true],
1873 - ],
1874 - 'selector'=>'{{ULTP}} .ultp-pagination li a, {{ULTP}} .ultp-next-prev-wrap ul li a, {{ULTP}} .ultp-loadmore-action'
1875 - ],
1876 - ],
1877 - ],
1878 - 'pagiShadow' => [
1879 - 'type' => 'object',
1880 - 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'],
1881 - 'style' => [
1882 - (object)[
1883 - 'depends' => [
1884 - (object)['key'=>'paginationShow','condition'=>'==','value'=>true],
1885 - ],
1886 - 'selector'=>'{{ULTP}} .ultp-pagination li a, {{ULTP}} .ultp-next-prev-wrap ul li a, {{ULTP}} .ultp-loadmore-action'
1887 - ],
1888 - ],
1889 - ],
1890 - 'pagiRadius' => [
1891 - 'type' => 'object',
1892 - 'default' => (object)['lg' =>(object)['top' => '2','bottom' => '2','left' => '2','right' => '2', 'unit' =>'px']],
1893 - 'style' => [
1894 - (object)[
1895 - 'depends' => [
1896 - (object)['key'=>'paginationShow','condition'=>'==','value'=>true],
1897 - ],
1898 - 'selector'=>'{{ULTP}} .ultp-pagination li a, {{ULTP}} .ultp-next-prev-wrap ul li a, {{ULTP}} .ultp-loadmore-action { border-radius:{{pagiRadius}}; }'
1899 - ],
1900 - ],
1901 - ],
1902 - 'pagiHoverColor' => [
1903 - 'type' => 'string',
1904 - 'default' => '#fff',
1905 - 'style' => [
1906 - (object)[
1907 - 'depends' => [
1908 - (object)['key'=>'paginationShow','condition'=>'==','value'=>true],
1909 - ],
1910 - 'selector'=>'{{ULTP}} .ultp-pagination li a:hover, {{ULTP}} .ultp-pagination li.pagination-active a, {{ULTP}} .ultp-next-prev-wrap ul li a:hover, {{ULTP}} .ultp-loadmore-action:hover { color:{{pagiHoverColor}}; } {{ULTP}} .ultp-pagination li a:hover svg { fill:{{pagiHoverColor}}; } {{ULTP}} .ultp-next-prev-wrap ul li a:hover svg { fill:{{pagiHoverColor}}; }'
1911 - ],
1912 - ],
1913 - ],
1914 - 'pagiHoverbg' => [
1915 - 'type' => 'object',
1916 - 'default' => (object)['openColor' => 1, 'type' => 'color', 'color' => '#1740f5'],
1917 - 'style' => [
1918 - (object)[
1919 - 'depends' => [
1920 - (object)['key'=>'paginationShow','condition'=>'==','value'=>true],
1921 - ],
1922 - 'selector'=>'{{ULTP}} .ultp-pagination li a:hover, {{ULTP}} .ultp-pagination li.pagination-active a, {{ULTP}} .ultp-next-prev-wrap ul li a:hover, {{ULTP}} .ultp-loadmore-action:hover'
1923 - ],
1924 - ],
1925 - ],
1926 - 'pagiHoverBorder' => [
1927 - 'type' => 'object',
1928 - 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'],
1929 - 'style' => [
1930 - (object)[
1931 - 'depends' => [
1932 - (object)['key'=>'paginationShow','condition'=>'==','value'=>true],
1933 - ],
1934 - 'selector'=>'{{ULTP}} .ultp-pagination li a:hover, {{ULTP}} .ultp-pagination li.pagination-active a, {{ULTP}} .ultp-next-prev-wrap ul li a:hover, {{ULTP}} .ultp-loadmore-action:hover'
1935 - ],
1936 - ],
1937 - ],
1938 - 'pagiHoverShadow' => [
1939 - 'type' => 'object',
1940 - 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'],
1941 - 'style' => [
1942 - (object)[
1943 - 'depends' => [
1944 - (object)['key'=>'paginationShow','condition'=>'==','value'=>true],
1945 - ],
1946 - 'selector'=>'{{ULTP}} .ultp-pagination li a:hover, {{ULTP}} .ultp-pagination li.pagination-active a, {{ULTP}} .ultp-next-prev-wrap ul li a:hover, {{ULTP}} .ultp-loadmore-action:hover'
1947 - ],
1948 - ],
1949 - ],
1950 - 'pagiHoverRadius' => [
1951 - 'type' => 'object',
1952 - 'default' => (object)['lg' =>(object)['top' => '2','bottom' => '2','left' => '2','right' => '2', 'unit' =>'px']],
1953 - 'style' => [
1954 - (object)[
1955 - 'depends' => [
1956 - (object)['key'=>'paginationShow','condition'=>'==','value'=>true],
1957 - ],
1958 - 'selector'=>'{{ULTP}} .ultp-pagination li a:hover, {{ULTP}} .ultp-next-prev-wrap ul li a:hover, {{ULTP}} .ultp-loadmore-action:hover { border-radius:{{pagiHoverRadius}}; }'
1959 - ],
1960 - ],
1961 - ],
1962 - 'pagiPadding' => [
1963 - 'type' => 'object',
1964 - 'default' => (object)['lg' =>(object)['top' => '8','bottom' => '8','left' => '14','right' => '14', 'unit' =>'px']],
1965 - 'style' => [
1966 - (object)[
1967 - 'depends' => [
1968 - (object)['key'=>'paginationShow','condition'=>'==','value'=>true],
1969 - ],
1970 - 'selector'=>'{{ULTP}} .ultp-pagination li a, {{ULTP}} .ultp-next-prev-wrap ul li a, {{ULTP}} .ultp-loadmore-action { padding:{{pagiPadding}}; }'
1971 - ],
1972 - ],
1973 - ],
1974 - 'navMargin' => [
1975 - 'type' => 'object',
1976 - 'default' => (object)['lg' =>(object)['top' => '0', 'right' => '0', 'bottom' => '0', 'left' => '0', 'unit' =>'px']],
1977 - 'style' => [
1978 - (object)[
1979 - 'depends' => [
1980 - (object)['key'=>'paginationType','condition'=>'==','value'=>'navigation'],
1981 - ],
1982 - 'selector'=>'{{ULTP}} .ultp-next-prev-wrap ul { margin:{{navMargin}}; }'
1983 - ],
1984 - ],
1985 - ],
1986 - 'pagiMargin' => [
1987 - 'type' => 'object',
1988 - 'default' => (object)['lg' =>(object)['top' => '30', 'right' => '0', 'bottom' => '0', 'left' => '0', 'unit' =>'px']],
1989 - 'style' => [
1990 - (object)[
1991 - 'depends' => [
1992 - (object)['key'=>'paginationType','condition'=>'!=','value'=>'navigation'],
1993 - ],
1994 - 'selector'=>'{{ULTP}} .ultp-pagination, {{ULTP}} .ultp-loadmore { margin:{{pagiMargin}}; }'
1995 - ],
1996 - ],
1997 - ],
122 + foreach ( $recent_posts as $value ) {
123 + $_style = ( ( $attr['customTaxColor'] && $value['color'] ) ? ' style="background-color:' . $value['color'] . ';"' : '' );
124 + $_style_color = ( ( in_array( $attr['layout'], array( 1, 4, 5 ) ) && $value['color'] && $attr['customTaxTitleColor'] ) ? ' style="color:' . $value['color'] . ';"' : '' );
125 + $_style_title_bg = ( ( in_array( $attr['layout'], array( 7, 8 ) ) && $value['color'] && $attr['customTaxTitleColor'] ) ? ' style="background:' . $value['color'] . ';"' : '' );
126 + $post_loop .= '<li class="ultp-block-item ultp-taxonomy-item">';
1998 127
1999 - //--------------------------
2000 - // Wrapper Style
2001 - //--------------------------
2002 - 'wrapBg' => [
2003 - 'type' => 'object',
2004 - 'default' => (object)['openColor' => 0, 'type' => 'color', 'color' => '#f5f5f5'],
2005 - 'style' => [
2006 - (object)[
2007 - 'selector'=>'{{ULTP}} .ultp-block-wrapper'
2008 - ],
2009 - ],
2010 - ],
2011 - 'wrapBorder' => [
2012 - 'type' => 'object',
2013 - 'default' => (object)['openBorder'=>0, 'width' =>(object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'],
2014 - 'style' => [
2015 - (object)[
2016 - 'selector'=>'{{ULTP}} .ultp-block-wrapper'
2017 - ],
2018 - ],
2019 - ],
2020 - 'wrapShadow' => [
2021 - 'type' => 'object',
2022 - 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'],
2023 - 'style' => [
2024 - (object)[
2025 - 'selector'=>'{{ULTP}} .ultp-block-wrapper'
2026 - ],
2027 - ],
2028 - ],
2029 - 'wrapRadius' => [
2030 - 'type' => 'object',
2031 - 'default' => (object)['lg' =>'', 'unit' =>'px'],
2032 - 'style' => [
2033 - (object)[
2034 - 'selector'=>'{{ULTP}} .ultp-block-wrapper { border-radius:{{wrapRadius}}; }'
2035 - ],
2036 - ],
2037 - ],
2038 - 'wrapHoverBackground' => [
2039 - 'type' => 'object',
2040 - 'default' => (object)['openColor' => 0, 'type' => 'color', 'color' => '#1740f5'],
2041 - 'style' => [
2042 - (object)[
2043 - 'selector'=>'{{ULTP}} .ultp-block-wrapper:hover'
2044 - ],
2045 - ],
2046 - ],
2047 - 'wrapHoverBorder' => [
2048 - 'type' => 'object',
2049 - 'default' => (object)['openBorder'=>0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4','type' => 'solid'],
2050 - 'style' => [
2051 - (object)[
2052 - 'selector'=>'{{ULTP}} .ultp-block-wrapper:hover'
2053 - ],
2054 - ],
2055 - ],
2056 - 'wrapHoverRadius' => [
2057 - 'type' => 'object',
2058 - 'default' => (object)['lg' =>'', 'unit' =>'px'],
2059 - 'style' => [
2060 - (object)[
2061 - 'selector'=>'{{ULTP}} .ultp-block-wrapper:hover { border-radius:{{wrapHoverRadius}}; }'
2062 - ],
2063 - ],
2064 - ],
2065 - 'wrapHoverShadow' => [
2066 - 'type' => 'object',
2067 - 'default' => (object)['openShadow' => 0, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1],'color' => '#009fd4'],
2068 - 'style' => [
2069 - (object)[
2070 - 'selector'=>'{{ULTP}} .ultp-block-wrapper:hover'
2071 - ],
2072 - ],
2073 - ],
2074 - 'wrapMargin' => [
2075 - 'type' => 'object',
2076 - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '', 'unit' =>'px']],
2077 - 'style' => [
2078 - (object)[
2079 - 'selector'=>'{{ULTP}} .ultp-block-wrapper { margin:{{wrapMargin}}; }'
2080 - ],
2081 - ],
2082 - ],
2083 - 'wrapOuterPadding' => [
2084 - 'type' => 'object',
2085 - 'default' => (object)['lg' =>(object)['top' => '','bottom' => '','left' => '', 'right' => '', 'unit' =>'px']],
2086 - 'style' => [
2087 - (object)[
2088 - 'selector'=>'{{ULTP}} .ultp-block-wrapper { padding:{{wrapOuterPadding}}; }'
2089 - ],
2090 - ],
2091 - ],
2092 - 'advanceId' => [
2093 - 'type' => 'string',
2094 - 'default' => '',
2095 - ],
2096 - 'advanceZindex' => [
2097 - 'type' => 'number',
2098 - 'default' => '',
2099 - 'style' => [
2100 - (object)[
2101 - 'selector' => '{{ULTP}} {z-index:{{advanceZindex}};}'
2102 - ],
2103 - ],
2104 - ],
2105 - 'hideExtraLarge' => [
2106 - 'type' => 'boolean',
2107 - 'default' => false,
2108 - 'style' => [
2109 - (object)[
2110 - 'selector' => '{{ULTP}} {display:none;}'
2111 - ],
2112 - ],
2113 - ],
2114 - 'hideDesktop' => [
2115 - 'type' => 'boolean',
2116 - 'default' => false,
2117 - 'style' => [
2118 - (object)[
2119 - 'selector' => '{{ULTP}} {display:none;}'
2120 - ],
2121 - ],
2122 - ],
2123 - 'hideTablet' => [
2124 - 'type' => 'boolean',
2125 - 'default' => false,
2126 - 'style' => [
2127 - (object)[
2128 - 'selector' => '{{ULTP}} {display:none;}'
2129 - ],
2130 - ],
2131 - ],
2132 - 'hideMobile' => [
2133 - 'type' => 'boolean',
2134 - 'default' => false,
2135 - 'style' => [
2136 - (object)[
2137 - 'selector' => '{{ULTP}} {display:none;}'
2138 - ],
2139 - ],
2140 - ],
2141 - 'advanceCss' => [
2142 - 'type' => 'string',
2143 - 'default' => '',
2144 - 'style' => [(object)['selector' => '']],
2145 - ]
2146 - );
2147 -
2148 - if( $default ){
2149 - $temp = array();
2150 - foreach ($attributes as $key => $value) {
2151 - if( isset($value['default']) ){
2152 - $temp[$key] = $value['default'];
2153 - }
2154 - }
2155 - return $temp;
2156 - }else{
2157 - return $attributes;
2158 - }
2159 - }
128 + $style = in_array( $attr['layout'], array( 2, 3, 6, 7, 8 ) ) ? 'style="' . ( $value['image'] ? 'background-image: url(' . $value['image'][ $attr['imgCrop'] ] . ')' : '' ) . '"' : '';
2160 129
2161 - public function register() {
2162 - register_block_type( 'ultimate-post/taxonomy',
2163 - array(
2164 - 'attributes' => $this->get_attributes(),
2165 - 'description' => __( 'Listing your products in a easy way.' ),
2166 - 'keywords' => [__( 'Latest Post' ), __( 'Popular Post' ), __( 'Article' )],
2167 - 'render_callback' => array($this, 'content')
2168 - )
2169 - );
2170 - }
130 + $name = ( $attr['titleShow'] && $value['name'] ) ? '<' . $attr['titleTag'] . ' class="ultp-taxonomy-name" ' . $_style_color . '>' . $value['name'] . '</' . $attr['titleTag'] . '>' : '';
131 + $count = ( $attr['countShow'] && $value['count'] ) ? '<span class="ultp-taxonomy-count" ' . $_style_color . '>' . $value['count'] . '</span>' : '';
132 + $excerpt = ( $attr['excerptShow'] && $value['desc'] ) ? '<div class="ultp-taxonomy-desc">' . $value['desc'] . '</div>' : '';
133 + $post_loop .= '<a href="' . $value['url'] . '" ' . ( $attr['layout'] != 3 ? $style : '' ) . '>';
134 + switch ( $attr['layout'] ) {
135 + case 1:
136 + $post_loop .= $name . $count . $excerpt;
137 + break;
138 + case 2:
139 + $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;
140 + break;
141 + case 3:
142 + $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;
143 + break;
144 + case 4:
145 + $img = $value['image'] ? '<img src="' . $value['image'][ $attr['imgCrop'] ] . '" alt="' . $value['name'] . '"/>' : '';
146 + $post_loop .= $img . '<div class="ultp-taxonomy-lt4-content">' . $name . $count . '</div>' . $excerpt;
147 + break;
148 + case 5:
149 + $img = $value['image'] ? '<img src="' . $value['image'][ $attr['imgCrop'] ] . '" alt="' . $value['name'] . '"/>' : '';
150 + $post_loop .= $img . '<span class="ultp-taxonomy-lt5-content">' . $name . $count . $excerpt . '</span>';
151 + break;
152 + case 6:
153 + $post_loop .= '<div class="ultp-taxonomy-lt6-overlay"' . $_style . '></div>' . $name . $count . $excerpt;
154 + break;
155 + case 7:
156 + $post_loop .= '<div class="ultp-taxonomy-lt7-overlay"' . $_style . '></div><' . $attr['titleTag'] . ' class="ultp-taxonomy-name" ' . $_style_title_bg . '>' . $value['name'] . $count . '</' . $attr['titleTag'] . '>' . $excerpt;
157 + break;
158 + case 8:
159 + $post_loop .= '<div class="ultp-taxonomy-lt8-overlay"' . $_style . '></div><' . $attr['titleTag'] . ' class="ultp-taxonomy-name" ' . $_style_title_bg . '>' . $value['name'] . $count . '</' . $attr['titleTag'] . '>' . $excerpt;
160 + break;
161 + default:
162 + // code...
163 + break;
164 + }
165 + $post_loop .= '</a>';
166 + $post_loop .= '</li>';
167 + }
2171 168
2172 - public function content($attr, $noAjax) {
169 + $wraper_after .= '</ul>';
170 + $wraper_after .= '</div>';
171 + $wraper_after .= '</div>';
172 + $wraper_after .= '</div>';
173 + wp_reset_query();
174 + } else {
175 + $wraper_before .= ultimate_post()->get_no_result_found_html( $attr['notFoundMessage'] );
176 + }
2173 177
2174 - if(!$noAjax){
2175 - $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
2176 - $attr['paged'] = $paged;
2177 - }
2178 -
2179 - $block_name = 'taxonomy';
2180 - $page_post_id = get_the_ID();
2181 - $wraper_before = $wraper_after = $post_loop = '';
2182 - $recent_posts = new \WP_Query( ultimate_post()->get_query( $attr ) );
2183 - $pageNum = ultimate_post()->get_page_number($attr, $recent_posts->found_posts);
2184 -
2185 - if ($recent_posts->have_posts()) {
2186 - $wraper_before .= '<div '.($attr['advanceId']?'id="'.$attr['advanceId'].'" ':'').' class="wp-block-ultimate-post-'.$block_name.' ultp-block-'.$attr["blockId"].' '.(isset($attr["className"])?$attr["className"]:'').'">';
2187 - $wraper_before .= '<div class="ultp-block-wrapper">';
2188 -
2189 - // Loading
2190 - $wraper_before .= ultimate_post()->loading();
2191 -
2192 - if ($attr['headingShow'] || $attr['filterShow'] || $attr['paginationShow']) {
2193 - $wraper_before .= '<div class="ultp-heading-filter">';
2194 - $wraper_before .= '<div class="ultp-heading-filter-in">';
2195 -
2196 - // Heading
2197 - include ULTP_PATH.'blocks/template/heading.php';
2198 -
2199 - if ($attr['filterShow'] || $attr['paginationShow']) {
2200 - $wraper_before .= '<div class="ultp-filter-navigation">';
2201 -
2202 - // Filter
2203 - if($attr['filterShow']) {
2204 - include ULTP_PATH.'blocks/template/filter.php';
2205 - }
2206 -
2207 - // Navigation
2208 - if($attr['paginationShow'] && ($attr['paginationType'] == 'navigation') && ($attr['navPosition'] == 'topRight')) {
2209 - include ULTP_PATH.'blocks/template/navigation-before.php';
2210 - }
2211 - $wraper_before .= '</div>';
2212 - }
2213 -
2214 - $wraper_before .= '</div>';
2215 - $wraper_before .= '</div>';
2216 - }
2217 - $wraper_before .= '<div class="ultp-block-items-wrap ultp-block-row ultp-block-column-'.json_decode(json_encode($attr['columns']), True)['lg'].'">';
2218 - $idx = $noAjax ? 1 : 0;
2219 - while ( $recent_posts->have_posts() ): $recent_posts->the_post();
2220 -
2221 - include ULTP_PATH.'blocks/template/data.php';
2222 -
2223 - include ULTP_PATH.'blocks/template/category.php';
2224 -
2225 - $post_loop .= '<div class="ultp-block-item post-id-'.$post_id.'">';
2226 - $post_loop .= '<div class="ultp-block-content-wrap">';
2227 - if( has_post_thumbnail() && $attr['showImage'] ){
2228 - $post_loop .= '<div class="ultp-block-image ultp-block-image-'.$attr['imgAnimation'].($attr["imgOverlay"] ? ' ultp-block-image-overlay ultp-block-image-'.$attr["imgOverlayType"].' ultp-block-image-'.$attr["imgOverlayType"].$idx : '' ).'">';
2229 - $post_loop .= '<a href="'.$titlelink.'" '.($attr['openInTab'] ? 'target="_blank"' : '').'>'.ultimate_post()->get_image($post_thumb_id, $attr['imgCrop'], '', $title).'</a>';
2230 - if( ($attr['catPosition'] != 'aboveTitle') && $attr['catShow'] ) {
2231 - $post_loop .= '<div class="ultp-category-img-grid">'.$category.'</div>';
2232 - }
2233 - $post_loop .= '</div>';
2234 - }
2235 - $post_loop .= '<div class="ultp-block-content">';
2236 -
2237 - // Category
2238 - if(($attr['catPosition'] == 'aboveTitle') && $attr['catShow']) {
2239 - $post_loop .= $category;
2240 - }
2241 -
2242 - // Title
2243 - if ($title && $attr['titleShow'] && $attr['titlePosition'] == 1) {
2244 - include ULTP_PATH.'blocks/template/title.php';
2245 - }
2246 -
2247 - // Meta
2248 - if( $attr['metaPosition'] =='top' ) {
2249 - include ULTP_PATH.'blocks/template/meta.php';
2250 - }
2251 -
2252 - // Title
2253 - if ($title && $attr['titleShow'] && $attr['titlePosition'] == 0) {
2254 - include ULTP_PATH.'blocks/template/title.php';
2255 - }
2256 -
2257 - // Excerpt
2258 - if( $attr['excerptShow'] ) {
2259 - $post_loop .= '<div class="ultp-block-excerpt">'.ultimate_post()->excerpt($post_id, $attr['excerptLimit']).'</div>';
2260 - }
2261 -
2262 - // Read More
2263 - if ( $attr['readMore'] ) {
2264 - $post_loop .= '<div class="ultp-block-readmore"><a href="'.$titlelink.'" '.($attr['openInTab'] ? 'target="_blank"' : '').'>'.($attr['readMoreText'] ? $attr['readMoreText'] : __( "Read More", "ultimate-post" )).ultimate_post()->svg_icon($attr['readMoreIcon']).'</a></div>';
2265 - }
2266 -
2267 - // Meta
2268 - if( $attr['metaPosition'] =='bottom' ) {
2269 - include ULTP_PATH.'blocks/template/meta.php';
2270 - }
2271 -
2272 - $post_loop .= '</div>';
2273 - $post_loop .= '</div>';
2274 - $post_loop .= '</div>';
2275 - $idx ++;
2276 - endwhile;
2277 -
2278 - if($attr['paginationShow'] && ($attr['paginationType'] == 'loadMore')) {
2279 - $wraper_after .= '<span class="ultp-loadmore-insert-before"></span>';
2280 - }
2281 -
2282 - $wraper_after .= '</div>';//ultp-block-items-wrap
2283 -
2284 - // Load More
2285 - if ($attr['paginationShow'] && ($attr['paginationType'] == 'loadMore')) {
2286 - include ULTP_PATH.'blocks/template/loadmore.php';
2287 - }
2288 -
2289 - // Navigation
2290 - if ($attr['paginationShow'] && ($attr['paginationType'] == 'navigation') && ($attr['navPosition'] != 'topRight')) {
2291 - include ULTP_PATH.'blocks/template/navigation-after.php';
2292 - }
2293 -
2294 - // Pagination
2295 - if ($attr['paginationShow'] && ($attr['paginationType'] == 'pagination')) {
2296 - include ULTP_PATH.'blocks/template/pagination.php';
2297 - }
2298 -
2299 - $wraper_after .= '</div>';
2300 - $wraper_after .= '</div>';
2301 -
2302 - wp_reset_query();
2303 - }
2304 -
2305 - return $noAjax ? $post_loop : $wraper_before.$post_loop.$wraper_after;
2306 - }
2307 -
2308 -}
178 + return $noAjax ? $post_loop : $wraper_before . $post_loop . $wraper_after;
179 + }
180 +}