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