PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.14.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.14.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 1.1.0 1.1.1 All 81 releases
← All changes | includes/blocks/carousel/attributes.php +261 -0 2.7.7 → 2.14.0 View file →
@@ -1,0 +1,261 @@
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 + 'isLoop' => [
35 + 'type' => 'boolean',
36 + 'default' => false
37 + ],
38 + 'autoplay' => [
39 + 'type' => 'boolean',
40 + 'default' => true
41 + ],
42 + 'autoPlayReverse' => [
43 + 'type' => 'boolean',
44 + 'default' => false
45 + ],
46 + 'autoplayDelay' => [
47 + 'type' => 'number',
48 + 'default' => 3000
49 + ],
50 + 'autoplayProgress' => [
51 + 'type' => 'boolean',
52 + 'default' => true
53 + ],
54 + 'autoplayPauseOnHover' => [
55 + 'type' => 'boolean',
56 + 'default' => true
57 + ],
58 + 'speed' => [
59 + 'type' => 'number',
60 + 'default' => 800
61 + ],
62 + 'paginationType' => [
63 + 'type' => 'string',
64 + 'default' => 'default'
65 + ],
66 + 'pagination' => [
67 + 'type' => 'boolean',
68 + 'default' => true
69 + ],
70 + 'paginationClickable' => [
71 + 'type' => 'boolean',
72 + 'default' => true
73 + ],
74 + 'navigation' => [
75 + 'type' => 'boolean',
76 + 'default' => true
77 + ],
78 + 'navigationIconColor' => [
79 + 'type' => 'string',
80 + 'default' => '#686868'
81 + ],
82 + 'navigationIconColorH' => [
83 + 'type' => 'string',
84 + 'default' => ''
85 + ],
86 + 'navigationIconBgColor' => [
87 + 'type' => 'string',
88 + 'default' => '#e4e4e4'
89 + ],
90 + 'navigationIconBgColorH' => [
91 + 'type' => 'string',
92 + 'default' => ''
93 + ],
94 + 'navigationIconTransition' => [
95 + 'type' => 'number',
96 + 'default' => '',
97 + ],
98 + 'paginationColor' => [
99 + 'type' => 'string',
100 + 'default' => 'black',
101 + ],
102 + 'paginationHoverColor' => [
103 + 'type' => 'string',
104 + 'default' => 'black',
105 + ],
106 + 'paginationActiveColor' => [
107 + 'type' => 'string',
108 + 'default' => 'black',
109 + ],
110 + 'paginationActiveHoverColor' => [
111 + 'type' => 'string',
112 + 'default' => 'black',
113 + ],
114 + 'grabCursor' => [
115 + 'type' => 'boolean',
116 + 'default' => true
117 + ],
118 + 'mousewheel' => [
119 + 'type' => 'boolean',
120 + 'default' => true
121 + ],
122 + 'verticalAlignment' => [
123 + 'type' => 'string',
124 + 'default' => 'center'
125 + ],
126 +];
127 +
128 +$attributes = array_merge(
129 + $attributes,
130 + ButtonGroup::get_attribute( 'verticalAlign', true, [
131 + 'value' => 'center',
132 + ] ),
133 + Border::get_attribute( 'navigationIconBorder', true ),
134 + Border::get_attribute( 'paginationBorder', true ),
135 + Border::get_attribute( 'activePaginationBorder', true ),
136 + Dimensions::get_attribute( 'navigationIconPadding', true ),
137 + BoxShadow::get_attribute( 'navigationIconBoxShadow', true ),
138 + Range::get_attribute([
139 + 'attributeName' => 'carouselHeight',
140 + 'attributeObjectKey' => 'value',
141 + 'isResponsive' => true,
142 + 'hasUnit' => true,
143 + 'unitDefaultValue' => 'px',
144 + 'defaultValue' => 300,
145 + 'defaultValueMobile' => 300,
146 + 'defaultValueTablet' => 300,
147 + ]),
148 + Range::get_attribute([
149 + 'attributeName' => 'paginationPositionX',
150 + 'isResponsive' => false,
151 + 'defaultValue' => 47,
152 + 'attributeObjectKey' => 'value',
153 + 'hasUnit' => true,
154 + 'unitDefaultValue' => '%',
155 + 'copyStyle' => true
156 + ]),
157 + Range::get_attribute([
158 + 'attributeName' => 'paginationPositionY',
159 + 'isResponsive' => false,
160 + 'defaultValue' => 100,
161 + 'hasUnit' => true,
162 + 'isResponsive' => true,
163 + 'unitDefaultValue' => '%',
164 + 'copyStyle' => true
165 + ]),
166 + Range::get_attribute([
167 + 'attributeName' => 'paginationSize',
168 + 'attributeObjectKey' => 'value',
169 + 'isResponsive' => true,
170 + 'hasUnit' => true,
171 + 'unitDefaultValue' => 'px',
172 + 'defaultValue' => 8,
173 + ]),
174 + Range::get_attribute([
175 + 'attributeName' => 'paginationHoverSize',
176 + 'attributeObjectKey' => 'value',
177 + 'isResponsive' => true,
178 + 'hasUnit' => true,
179 + 'unitDefaultValue' => 'px',
180 + 'defaultValue' => 8,
181 + ]),
182 + Range::get_attribute([
183 + 'attributeName' => 'paginationActiveSize',
184 + 'attributeObjectKey' => 'value',
185 + 'isResponsive' => true,
186 + 'hasUnit' => true,
187 + 'unitDefaultValue' => 'px',
188 + 'defaultValue' => 8,
189 + ]),
190 + Range::get_attribute([
191 + 'attributeName' => 'paginationActiveHoverSize',
192 + 'attributeObjectKey' => 'value',
193 + 'isResponsive' => true,
194 + 'hasUnit' => true,
195 + 'unitDefaultValue' => 'px',
196 + 'defaultValue' => 8,
197 + ]),
198 + Range::get_attribute([
199 + 'attributeName' => 'navigationIconSize',
200 + 'attributeObjectKey' => 'value',
201 + 'isResponsive' => true,
202 + 'hasUnit' => true,
203 + 'unitDefaultValue' => 'px',
204 + 'defaultValue' => 35,
205 + ]),
206 + Range::get_attribute([
207 + 'attributeName' => 'slidesPerView',
208 + 'isResponsive' => true,
209 + 'defaultValue' => 1,
210 + 'defaultValueMobile' => 1,
211 + 'defaultValueTablet' => 1,
212 + 'hasUnit' => false,
213 + ]),
214 + Range::get_attribute([
215 + 'attributeName' => 'gap',
216 + 'isResponsive' => true,
217 + 'defaultValue' => 0,
218 + 'defaultValueMobile' => 0,
219 + 'defaultValueTablet' => 0,
220 + 'hasUnit' => false,
221 + ]),
222 + Range::get_attribute([
223 + 'attributeName' => 'navigationIconPositionY',
224 + 'isResponsive' => true,
225 + 'defaultValue' => 50,
226 + 'attributeObjectKey' => 'value',
227 + 'hasUnit' => true,
228 + 'unitDefaultValue' => '%',
229 + 'copyStyle' => true
230 + ]),
231 + Range::get_attribute([
232 + 'attributeName' => 'navigationIconPositionNextX',
233 + 'isResponsive' => true,
234 + 'defaultValue' => -3,
235 + 'hasUnit' => true,
236 + 'isResponsive' => true,
237 + 'unitDefaultValue' => '%',
238 + ]),
239 + Range::get_attribute([
240 + 'attributeName' => 'navigationIconPositionPrevX',
241 + 'isResponsive' => true,
242 + 'defaultValue' => -3,
243 + 'hasUnit' => true,
244 + 'unitDefaultValue' => '%',
245 + ]),
246 + Icon::get_attribute( 'leftIcon', [
247 + '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',
248 + 'viewBox' => '0 0 512 512',
249 + 'hasNoSelectorOrSource' => true,
250 + 'className' => 'far fa-arrow-alt-circle-left'
251 + ] ),
252 + Icon::get_attribute( 'rightIcon', [
253 + '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',
254 + 'viewBox' => '0 0 512 512',
255 + 'hasNoSelectorOrSource' => true,
256 + 'className' => 'far fa-arrow-alt-circle-right'
257 + ] ),
258 +);
259 +
260 +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
261 +