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