PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.8.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.8.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 / countdown / attributes.php

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

240 lines 4.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit;
4 }
5
6 use ABlocks\Controls\Alignment;
7 use ABlocks\Controls\Range;
8 use ABlocks\Controls\Typography;
9 use ABlocks\Controls\BoxShadow;
10 use ABlocks\Controls\Border;
11 use ABlocks\Components\ButtonGroup;
12 use ABlocks\Controls\Dimensions;
13
14
15 $attributes = [
16 'block_id' => [
17 'type' => 'string',
18 'default' => '',
19 ],
20 'blockVersion' => [
21 'type' => 'number',
22 'default' => '',
23 ],
24 'targetTime' => [
25 'type' => 'string',
26 'default' => '',
27 ],
28 // flex direction start
29 'direction' => [
30 'type' => 'string',
31 'default' => 'row',
32 ],
33 'directionTablet' => [
34 'type' => 'string',
35 'default' => 'row',
36 ],
37 'directionMobile' => [
38 'type' => 'string',
39 'default' => 'row',
40 ],
41 // flex direction end
42 // flex 'justify content' start
43 'justify' => [
44 'type' => 'string',
45 'default' => 'center',
46 ],
47 'justifyTablet' => [
48 'type' => 'string',
49 'default' => 'center',
50 ],
51 'justifyMobile' => [
52 'type' => 'string',
53 'default' => 'center',
54 ],
55 // flex 'justify content' end
56 // flex 'align items" start
57 'align' => [
58 'type' => 'string',
59 'default' => 'stretch',
60 ],
61 'alignTablet' => [
62 'type' => 'string',
63 'default' => 'stretch',
64 ],
65 'alignMobile' => [
66 'type' => 'string',
67 'default' => 'stretch',
68 ],
69 // flex 'align items" end
70
71 // flex 'wrap" start
72 'wrap' => [
73 'type' => 'string',
74 'default' => 'wrap',
75 ],
76 'wrapTablet' => [
77 'type' => 'string',
78 'default' => 'wrap',
79 ],
80 'wrapMobile' => [
81 'type' => 'string',
82 'default' => 'wrap',
83 ],
84 'showDay' => [
85 'type' => 'boolean',
86 'default' => true,
87 ],
88 'showHour' => [
89 'type' => 'boolean',
90 'default' => true,
91 ],
92 'showMinute' => [
93 'type' => 'boolean',
94 'default' => true,
95 ],
96 'showSecond' => [
97 'type' => 'boolean',
98 'default' => true,
99 ],
100 'dayLabel' => [
101 'type' => 'string',
102 'default' => 'Days',
103 ],
104 'hourLabel' => [
105 'type' => 'string',
106 'default' => 'Hours',
107 ],
108 'minuteLabel' => [
109 'type' => 'string',
110 'default' => 'Minute',
111 ],
112 'secondLabel' => [
113 'type' => 'string',
114 'default' => 'Second',
115 ],
116 'isAction' => [
117 'type' => 'boolean',
118 'default' => true,
119 ],
120 'action' => [
121 'type' => 'string',
122 'default' => 'none',
123 ],
124 'actionMessage' => [
125 'type' => 'string',
126 'default' => 'Time Expire',
127 ],
128 'actionMessageColor' => [
129 'type' => 'string',
130 'default' => 'black',
131 ],
132 'actionRedirectURL' => [
133 'type' => 'string',
134 'default' => '',
135 ],
136 'labelPosition' => [
137 'type' => 'string',
138 'default' => 'column',
139 ],
140 'showLabels' => [
141 'type' => 'boolean',
142 'default' => true,
143 ],
144 'boxBackgroundType' => [
145 'type' => 'string',
146 'default' => 'transparent',
147 ],
148 'boxBackgroundColor' => [
149 'type' => 'string',
150 'default' => '',
151 ],
152 'labelColor' => [
153 'type' => 'string',
154 'default' => '',
155 ],
156 'labelBgColor' => [
157 'type' => 'string',
158 'default' => '',
159 ],
160 'numberColor' => [
161 'type' => 'string',
162 'default' => '',
163 ],
164 'numberBgColor' => [
165 'type' => 'string',
166 'default' => '',
167
168 ],
169 'showSeparator' => [
170 'type' => 'boolean',
171 'default' => true,
172 ],
173 'separatorColor' => [
174 'type' => 'string',
175 'default' => 'black',
176 ],
177 ];
178
179 $attributes = array_merge(
180 Alignment::get_attribute( 'alignment', true, [ 'value' => 'center' ] ),
181 BoxShadow::get_attribute( 'boxShadow', true ),
182 Border::get_attribute( 'boxBorder', true ),
183 Typography::get_attribute( 'actionMessageTypography', true ),
184 Typography::get_attribute( 'labelTypography', true ),
185 Typography::get_attribute( 'numberTypography', true ),
186 Typography::get_attribute( 'separatorTypography', true ),
187 ButtonGroup::get_attribute( 'separator', false, [
188 'value' => ':',
189 ] ),
190 ButtonGroup::get_attribute( 'orient', true, [
191 'value' => 'row',
192 ] ),
193 ButtonGroup::get_attribute( 'justificationAlign', true, [
194 'value' => 'center',
195 ] ),
196 ButtonGroup::get_attribute( 'alignment', true, [
197 'value' => 'stretch',
198 ] ),
199 ButtonGroup::get_attribute( 'wrapping', true, [
200 'value' => 'wrap',
201 ] ),
202 Range::get_attribute( [
203 'attributeName' => 'boxSize',
204 'attributeObjectKey' => 'value',
205 'isResponsive' => true,
206 'defaultValue' => 130,
207 'hasUnit' => true,
208 'unitDefaultValue' => 'px',
209 ] ),
210 Range::get_attribute( [
211 'attributeName' => 'boxRowGap',
212 'attributeObjectKey' => 'value',
213 'isResponsive' => true,
214 'defaultValue' => 0,
215 'hasUnit' => true,
216 'unitDefaultValue' => 'px',
217 ] ),
218 Range::get_attribute( [
219 'attributeName' => 'boxColumnGap',
220 'attributeObjectKey' => 'value',
221 'isResponsive' => true,
222 'defaultValue' => 0,
223 'hasUnit' => true,
224 'unitDefaultValue' => 'px',
225 ] ),
226 Range::get_attribute( [
227 'attributeName' => 'numberAndLabelGap',
228 'attributeObjectKey' => 'value',
229 'isResponsive' => true,
230 'defaultValue' => 5,
231 'hasUnit' => true,
232 'unitDefaultValue' => 'px',
233 ] ),
234 Dimensions::get_attribute( 'padding', true ),
235 $attributes
236 );
237
238 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
239
240