PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.14.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.14.0
2.14.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 All 81 releases
← All changes | includes/blocks/counter/attributes.php +145 -0 1.0 → 2.14.0 View file →
@@ -1,0 +1,145 @@
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 + 'blockVersion' => [
19 + 'type' => 'number',
20 + 'default' => '',
21 + ],
22 + 'isShowIcon' => [
23 + 'type' => 'boolean',
24 + 'default' => true,
25 + ],
26 + 'mediaPosition' => [
27 + 'type' => 'string',
28 + 'default' => 'top',
29 + ],
30 + 'startNumber' => [
31 + 'type' => 'number',
32 + 'default' => 0,
33 + ],
34 + 'endNumber' => [
35 + 'type' => 'number',
36 + 'default' => 80,
37 + ],
38 + 'totalNumber' => [
39 + 'type' => 'number',
40 + 'default' => 100,
41 + ],
42 +
43 + 'animationRepeat' => [
44 + 'type' => 'boolean',
45 + 'default' => false,
46 + ],
47 + 'counterPrefix' => [
48 + 'type' => 'string',
49 + 'default' => '',
50 + ],
51 + 'counterSuffix' => [
52 + 'type' => 'string',
53 + 'default' => '%',
54 + ],
55 + 'separator' => [
56 + 'type' => 'string',
57 + 'default' => ',',
58 + ],
59 + 'counterTitle' => [
60 + 'type' => 'string',
61 + 'default' => 'Enter your title',
62 + ],
63 + 'numberColor' => [
64 + 'type' => 'string',
65 + 'default' => '#08fd00ff',
66 + ],
67 + 'headingColor' => [
68 + 'type' => 'string',
69 + 'default' => '#4B4F58',
70 + ],
71 + 'circleProgressColor' => [
72 + 'type' => 'string',
73 + 'default' => 'black',
74 + ],
75 + 'circleBackgroundColor' => [
76 + 'type' => 'string',
77 + 'default' => '#dadada',
78 + ],
79 + 'barProgressColor' => [
80 + 'type' => 'string',
81 + 'default' => 'black',
82 + ],
83 + 'barBackgroundColor' => [
84 + 'type' => 'string',
85 + 'default' => '#dadada',
86 + ],
87 + 'barHeadingPosition' => [
88 + 'type' => 'string',
89 + 'default' => 'top'
90 + ],
91 +
92 +];
93 +$attributes = array_merge(
94 + Dimensions::get_attribute( 'numberMargin', true ),
95 + Dimensions::get_attribute( 'headingMargin', true ),
96 + Alignment::get_attribute( 'alignment', true, [ 'value' => 'center' ] ),
97 + Typography::get_attribute( 'numberTypography', true ),
98 + Typography::get_attribute( 'headingTypography', true ),
99 + ButtonGroup::get_attribute( 'layout', false, [
100 + 'value' => 'number',
101 + ] ),
102 + Range::get_attribute( [
103 + 'attributeName' => 'duration',
104 + 'isResponsive' => false,
105 + 'defaultValue' => 1000,
106 + ] ),
107 + Range::get_attribute( [
108 + 'attributeName' => 'decimalPlaces',
109 + 'isResponsive' => false,
110 + 'defaultValue' => 0,
111 + ] ),
112 + Range::get_attribute( [
113 + 'attributeName' => 'circleSize',
114 + 'isResponsive' => false,
115 + 'defaultValue' => 220,
116 + ] ),
117 + Range::get_attribute( [
118 + 'attributeName' => 'circleStrokeSize',
119 + 'isResponsive' => false,
120 + 'defaultValue' => 20,
121 + ]),
122 + Range::get_attribute( [
123 + 'attributeName' => 'barSize',
124 + 'isResponsive' => true,
125 + 'defaultValue' => 30,
126 + 'hasUnit' => true,
127 + 'unitDefaultValue' => 'px',
128 + 'copyStyle' => true,
129 + ] ),
130 + Range::get_attribute( [
131 + 'attributeName' => 'iconSize',
132 + 'isResponsive' => true,
133 + 'attributeObjectKey' => 'value',
134 + 'defaultValue' => 30,
135 + ]),
136 + Range::get_attribute( [
137 + 'attributeName' => 'iconRotate',
138 + 'isResponsive' => false,
139 + 'defaultValue' => 0,
140 + ]),
141 + Icon::get_attribute(),
142 + $attributes
143 +);
144 +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
145 +