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

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

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