PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.13.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.13.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
← All changes | includes/blocks/countdown/attributes.php +259 -0 2.7.72.13.0 View file →
@@ -1,0 +1,259 @@
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 + 'evergreen' => [
121 + 'type' => 'boolean',
122 + 'default' => false,
123 + ],
124 + 'evergreenDays' => [
125 + 'type' => 'number',
126 + 'default' => 0,
127 + ],
128 + 'evergreenHours' => [
129 + 'type' => 'number',
130 + 'default' => 0,
131 + ],
132 + 'evergreenMinutes' => [
133 + 'type' => 'number',
134 + 'default' => 0,
135 + ],
136 + 'evergreenRestart' => [
137 + 'type' => 'boolean',
138 + 'default' => false,
139 + ],
140 + 'action' => [
141 + 'type' => 'string',
142 + 'default' => 'none',
143 + ],
144 + 'actionMessage' => [
145 + 'type' => 'string',
146 + 'default' => 'Time Expire',
147 + ],
148 + 'actionMessageColor' => [
149 + 'type' => 'string',
150 + 'default' => 'black',
151 + ],
152 + 'actionRedirectURL' => [
153 + 'type' => 'string',
154 + 'default' => '',
155 + ],
156 + 'labelPosition' => [
157 + 'type' => 'string',
158 + 'default' => 'column',
159 + ],
160 + 'showLabels' => [
161 + 'type' => 'boolean',
162 + 'default' => true,
163 + ],
164 + 'boxBackgroundType' => [
165 + 'type' => 'string',
166 + 'default' => 'transparent',
167 + ],
168 + 'boxBackgroundColor' => [
169 + 'type' => 'string',
170 + 'default' => '',
171 + ],
172 + 'labelColor' => [
173 + 'type' => 'string',
174 + 'default' => '',
175 + ],
176 + 'labelBgColor' => [
177 + 'type' => 'string',
178 + 'default' => '',
179 + ],
180 + 'numberColor' => [
181 + 'type' => 'string',
182 + 'default' => '',
183 + ],
184 + 'numberBgColor' => [
185 + 'type' => 'string',
186 + 'default' => '',
187 +
188 + ],
189 + 'showSeparator' => [
190 + 'type' => 'boolean',
191 + 'default' => true,
192 + ],
193 + 'separatorColor' => [
194 + 'type' => 'string',
195 + 'default' => 'black',
196 + ],
197 +];
198 +
199 +$attributes = array_merge(
200 + Alignment::get_attribute( 'alignment', true, [ 'value' => 'center' ] ),
201 + BoxShadow::get_attribute( 'boxShadow', true ),
202 + Border::get_attribute( 'boxBorder', true ),
203 + Typography::get_attribute( 'actionMessageTypography', true ),
204 + Typography::get_attribute( 'labelTypography', true ),
205 + Typography::get_attribute( 'numberTypography', true ),
206 + Typography::get_attribute( 'separatorTypography', true ),
207 + ButtonGroup::get_attribute( 'separator', false, [
208 + 'value' => ':',
209 + ] ),
210 + ButtonGroup::get_attribute( 'orient', true, [
211 + 'value' => 'row',
212 + ] ),
213 + ButtonGroup::get_attribute( 'justificationAlign', true, [
214 + 'value' => 'center',
215 + ] ),
216 + ButtonGroup::get_attribute( 'alignment', true, [
217 + 'value' => 'stretch',
218 + ] ),
219 + ButtonGroup::get_attribute( 'wrapping', true, [
220 + 'value' => 'wrap',
221 + ] ),
222 + Range::get_attribute( [
223 + 'attributeName' => 'boxSize',
224 + 'attributeObjectKey' => 'value',
225 + 'isResponsive' => true,
226 + 'defaultValue' => 130,
227 + 'hasUnit' => true,
228 + 'unitDefaultValue' => 'px',
229 + ] ),
230 + Range::get_attribute( [
231 + 'attributeName' => 'boxRowGap',
232 + 'attributeObjectKey' => 'value',
233 + 'isResponsive' => true,
234 + 'defaultValue' => 0,
235 + 'hasUnit' => true,
236 + 'unitDefaultValue' => 'px',
237 + ] ),
238 + Range::get_attribute( [
239 + 'attributeName' => 'boxColumnGap',
240 + 'attributeObjectKey' => 'value',
241 + 'isResponsive' => true,
242 + 'defaultValue' => 0,
243 + 'hasUnit' => true,
244 + 'unitDefaultValue' => 'px',
245 + ] ),
246 + Range::get_attribute( [
247 + 'attributeName' => 'numberAndLabelGap',
248 + 'attributeObjectKey' => 'value',
249 + 'isResponsive' => true,
250 + 'defaultValue' => 5,
251 + 'hasUnit' => true,
252 + 'unitDefaultValue' => 'px',
253 + ] ),
254 + Dimensions::get_attribute( 'padding', true ),
255 + $attributes
256 +);
257 +
258 +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
259 +