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