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

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

142 lines 2.9 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\TextShadow;
8 use ABlocks\Controls\Typography;
9 use ABlocks\Controls\Range;
10 use ABlocks\Controls\Dimensions;
11 use ABlocks\Controls\Icon;
12 use ABlocks\Components\ButtonGroup;
13 $attributes = [
14 'block_id' => [
15 'type' => 'string',
16 'default' => '',
17 ],
18 'isShowIcon' => [
19 'type' => 'boolean',
20 'default' => true,
21 ],
22 'mediaPosition' => [
23 'type' => 'string',
24 'default' => 'top',
25 ],
26 'startNumber' => [
27 'type' => 'number',
28 'default' => 0,
29 ],
30 'endNumber' => [
31 'type' => 'number',
32 'default' => 80,
33 ],
34 'totalNumber' => [
35 'type' => 'number',
36 'default' => 100,
37 ],
38
39 'animationRepeat' => [
40 'type' => 'boolean',
41 'default' => false,
42 ],
43 'counterPrefix' => [
44 'type' => 'string',
45 'default' => '',
46 ],
47 'counterSuffix' => [
48 'type' => 'string',
49 'default' => '%',
50 ],
51 'separator' => [
52 'type' => 'string',
53 'default' => ',',
54 ],
55 'counterTitle' => [
56 'type' => 'string',
57 'default' => 'Enter your title',
58 ],
59 'numberColor' => [
60 'type' => 'string',
61 'default' => 'black',
62 ],
63 'headingColor' => [
64 'type' => 'string',
65 'default' => '#4B4F58',
66 ],
67 'circleProgressColor' => [
68 'type' => 'string',
69 'default' => 'black',
70 ],
71 'circleBackgroundColor' => [
72 'type' => 'string',
73 'default' => '#dadada',
74 ],
75 'barProgressColor' => [
76 'type' => 'string',
77 'default' => 'black',
78 ],
79 'barBackgroundColor' => [
80 'type' => 'string',
81 'default' => '#dadada',
82 ],
83 'barHeadingPosition' => [
84 'type' => 'string',
85 'default' => 'top'
86 ],
87
88 ];
89 $attributes = array_merge(
90 Dimensions::get_attribute( 'numberMargin', true ),
91 Dimensions::get_attribute( 'headingMargin', true ),
92 Alignment::get_attribute( 'alignment', true, [ 'value' => 'center' ] ),
93 Typography::get_attribute( 'numberTypography', true ),
94 Typography::get_attribute( 'headingTypography', true ),
95 ButtonGroup::get_attribute( 'layout', false, [
96 'value' => 'number',
97 ] ),
98 Range::get_attribute( [
99 'attributeName' => 'duration',
100 'isResponsive' => false,
101 'defaultValue' => 1000,
102 ] ),
103 Range::get_attribute( [
104 'attributeName' => 'decimalPlaces',
105 'isResponsive' => false,
106 'defaultValue' => 0,
107 ] ),
108 Range::get_attribute( [
109 'attributeName' => 'circleSize',
110 'isResponsive' => false,
111 'defaultValue' => 220,
112 ] ),
113 Range::get_attribute( [
114 'attributeName' => 'circleStrokeSize',
115 'isResponsive' => false,
116 'defaultValue' => 20,
117 ]),
118 Range::get_attribute( [
119 'attributeName' => 'barSize',
120 'isResponsive' => true,
121 'defaultValue' => 30,
122 'hasUnit' => true,
123 'unitDefaultValue' => 'px',
124 'copyStyle' => true,
125 ] ),
126 Range::get_attribute( [
127 'attributeName' => 'iconSize',
128 'isResponsive' => true,
129 'attributeObjectKey' => 'value',
130 'defaultValue' => 30,
131 ]),
132 Range::get_attribute( [
133 'attributeName' => 'iconRotate',
134 'isResponsive' => false,
135 'defaultValue' => 0,
136 ]),
137 Icon::get_attribute(),
138 $attributes
139 );
140 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
141
142