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