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