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