PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.9.1
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.9.1
2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 All 80 releases
ablocks / includes / blocks / image-scroll / attributes.php

attributes.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.9.1, at includes/blocks/image-scroll/attributes.php

172 lines 4.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use ABlocks\Controls\Alignment;
4 use ABlocks\Controls\Border;
5 use ABlocks\Controls\Dimensions;
6 use ABlocks\Controls\Typography;
7 use ABlocks\Controls\CssFilter;
8 use ABlocks\Controls\BoxShadow;
9 use ABlocks\Controls\Range;
10
11 $attributes = [
12 'block_id' => [
13 'type' => 'string',
14 'default' => '',
15 ],
16 'imgId' => [
17 'type' => 'string',
18 'default' => '',
19 ],
20 'imgIdTablet' => [
21 'type' => 'string',
22 'default' => '',
23 ],
24 'imgIdMobile' => [
25 'type' => 'string',
26 'default' => '',
27 ],
28 'imgUrl' => [
29 'type' => 'string',
30 'source' => 'attribute',
31 'selector' => '.ablocks-image',
32 'attribute' => 'srcset',
33 ],
34 'imgUrlTablet' => [
35 'type' => 'string',
36 'source' => 'attribute',
37 'selector' => '.ablocks-image-tablet',
38 'attribute' => 'srcset',
39 ],
40 'imgUrlMobile' => [
41 'type' => 'string',
42 'source' => 'attribute',
43 'selector' => '.ablocks-image-mobile',
44 'attribute' => 'src',
45 ],
46 'imgSize' => [
47 'type' => 'object',
48 'default' => [
49 'value' => 'large',
50 'valueTablet' => '',
51 'valueMobile' => '',
52 ],
53 ],
54 'aspectRatio' => [
55 'type' => 'object',
56 'default' => [
57 'value' => 'original',
58 'valueTablet' => '',
59 'valueMobile' => '',
60 ],
61 ],
62 'imageScrollOption' => [
63 'type' => 'object',
64 'default' => [
65 'value' => 'mouse-scroll'
66 ],
67 ],
68 'imageDataAttribute' => [
69 'type' => 'object'
70 ],
71 'widthHeightWidget' => [
72 'type' => 'object',
73 'default' => [
74 'imgNaturalWidth' => '',
75 'imgNaturalWidthTablet' => '',
76 'imgNaturalWidthMobile' => '',
77 'imgNaturalHeight' => '',
78 'imgNaturalHeightTablet' => '',
79 'imgNaturalHeightMobile' => '',
80 'width' => '',
81 'widthTablet' => '',
82 'widthMobile' => '',
83 'height' => '',
84 'heightTablet' => '',
85 'heightMobile' => '',
86 'customHeight' => false,
87 'customHeightTablet' => false,
88 'customHeightMobile' => false,
89 ],
90 ],
91 'objectFit' => [
92 'type' => 'object',
93 'default' => [
94 'value' => 'default',
95 'valueTablet' => '',
96 'valueMobile' => '',
97 ],
98 ],
99 'position' => [
100 'type' => 'string',
101 'default' => 'below',
102 ],
103 'imgAltText' => [
104 'type' => 'string',
105 'default' => '',
106 ],
107 'imgTitle' => [
108 'type' => 'string',
109 'default' => '',
110 ],
111 'showNotice' => [
112 'type' => 'boolean',
113 'default' => false
114 ],
115 'transitionTime' => [
116 'type' => 'number',
117 'default' => 3
118 ],
119 'showOverlay' => [
120 'type' => 'boolean',
121 'default' => false
122 ],
123 'showIcon' => [
124 'type' => 'boolean',
125 'default' => false
126 ],
127 'overlayColor' => [
128 'type' => 'string',
129 'default' => '#0202024C'
130 ],
131 'iconColor' => [
132 'type' => 'string',
133 'default' => ''
134 ],
135 ];
136
137 $attributes = array_merge(
138 $attributes,
139 CssFilter::get_attribute( 'cssFilter' ),
140 CssFilter::get_attribute( 'cssHoverFilter' ),
141 Alignment::get_attribute( 'alignment', true, [ 'value' => 'left' ] ),
142 Border::get_attribute( 'border', true ),
143 Dimensions::get_attribute( 'padding', true ),
144 Range::get_attribute([
145 'attributeName' => 'opacity',
146 'defaultValue' => 1
147 ]),
148 Range::get_attribute([
149 'attributeName' => 'opacityH',
150 'defaultValue' => '',
151 ]),
152 Range::get_attribute([
153 'attributeName' => 'transitionDuration',
154 'defaultValue' => 0.5,
155 ]),
156 Range::get_attribute([
157 'attributeName' => 'filterTransitionDuration',
158 'defaultValue' => 0.5,
159 ]),
160 Range::get_attribute( [
161 'attributeName' => 'iconFontSize',
162 'defaultValue' => 35,
163 ] ),
164 Range::get_attribute( [
165 'attributeName' => 'scrollHeight',
166 'defaultValue' => 300,
167 ] ),
168 );
169
170 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
171
172