PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.16.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.16.0
2.16.0 2.15.0 2.14.0 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 All 83 releases
← All changes | includes/blocks/carousel/attributes.php +289 -0 2.7.5 → 2.16.0 View file →
@@ -1,0 +1,289 @@
1 +<?php
2 +
3 +if ( ! defined( 'ABSPATH' ) ) {
4 + exit;
5 +}
6 +
7 +use ABlocks\Controls\Range;
8 +use ABlocks\Controls\Icon;
9 +use ABlocks\Controls\Border;
10 +use ABlocks\Components\ButtonGroup;
11 +use ABlocks\Controls\Dimensions;
12 +use ABlocks\Controls\BoxShadow;
13 +$attributes = [
14 + 'block_id' => [
15 + 'type' => 'string',
16 + 'default' => ''
17 + ],
18 + 'blockVersion' => array(
19 + 'type' => 'number',
20 + 'default' => '',
21 + ),
22 + 'effect' => [
23 + 'type' => 'string',
24 + 'default' => 'slide'
25 + ],
26 + 'reverseDirection' => [
27 + 'type' => 'boolean',
28 + 'default' => true
29 + ],
30 + 'carouselSlideLength' => [
31 + 'type' => 'number',
32 + 'default' => 1
33 + ],
34 + 'centeredSlides' => [
35 + 'type' => 'boolean',
36 + 'default' => false
37 + ],
38 + 'isLoop' => [
39 + 'type' => 'boolean',
40 + 'default' => false
41 + ],
42 + 'autoplay' => [
43 + 'type' => 'boolean',
44 + 'default' => true
45 + ],
46 + 'autoPlayReverse' => [
47 + 'type' => 'boolean',
48 + 'default' => false
49 + ],
50 + 'autoplayDelay' => [
51 + 'type' => 'number',
52 + 'default' => 3000
53 + ],
54 + 'autoplayProgress' => [
55 + 'type' => 'boolean',
56 + 'default' => true
57 + ],
58 + 'autoplayPauseOnHover' => [
59 + 'type' => 'boolean',
60 + 'default' => true
61 + ],
62 + 'speed' => [
63 + 'type' => 'number',
64 + 'default' => 800
65 + ],
66 + 'paginationType' => [
67 + 'type' => 'string',
68 + 'default' => 'default'
69 + ],
70 + 'pagination' => [
71 + 'type' => 'boolean',
72 + 'default' => true
73 + ],
74 + 'paginationClickable' => [
75 + 'type' => 'boolean',
76 + 'default' => true
77 + ],
78 + 'navigation' => [
79 + 'type' => 'boolean',
80 + 'default' => true
81 + ],
82 + 'navigationIconColor' => [
83 + 'type' => 'string',
84 + 'default' => '#686868'
85 + ],
86 + 'navigationIconColorH' => [
87 + 'type' => 'string',
88 + 'default' => ''
89 + ],
90 + 'navigationIconBgColor' => [
91 + 'type' => 'string',
92 + 'default' => '#e4e4e4'
93 + ],
94 + 'navigationIconBgColorH' => [
95 + 'type' => 'string',
96 + 'default' => ''
97 + ],
98 + 'navigationIconTransition' => [
99 + 'type' => 'number',
100 + 'default' => '',
101 + ],
102 + 'paginationColor' => [
103 + 'type' => 'string',
104 + 'default' => 'black',
105 + ],
106 + 'paginationHoverColor' => [
107 + 'type' => 'string',
108 + 'default' => 'black',
109 + ],
110 + 'paginationActiveColor' => [
111 + 'type' => 'string',
112 + 'default' => 'black',
113 + ],
114 + 'paginationActiveHoverColor' => [
115 + 'type' => 'string',
116 + 'default' => 'black',
117 + ],
118 + 'grabCursor' => [
119 + 'type' => 'boolean',
120 + 'default' => true
121 + ],
122 + 'mousewheel' => [
123 + 'type' => 'boolean',
124 + 'default' => true
125 + ],
126 + 'verticalAlignment' => [
127 + 'type' => 'string',
128 + 'default' => 'center'
129 + ],
130 +];
131 +
132 +$attributes = array_merge(
133 + $attributes,
134 + ButtonGroup::get_attribute( 'verticalAlign', true, [
135 + 'value' => 'center',
136 + ] ),
137 + Border::get_attribute( 'navigationIconBorder', true ),
138 + Border::get_attribute( 'paginationBorder', true ),
139 + Border::get_attribute( 'activePaginationBorder', true ),
140 + Dimensions::get_attribute( 'navigationIconPadding', true ),
141 + BoxShadow::get_attribute( 'navigationIconBoxShadow', true ),
142 + Range::get_attribute([
143 + 'attributeName' => 'carouselHeight',
144 + 'attributeObjectKey' => 'value',
145 + 'isResponsive' => true,
146 + 'hasUnit' => true,
147 + 'unitDefaultValue' => 'px',
148 + 'defaultValue' => 300,
149 + 'defaultValueMobile' => 300,
150 + 'defaultValueTablet' => 300,
151 + ]),
152 + Range::get_attribute([
153 + 'attributeName' => 'paginationPositionX',
154 + 'isResponsive' => false,
155 + 'defaultValue' => 47,
156 + 'attributeObjectKey' => 'value',
157 + 'hasUnit' => true,
158 + 'unitDefaultValue' => '%',
159 + 'copyStyle' => true
160 + ]),
161 + Range::get_attribute([
162 + 'attributeName' => 'paginationPositionY',
163 + 'isResponsive' => false,
164 + 'defaultValue' => 100,
165 + 'hasUnit' => true,
166 + 'isResponsive' => true,
167 + 'unitDefaultValue' => '%',
168 + 'copyStyle' => true
169 + ]),
170 + Range::get_attribute([
171 + 'attributeName' => 'paginationSize',
172 + 'attributeObjectKey' => 'value',
173 + 'isResponsive' => true,
174 + 'hasUnit' => true,
175 + 'unitDefaultValue' => 'px',
176 + 'defaultValue' => 8,
177 + ]),
178 + Range::get_attribute([
179 + 'attributeName' => 'paginationHoverSize',
180 + 'attributeObjectKey' => 'value',
181 + 'isResponsive' => true,
182 + 'hasUnit' => true,
183 + 'unitDefaultValue' => 'px',
184 + 'defaultValue' => 8,
185 + ]),
186 + Range::get_attribute([
187 + 'attributeName' => 'paginationActiveSize',
188 + 'attributeObjectKey' => 'value',
189 + 'isResponsive' => true,
190 + 'hasUnit' => true,
191 + 'unitDefaultValue' => 'px',
192 + 'defaultValue' => 8,
193 + ]),
194 + Range::get_attribute([
195 + 'attributeName' => 'paginationActiveHoverSize',
196 + 'attributeObjectKey' => 'value',
197 + 'isResponsive' => true,
198 + 'hasUnit' => true,
199 + 'unitDefaultValue' => 'px',
200 + 'defaultValue' => 8,
201 + ]),
202 + Range::get_attribute([
203 + 'attributeName' => 'navigationIconSize',
204 + 'attributeObjectKey' => 'value',
205 + 'isResponsive' => true,
206 + 'hasUnit' => true,
207 + 'unitDefaultValue' => 'px',
208 + 'defaultValue' => 35,
209 + ]),
210 + Range::get_attribute([
211 + 'attributeName' => 'slidesPerView',
212 + 'isResponsive' => true,
213 + 'defaultValue' => 1,
214 + 'defaultValueMobile' => 1,
215 + 'defaultValueTablet' => 1,
216 + 'hasUnit' => false,
217 + ]),
218 + Range::get_attribute([
219 + 'attributeName' => 'gap',
220 + 'isResponsive' => true,
221 + 'defaultValue' => 0,
222 + 'defaultValueMobile' => 0,
223 + 'defaultValueTablet' => 0,
224 + 'hasUnit' => false,
225 + ]),
226 + Range::get_attribute([
227 + 'attributeName' => 'slidesPerGroup',
228 + 'isResponsive' => true,
229 + 'defaultValue' => 1,
230 + 'defaultValueMobile' => 1,
231 + 'defaultValueTablet' => 1,
232 + 'hasUnit' => false,
233 + ]),
234 + Range::get_attribute([
235 + 'attributeName' => 'activeSlideOffset',
236 + 'attributeObjectKey' => 'value',
237 + 'isResponsive' => true,
238 + 'hasUnit' => true,
239 + 'unitDefaultValue' => 'px',
240 + 'defaultValue' => '',
241 + ]),
242 + Range::get_attribute([
243 + 'attributeName' => 'paginationActiveWidth',
244 + 'attributeObjectKey' => 'value',
245 + 'isResponsive' => true,
246 + 'hasUnit' => true,
247 + 'unitDefaultValue' => 'px',
248 + 'defaultValue' => '',
249 + ]),
250 + Range::get_attribute([
251 + 'attributeName' => 'navigationIconPositionY',
252 + 'isResponsive' => true,
253 + 'defaultValue' => 50,
254 + 'attributeObjectKey' => 'value',
255 + 'hasUnit' => true,
256 + 'unitDefaultValue' => '%',
257 + 'copyStyle' => true
258 + ]),
259 + Range::get_attribute([
260 + 'attributeName' => 'navigationIconPositionNextX',
261 + 'isResponsive' => true,
262 + 'defaultValue' => -3,
263 + 'hasUnit' => true,
264 + 'isResponsive' => true,
265 + 'unitDefaultValue' => '%',
266 + ]),
267 + Range::get_attribute([
268 + 'attributeName' => 'navigationIconPositionPrevX',
269 + 'isResponsive' => true,
270 + 'defaultValue' => -3,
271 + 'hasUnit' => true,
272 + 'unitDefaultValue' => '%',
273 + ]),
274 + Icon::get_attribute( 'leftIcon', [
275 + 'path' => 'M8 256c0 137 111 248 248 248s248-111 248-248S393 8 256 8 8 119 8 256zm448 0c0 110.5-89.5 200-200 200S56 366.5 56 256 145.5 56 256 56s200 89.5 200 200zm-72-20v40c0 6.6-5.4 12-12 12H256v67c0 10.7-12.9 16-20.5 8.5l-99-99c-4.7-4.7-4.7-12.3 0-17l99-99c7.6-7.6 20.5-2.2 20.5 8.5v67h116c6.6 0 12 5.4 12 12z',
276 + 'viewBox' => '0 0 512 512',
277 + 'hasNoSelectorOrSource' => true,
278 + 'className' => 'far fa-arrow-alt-circle-left'
279 + ] ),
280 + Icon::get_attribute( 'rightIcon', [
281 + 'path' => 'M504 256C504 119 393 8 256 8S8 119 8 256s111 248 248 248 248-111 248-248zm-448 0c0-110.5 89.5-200 200-200s200 89.5 200 200-89.5 200-200 200S56 366.5 56 256zm72 20v-40c0-6.6 5.4-12 12-12h116v-67c0-10.7 12.9-16 20.5-8.5l99 99c4.7 4.7 4.7 12.3 0 17l-99 99c-7.6 7.6-20.5 2.2-20.5-8.5v-67H140c-6.6 0-12-5.4-12-12z',
282 + 'viewBox' => '0 0 512 512',
283 + 'hasNoSelectorOrSource' => true,
284 + 'className' => 'far fa-arrow-alt-circle-right'
285 + ] ),
286 +);
287 +
288 +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
289 +