PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 4.0.7
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v4.0.7
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
post-carousel / blocks / includes / smart-image / attributes.php

attributes.php in Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News 4.0.7, at blocks/includes/smart-image/attributes.php

560 lines 15.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Smart image block attributes file for Smart Post Show Blocks.
4 *
5 * @package Smart_Post_Show_Pro
6 * @subpackage Smart_Post_Show_Pro/blocks/includes
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 die;
11 }
12
13 return array(
14 'isPreview' => array(
15 'type' => 'boolean',
16 'default' => false,
17 ),
18 'blockName' => array(
19 'type' => 'string',
20 'default' => '',
21 ),
22 'uniqueId' => array(
23 'type' => 'string',
24 'default' => '',
25 ),
26 'fontLists' => array(
27 'type' => 'string',
28 'default' => '',
29 ),
30 'fontListsEditPage' => array(
31 'type' => 'string',
32 'default' => '',
33 ),
34 'customCss' => array(
35 'type' => 'string',
36 'default' => '',
37 ),
38 'selectImageSizes' => array(
39 'type' => 'array',
40 'default' => array(),
41 ),
42 'selectImage' => array(
43 'type' => 'object',
44 'default' => array(),
45 ),
46 'selectImageId' => array(
47 'type' => 'number',
48 'default' => '',
49 ),
50 'imageSize' => array(
51 'type' => 'string',
52 'default' => 'full',
53 ),
54 'aspectRatio' => array(
55 'type' => 'string',
56 'default' => 'original',
57 ),
58 'maxWidth' => $this->ranger_attribute( '', '', '', '%' ),
59 'smartImageWidth' => $this->ranger_attribute( '', '', '', 'px' ),
60 'smartImageHeight' => $this->ranger_attribute( '', '', '', 'px' ),
61 'imageZoom' => $this->ranger_attribute( 1.1, '', '', false ),
62 'imageFocalPoint' => array(
63 'type' => 'object',
64 'default' => array(
65 'x' => 0.5,
66 'y' => 0.5,
67 ),
68 ),
69 'enableLink' => array(
70 'type' => 'boolean',
71 'default' => false,
72 ),
73 'linkType' => array(
74 'type' => 'string',
75 'default' => 'full-img',
76 ),
77 'linkUrl' => array(
78 'type' => 'string',
79 'default' => '',
80 ),
81 'openInTab' => array(
82 'type' => 'boolean',
83 'default' => false,
84 ),
85 'buttonLabel' => array(
86 'type' => 'string',
87 'default' => 'View Details',
88 ),
89 'buttonPosition' => array(
90 'type' => 'string',
91 'default' => 'center-center',
92 ),
93 'imageAltText' => array(
94 'type' => 'string',
95 'default' => '',
96 ),
97 'doubleResolutionRetina' => array(
98 'type' => 'boolean',
99 'default' => false,
100 ),
101 'lazyLoad' => array(
102 'type' => 'boolean',
103 'default' => false,
104 ),
105 'imageBorder' => array(
106 'type' => 'object',
107 'default' => array(
108 'style' => 'none',
109 'color' => '#ddd',
110 'hoverColor' => '#ddd',
111 ),
112 ),
113 'imageBorderWidth' => $this->spacing_attribute( 1, 1, 1, 1, 'px', true ),
114 'imageBorderRadius' => $this->spacing_attribute( '', '', '', '', 'px', true ),
115 'imageBoxShadowEnable' => array(
116 'type' => 'boolean',
117 'default' => false,
118 ),
119 'imageBoxShadow' => array(
120 'type' => 'object',
121 'default' => array(
122 'device' => array(
123 'Desktop' => array(
124 'top' => '',
125 'right' => '',
126 'bottom' => '',
127 'left' => '',
128 ),
129 'Tablet' => array(
130 'top' => '',
131 'right' => '',
132 'bottom' => '',
133 'left' => '',
134 ),
135 'Mobile' => array(
136 'top' => '',
137 'right' => '',
138 'bottom' => '',
139 'left' => '',
140 ),
141 ),
142 'unit' => array(
143 'Desktop' => 'outset',
144 'Tablet' => 'outset',
145 'Mobile' => 'outset',
146 ),
147 'color' => '#F2F2F2',
148 'selectDefault' => 'var(--smart-post-shadow-medium-4dp)',
149 ),
150 ),
151 'imageFilter' => array(
152 'type' => 'boolean',
153 'default' => false,
154 ),
155 'imageBlur' => $this->ranger_attribute( '', '', '', false ),
156 'imageBrightness' => $this->ranger_attribute( '', '', '', false ),
157 'imageContrast' => $this->ranger_attribute( '', '', '', false ),
158 'imageSaturation' => $this->ranger_attribute( '', '', '', false ),
159 'imageHue' => $this->ranger_attribute( '', '', '', false ),
160 'linkBtnTypography' => array(
161 'type' => 'object',
162 'default' => array(
163 'googleFont' => array(
164 'family' => 'Default',
165 'variants' => array( '300', '400', '500', '600', '700', '800' ),
166 ),
167 'typography' => array(
168 'family' => '',
169 'fontWeight' => '600',
170 'style' => 'normal',
171 'transform' => 'capitalize',
172 'decoration' => 'none',
173 ),
174 ),
175 ),
176 'linkBtnFontSize' => $this->ranger_attribute( 19, '', '', 'px' ),
177 'linkBtnLineHeight' => array(
178 'type' => 'object',
179 'default' => array(
180 'device' => array(
181 'Desktop' => '',
182 'Tablet' => '',
183 'Mobile' => '',
184 ),
185 ),
186 ),
187 'linkBtnLetterSpacing' => $this->ranger_attribute( 0, '', '', 'px' ),
188 'linkBtnWordSpacing' => $this->ranger_attribute( '', '', '', 'px' ),
189 'linkButtonColor' => array(
190 'type' => 'object',
191 'default' => array(
192 'color' => '#FFFFFF',
193 'hover' => '',
194 ),
195 ),
196 'linkButtonBg' => array(
197 'type' => 'object',
198 'default' => array(
199 'color' => array(
200 'style' => 'bgColor',
201 'transparent' => '',
202 'solidColor' => '#1A74E4',
203 'gradient' => 'linear-gradient(162deg, rgba(128, 128, 214, 0.2) 0%, rgba(136, 169, 231, 0.2) 51%, rgba(144, 234, 228, 0.2) 100%)',
204 ),
205 'hover' => array(
206 'style' => '',
207 'transparent' => '',
208 'solidColor' => '',
209 'gradient' => 'linear-gradient(162deg, rgba(128, 128, 214, 0.2) 0%, rgba(136, 169, 231, 0.2) 51%, rgba(144, 234, 228, 0.2) 100%)',
210 ),
211 ),
212 ),
213 'linkButtonBorder' => array(
214 'type' => 'object',
215 'default' => array(
216 'style' => 'none',
217 'color' => '#ddd',
218 'hoverColor' => '#ddd',
219 ),
220 ),
221 'linkBtnBorderWidth' => $this->spacing_attribute( 1, 1, 1, 1, 'px', true ),
222 'linkBtnBorderWidthHover' => $this->spacing_attribute( 1, 1, 1, 1, 'px', true ),
223 'linkBtnBorderRadius' => $this->spacing_attribute( '', '', '', '', 'px', true ),
224 'linkBtnBorderRadiusHover' => $this->spacing_attribute( '', '', '', '', 'px', true ),
225 'linkBtnBoxShadowEnable' => array(
226 'type' => 'boolean',
227 'default' => false,
228 ),
229 'linkBtnBoxShadow' => array(
230 'type' => 'object',
231 'default' => array(
232 'device' => array(
233 'Desktop' => array(
234 'top' => '',
235 'right' => '',
236 'bottom' => '',
237 'left' => '',
238 ),
239 'Tablet' => array(
240 'top' => '',
241 'right' => '',
242 'bottom' => '',
243 'left' => '',
244 ),
245 'Mobile' => array(
246 'top' => '',
247 'right' => '',
248 'bottom' => '',
249 'left' => '',
250 ),
251 ),
252 'unit' => array(
253 'Desktop' => 'outset',
254 'Tablet' => 'outset',
255 'Mobile' => 'outset',
256 ),
257 'color' => '#F2F2F2',
258 'selectDefault' => 'var(--smart-post-shadow-medium-4dp)',
259 ),
260 ),
261 'linkBtnBoxShadowEnableHover' => array(
262 'type' => 'boolean',
263 'default' => false,
264 ),
265 'linkBtnBoxShadowHover' => array(
266 'type' => 'object',
267 'default' => array(
268 'device' => array(
269 'Desktop' => array(
270 'top' => '',
271 'right' => '',
272 'bottom' => '',
273 'left' => '',
274 ),
275 'Tablet' => array(
276 'top' => '',
277 'right' => '',
278 'bottom' => '',
279 'left' => '',
280 ),
281 'Mobile' => array(
282 'top' => '',
283 'right' => '',
284 'bottom' => '',
285 'left' => '',
286 ),
287 ),
288 'unit' => array(
289 'Desktop' => 'outset',
290 'Tablet' => 'outset',
291 'Mobile' => 'outset',
292 ),
293 'color' => '#F2F2F2',
294 'selectDefault' => 'var(--smart-post-shadow-medium-4dp)',
295 ),
296 ),
297 'linkBtnPadding' => $this->spacing_attribute( 12, 22, 12, 22, 'px', false ),
298 'imgMaskingEnable' => array(
299 'type' => 'boolean',
300 'default' => false,
301 ),
302 'imageShapeSet' => array(
303 'type' => 'string',
304 'default' => 'shape-set',
305 ),
306 'selectImageShape' => array(
307 'type' => 'string',
308 'default' => 'original',
309 ),
310 'maskingShapedUpload' => array(
311 'type' => 'object',
312 'default' => array(),
313 ),
314 'maskSize' => array(
315 'type' => 'string',
316 'default' => 'contain',
317 ),
318 'smartImgBgEnable' => array(
319 'type' => 'boolean',
320 'default' => false,
321 ),
322 'smartImgBg' => array(
323 'type' => 'object',
324 'default' => array(
325 'color' => array(
326 'style' => 'bgColor',
327 'solidColor' => '',
328 'gradient' => 'linear-gradient(162deg, rgba(128, 128, 214, 0.2) 0%, rgba(136, 169, 231, 0.2) 51%, rgba(144, 234, 228, 0.2) 100%)',
329 ),
330 'hover' => array(
331 'style' => '',
332 'solidColor' => '',
333 'gradient' => 'linear-gradient(162deg, rgba(128, 128, 214, 0.2) 0%, rgba(136, 169, 231, 0.2) 51%, rgba(144, 234, 228, 0.2) 100%)',
334 ),
335 ),
336 ),
337 // 'smartImgBgType' => array(
338 // 'type' => 'string',
339 // 'default' => 'image',
340 // ),
341 'smartImageBgImage' => array(
342 'type' => 'object',
343 'default' => array(),
344 ),
345 'smartImgOverlayType' => array(
346 'type' => 'string',
347 'default' => 'custom',
348 ),
349 'smartImgOverlayColor' => array(
350 'type' => 'object',
351 'default' => array(
352 'color' => '',
353 'hover' => '',
354 ),
355 ),
356 'smartBgImgOverlayBlandMode' => array(
357 'type' => 'string',
358 'default' => 'normal',
359 ),
360 'smartBgImgBlur' => $this->ranger_attribute( 2.5, '', '', false ),
361 'smartBgImgOverlayBlandModeHover' => array(
362 'type' => 'string',
363 'default' => 'normal',
364 ),
365 'smartBgImgBlurHover' => $this->ranger_attribute( 5, '', '', false ),
366 'smartBgImgBorder' => array(
367 'type' => 'object',
368 'default' => array(
369 'style' => 'none',
370 'color' => '#ddd',
371 'hoverColor' => '#ddd',
372 ),
373 ),
374 'smartBgImgBorderWidth' => $this->spacing_attribute( '', '', '', '', 'px', true ),
375 // 'smartBgImgBorderRadius' => array(
376 // 'type' => 'object',
377 // 'default' => array(
378 // 'top' => '',
379 // 'right' => '',
380 // 'bottom' => '',
381 // 'left' => '',
382 // 'unit' => 'px',
383 // 'allChange' => true,
384 // ),
385 // ),
386 'smartBgImgBorderRadius' => array(
387 'type' => 'object',
388 'default' => array(
389 'value' => array(
390 'top' => '',
391 'right' => '',
392 'bottom' => '',
393 'left' => '',
394 ),
395 'unit' => 'px',
396 'allChange' => true,
397 ),
398 ),
399 'smartBgFixImage' => array(
400 'type' => 'boolean',
401 'default' => false,
402 ),
403 'smartBgImgInnerPadding' => $this->spacing_attribute( 0, 0, 0, 0, 'px', false ),
404 'imgTitleEnable' => array(
405 'type' => 'boolean',
406 'default' => false,
407 ),
408 'imgTitleLabel' => array(
409 'type' => 'string',
410 'default' => '',
411 ),
412 'imgTitleTypography' => array(
413 'type' => 'object',
414 'default' => array(
415 'googleFont' => array(
416 'family' => 'Default',
417 'variants' => array( '300', '400', '500', '600', '700', '800' ),
418 ),
419 'typography' => array(
420 'family' => '',
421 'fontWeight' => '600',
422 'style' => 'normal',
423 'transform' => 'capitalize',
424 'decoration' => 'none',
425 ),
426 ),
427 ),
428 'imgTitleFontSize' => $this->ranger_attribute( 16, '', '', 'px' ),
429 'imgTitleLineHeight' => array(
430 'type' => 'object',
431 'default' => array(
432 'device' => array(
433 'Desktop' => '',
434 'Tablet' => '',
435 'Mobile' => '',
436 ),
437 ),
438 ),
439 'imgTitleLetterSpacing' => $this->ranger_attribute( 0, '', '', 'px' ),
440 'imgTitleWordSpacing' => $this->ranger_attribute( 4, '', '', 'px' ),
441 'imgCaptionEnable' => array(
442 'type' => 'boolean',
443 'default' => false,
444 ),
445 'imgCaptionLabel' => array(
446 'type' => 'string',
447 'default' => '',
448 ),
449 'imgCaptionTypography' => array(
450 'type' => 'object',
451 'default' => array(
452 'googleFont' => array(
453 'family' => 'Default',
454 'variants' => array( '300', '400', '500', '600', '700', '800' ),
455 ),
456 'typography' => array(
457 'family' => '',
458 'fontWeight' => '400',
459 'style' => 'normal',
460 'transform' => 'capitalize',
461 'decoration' => 'none',
462 ),
463 ),
464 ),
465 'imgCapFontSize' => $this->ranger_attribute( 16, '', '', 'px' ),
466 'imgCapLineHeight' => array(
467 'type' => 'object',
468 'default' => array(
469 'device' => array(
470 'Desktop' => '',
471 'Tablet' => '',
472 'Mobile' => '',
473 ),
474 ),
475 ),
476 'imgCapLetterSpacing' => $this->ranger_attribute( 0, '', '', 'px' ),
477 'imgCapWordSpacing' => $this->ranger_attribute( 4, '', '', 'px' ),
478 'imgTextVisibility' => array(
479 'type' => 'string',
480 'default' => 'show-always',
481 ),
482 'imgTextColor' => array(
483 'type' => 'object',
484 'default' => array(
485 'color' => '',
486 'hover' => '',
487 ),
488 ),
489 'imgTextPosition' => array(
490 'type' => 'string',
491 'default' => 'bottom',
492 ),
493 'imgTextHorizontal' => array(
494 'type' => 'string',
495 'default' => 'center',
496 ),
497 'imgTextVertical' => array(
498 'type' => 'string',
499 'default' => 'bottom',
500 ),
501 'imgTextPadding' => $this->spacing_attribute( 20, 20, 20, 20, 'px', false ),
502 'imgAnimationEffect' => array(
503 'type' => 'string',
504 'default' => '',
505 ),
506 'imgAnimationSpeed' => $this->ranger_attribute( 0.5, '', '', 's' ),
507 'imgAnimationLineWidth' => $this->ranger_attribute( 2, '', '', 'px' ),
508 'imgAnimationNormal' => array(
509 'type' => 'string',
510 'default' => 'zoom-in',
511 ),
512 'imgHoverOverlayEnable' => array(
513 'type' => 'boolean',
514 'default' => false,
515 ),
516 'imgHoverOverlayColor' => array(
517 'type' => 'object',
518 'default' => array(
519 'color' => array(
520 'style' => 'bgColor',
521 'solidColor' => '',
522 'gradient' => 'linear-gradient(162deg, rgba(128, 128, 214, 0.2) 0%, rgba(136, 169, 231, 0.2) 51%, rgba(144, 234, 228, 0.2) 100%)',
523 ),
524 'hover' => array(
525 'style' => '',
526 'solidColor' => '',
527 'gradient' => 'linear-gradient(162deg, rgba(128, 128, 214, 0.2) 0%, rgba(136, 169, 231, 0.2) 51%, rgba(144, 234, 228, 0.2) 100%)',
528 ),
529 ),
530 ),
531 'additionalCssClass' => array(
532 'type' => 'string',
533 'default' => '',
534 ),
535 'hideOnDesktop' => array(
536 'type' => 'boolean',
537 'default' => false,
538 ),
539 'hideOnTablet' => array(
540 'type' => 'boolean',
541 'default' => false,
542 ),
543 'hideOnMobile' => array(
544 'type' => 'boolean',
545 'default' => false,
546 ),
547 'generateImgPrompt' => array(
548 'type' => 'string',
549 'default' => '',
550 ),
551 'imgHoverEffectOpacity' => array(
552 'type' => 'number',
553 'default' => 0.6,
554 ),
555 'imgAlignment' => array(
556 'type' => 'string',
557 'default' => 'left',
558 ),
559 );
560