PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.9.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.9.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 1.1.2 All 80 releases
ablocks / includes / blocks / tabs / attributes.php

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

296 lines 6.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 use ABlocks\Controls\Typography;
8 use ABlocks\Controls\Range;
9 use ABlocks\Controls\Icon;
10 use ABlocks\Controls\Dimensions;
11 use ABlocks\Controls\Border;
12 use ABlocks\Controls\BoxShadow;
13 use ABlocks\Components\ButtonGroup;
14
15 $attributes = [
16 'block_id' => [
17 'type' => 'string',
18 'default' => '',
19 ],
20 'blockVersion' => array(
21 'type' => 'number',
22 'default' => '',
23 ),
24 'className' => [
25 'type' => 'string',
26 'default' => '',
27 ],
28 'tabIcons' => [
29 'type' => 'array',
30 'default' => []
31 ],
32 'tabIconsClasses' => [
33 'type' => 'array',
34 'default' => [],
35 ],
36 'clickedTabIndex' => [
37 'type' => 'number',
38 'default' => 0
39 ],
40 'tabMenusBackgroundColor' => [
41 'type' => 'string',
42 'default' => ''
43 ],
44 'tabPositionChange' => [
45 'type' => 'boolean',
46 'default' => false
47 ],
48 'tabHeaders' => [
49 'type' => 'array',
50 'default' => [
51 __( 'Tab 1', 'ablocks' ),
52 __( 'Tab 2', 'ablocks' ),
53 __( 'Tab 3', 'ablocks' ),
54 ]
55 ],
56 'tabSubTitles' => [
57 'type' => 'array',
58 'default' => [
59 __( 'Subtitle 1 Content: This tab provides general information about our company', 'ablocks' ),
60 __( 'Subtitle 2 Content: This tab provides general information about our company', 'ablocks' ),
61 __( 'Subtitle 3 Content: This tab provides general information about our company', 'ablocks' ),
62 ]
63 ],
64 'tabActive' => [
65 'type' => 'number',
66 'default' => 0
67 ],
68 'previousTotalBlock' => [
69 'type' => 'number',
70 'default' => 3
71 ],
72 'tabsMenuPosition' => [
73 'type' => 'string',
74 'default' => 'left',
75 ],
76 'tabsMenuPositionTablet' => [
77 'type' => 'string',
78 'default' => '',
79 ],
80 'tabsMenuPositionMobile' => [
81 'type' => 'string',
82 'default' => '',
83 ],
84 'initialOpen' => [
85 'type' => 'number',
86 'default' => 1
87 ],
88 'activeDuration' => [
89 'type' => 'number',
90 'default' => 5000
91 ],
92 'activeColorOptions' => [
93 'type' => 'string',
94 'default' => 'background'
95 ],
96 'enableHoverSwitch' => [
97 'type' => 'boolean',
98 'default' => false,
99 ],
100 'tabMenuAlign' => [
101 'type' => 'string',
102 'default' => '',
103 ],
104 'tabMenuAlignTablet' => [
105 'type' => 'string',
106 'default' => '',
107 ],
108 'tabMenuAlignMobile' => [
109 'type' => 'string',
110 'default' => '',
111 ],
112 'menuContentAlign' => [
113 'type' => 'string',
114 'default' => 'center'
115 ],
116 'menuContentAlignTablet' => [
117 'type' => 'string',
118 'default' => '',
119 ],
120 'menuContentAlignMobile' => [
121 'type' => 'string',
122 'default' => '',
123 ],
124 'tabBackgroundColor' => [
125 'type' => 'string',
126 'default' => '#F9F9F9'
127 ],
128 'contentBackgroundColor' => [
129 'type' => 'string',
130 'default' => ''
131 ],
132 'tabActiveBackgroundColor' => [
133 'type' => 'string',
134 'default' => '#61CE70'
135 ],
136 'titleTextColor' => [
137 'type' => 'string',
138 'default' => '#13191B'
139 ],
140 'titleTextActiveColor' => [
141 'type' => 'string',
142 'default' => '#0A0909'
143 ],
144 'subTitleTextColor' => [
145 'type' => 'string',
146 'default' => '#3A3A3A '
147 ],
148 'subTitleTextActiveColor' => [
149 'type' => 'string',
150 'default' => '#3A3A3A'
151 ],
152 'activeBorderColor' => [
153 'type' => 'string',
154 'default' => '#61CE70',
155 ],
156 'showTitle' => [
157 'type' => 'boolean',
158 'default' => true
159 ],
160 'showSubTitle' => [
161 'type' => 'boolean',
162 'default' => false
163 ],
164 'showActiveSubTitle' => [
165 'type' => 'boolean',
166 'default' => false
167 ],
168 'tabsChangingEffect' => [
169 'type' => 'string',
170 'default' => 'default',
171 ],
172 'showIcon' => [
173 'type' => 'boolean',
174 'default' => false
175 ],
176 'progressBarColor' => [
177 'type' => 'string',
178 'default' => '#13191B'
179 ],
180 'iconColor' => [
181 'type' => 'string',
182 'default' => '#000000'
183 ],
184 'iconActiveColor' => [
185 'type' => 'string',
186 'default' => '',
187 ],
188 'iconType' => [
189 'type' => 'string',
190 'default' => 'default'
191 ],
192 'iconShape' => [
193 'type' => 'string',
194 'default' => 'circle'
195 ],
196 'iconBackground' => [
197 'type' => 'string',
198 'default' => '#FFFFFF'
199 ],
200 'iconActiveBackground' => [
201 'type' => 'string',
202 'default' => '#E5E5EC'
203 ],
204 ];
205
206 $attributes = array_merge(
207 $attributes,
208 Range::get_attribute( [
209 'attributeName' => 'size',
210 'attributeObjectKey' => 'value',
211 'isResponsive' => true,
212 'defaultValue' => 18,
213 'hasUnit' => true,
214 'unitDefaultValue' => 'px',
215 ] ),
216 Range::get_attribute( [
217 'attributeName' => 'spacing',
218 'attributeObjectKey' => 'value',
219 'isResponsive' => true,
220 'defaultValue' => 0,
221 'hasUnit' => true,
222 'unitDefaultValue' => 'px',
223 ] ),
224 Range::get_attribute( [
225 'attributeName' => 'tabsWidth',
226 'attributeObjectKey' => 'value',
227 'isResponsive' => true,
228 'defaultValue' => 30,
229 'hasUnit' => true,
230 'unitDefaultValue' => '%',
231 ] ),
232 Range::get_attribute( [
233 'attributeName' => 'contentWidth',
234 'attributeObjectKey' => 'value',
235 'isResponsive' => true,
236 'defaultValue' => 70,
237 'hasUnit' => true,
238 'unitDefaultValue' => '%',
239 ] ),
240 Range::get_attribute( [
241 'attributeName' => 'tabsGap',
242 'attributeObjectKey' => 'value',
243 'isResponsive' => true,
244 'defaultValue' => 10,
245 'hasUnit' => true,
246 'unitDefaultValue' => 'px',
247 ] ),
248 Range::get_attribute( [
249 'attributeName' => 'contentGap',
250 'attributeObjectKey' => 'value',
251 'isResponsive' => true,
252 'defaultValue' => 10,
253 'hasUnit' => true,
254 'unitDefaultValue' => 'px',
255 ] ),
256 Icon::get_attribute( 'icon' ),
257 ButtonGroup::get_attribute( 'iconPosition', true, [
258 'value' => 'left',
259 ] ),
260 ButtonGroup::get_attribute( 'tabsMenuPositioning', true, [
261 'value' => 'left',
262 ] ),
263 ButtonGroup::get_attribute( 'tabsMenuDirection', true, [
264 'value' => 'row',
265 ] ),
266 ButtonGroup::get_attribute( 'tabsWidthType', true, [
267 'value' => 'auto',
268 ] ),
269 ButtonGroup::get_attribute( 'tabsContentWidthType', true, [
270 'value' => 'auto',
271 ] ),
272 ButtonGroup::get_attribute( 'tabWrap', true, [
273 'value' => 'wrap',
274 ] ),
275 ButtonGroup::get_attribute( 'tabMenuAlignment', true, [
276 'value' => 'center',
277 ] ),
278 ButtonGroup::get_attribute( 'menuContentAlignment', true, [
279 'value' => 'center',
280 ] ),
281 Dimensions::get_attribute( 'tabMenusMargin', true ),
282 Dimensions::get_attribute( 'tabMenusPadding', true ),
283 Border::get_attribute( 'tabMenusBorder', true ),
284 Dimensions::get_attribute( 'contentMargin', true ),
285 Dimensions::get_attribute( 'iconPositionMargin', true ),
286 Typography::get_attribute( 'titleTypography', true ),
287 Typography::get_attribute( 'subTitleTypography', true ),
288 Dimensions::get_attribute( 'menuContentPadding', true ),
289 Dimensions::get_attribute( 'contentPadding', true ),
290 Border::get_attribute( 'menuContentBorder', true ),
291 Border::get_attribute( 'contentBorder', true ),
292 BoxShadow::get_attribute( 'boxShadow', true ),
293 );
294
295 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
296