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