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

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

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