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 / carousel / attributes.php

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

186 lines 4.5 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\Range;
4 use ABlocks\Controls\Icon;
5 use ABlocks\Controls\Border;
6 use ABlocks\Components\ButtonGroup;
7 use ABlocks\Controls\Dimensions;
8 $attributes = [
9 'block_id' => [
10 'type' => 'string',
11 'default' => ''
12 ],
13 'effect' => [
14 'type' => 'string',
15 'default' => 'slide'
16 ],
17 'reverseDirection' => [
18 'type' => 'boolean',
19 'default' => true
20 ],
21 'carouselSlideLength' => [
22 'type' => 'number',
23 'default' => 1
24 ],
25 'isLoop' => [
26 'type' => 'boolean',
27 'default' => false
28 ],
29 'autoplay' => [
30 'type' => 'boolean',
31 'default' => true
32 ],
33 'autoPlayReverse' => [
34 'type' => 'boolean',
35 'default' => false
36 ],
37 'autoplayDelay' => [
38 'type' => 'number',
39 'default' => 3000
40 ],
41 'autoplayProgress' => [
42 'type' => 'boolean',
43 'default' => true
44 ],
45 'autoplayPauseOnHover' => [
46 'type' => 'boolean',
47 'default' => true
48 ],
49 'speed' => [
50 'type' => 'number',
51 'default' => 800
52 ],
53 'pagination' => [
54 'type' => 'boolean',
55 'default' => true
56 ],
57 'paginationClickable' => [
58 'type' => 'boolean',
59 'default' => true
60 ],
61 'navigation' => [
62 'type' => 'boolean',
63 'default' => true
64 ],
65 'navigationIconColor' => [
66 'type' => 'string',
67 'default' => '#686868'
68 ],
69 'navigationIconColorH' => [
70 'type' => 'string',
71 'default' => ''
72 ],
73 'navigationIconBgColor' => [
74 'type' => 'string',
75 'default' => '#e4e4e4'
76 ],
77 'navigationIconBgColorH' => [
78 'type' => 'string',
79 'default' => ''
80 ],
81 'navigationIconTransition' => [
82 'type' => 'number',
83 'default' => '',
84 ],
85 'paginationColor' => [
86 'type' => 'string',
87 'default' => 'black',
88 ],
89 'paginationActiveColor' => [
90 'type' => 'string',
91 'default' => 'black',
92 ],
93 'grabCursor' => [
94 'type' => 'boolean',
95 'default' => true
96 ],
97 'mousewheel' => [
98 'type' => 'boolean',
99 'default' => true
100 ],
101 ];
102
103 $attributes = array_merge(
104 $attributes,
105 ButtonGroup::get_attribute( 'verticalAlignment', false, [
106 'value' => 'center',
107 ] ),
108 Border::get_attribute( 'navigationIconBorder', true ),
109 Dimensions::get_attribute( 'navigationIconPadding', true ),
110 Range::get_attribute([
111 'attributeName' => 'carouselHeight',
112 'attributeObjectKey' => 'value',
113 'isResponsive' => true,
114 'hasUnit' => true,
115 'unitDefaultValue' => 'px',
116 'defaultValue' => 300,
117 'defaultValueMobile' => 300,
118 'defaultValueTablet' => 300,
119 ]),
120 Range::get_attribute([
121 'attributeName' => 'navigationIconSize',
122 'attributeObjectKey' => 'value',
123 'isResponsive' => true,
124 'hasUnit' => true,
125 'unitDefaultValue' => 'px',
126 'defaultValue' => 35,
127 'defaultValueMobile' => 35,
128 'defaultValueTablet' => 35,
129 ]),
130 Range::get_attribute([
131 'attributeName' => 'slidesPerView',
132 'isResponsive' => true,
133 'defaultValue' => 1,
134 'defaultValueMobile' => 1,
135 'defaultValueTablet' => 1,
136 'hasUnit' => false,
137 ]),
138 Range::get_attribute([
139 'attributeName' => 'gap',
140 'isResponsive' => true,
141 'defaultValue' => 0,
142 'defaultValueMobile' => 0,
143 'defaultValueTablet' => 0,
144 'hasUnit' => false,
145 ]),
146 Range::get_attribute([
147 'attributeName' => 'navigationIconPositionY',
148 'isResponsive' => false,
149 'defaultValue' => 50,
150 'attributeObjectKey' => 'value',
151 'hasUnit' => true,
152 'unitDefaultValue' => '%',
153 'copyStyle' => true
154 ]),
155 Range::get_attribute([
156 'attributeName' => 'navigationIconPositionNextX',
157 'isResponsive' => false,
158 'defaultValue' => -3,
159 'hasUnit' => true,
160 'isResponsive' => true,
161 'unitDefaultValue' => '%',
162 ]),
163 Range::get_attribute([
164 'attributeName' => 'navigationIconPositionPrevX',
165 'isResponsive' => false,
166 'defaultValue' => -3,
167 'hasUnit' => true,
168 'unitDefaultValue' => '%',
169 ]),
170 Icon::get_attribute( 'leftIcon', [
171 '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',
172 'viewBox' => '0 0 512 512',
173 'hasNoSelectorOrSource' => true,
174 'className' => 'far fa-arrow-alt-circle-left'
175 ] ),
176 Icon::get_attribute( 'rightIcon', [
177 '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',
178 'viewBox' => '0 0 512 512',
179 'hasNoSelectorOrSource' => true,
180 'className' => 'far fa-arrow-alt-circle-right'
181 ] ),
182 );
183
184 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
185
186