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