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

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

113 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 use ABlocks\Controls\Alignment;
8 use ABlocks\Controls\TextShadow;
9 use ABlocks\Controls\TextStroke;
10 use ABlocks\Controls\Typography;
11 use ABlocks\Controls\Border;
12 use ABlocks\Controls\Range;
13 use ABlocks\Components\ButtonGroup;
14 $attributes = [
15 'block_id' => [
16 'type' => 'string',
17 ],
18 'progressValue' => [
19 'type' => 'number',
20 'default' => 100,
21 ],
22 'maxValue' => [
23 'type' => 'number',
24 'default' => 100,
25 ],
26 'barColor' => [
27 'type' => 'string',
28 'default' => 'black',
29 ],
30 'trackColor' => [
31 'type' => 'string',
32 'default' => '#e0e0e0',
33 ],
34 'mediaPosition' => [
35 'type' => 'string',
36 'default' => 'top',
37 ],
38 'isShowPercentage' => [
39 'type' => 'boolean',
40 'default' => true,
41 ],
42 'direction' => [
43 'type' => 'string',
44 'default' => 'left',
45 ],
46 'progressRelative' => [
47 'type' => 'string',
48 'default' => 'entire_page',
49 ],
50 'progressRelativeSelector' => [
51 'type' => 'string',
52 'default' => '',
53 ],
54
55 // progress bar attributes
56 'barProgressColor' => [
57 'type' => 'string',
58 'default' => '#000000',
59 ],
60 'barBackgroundColor' => [
61 'type' => 'string',
62 'default' => '#DDDDDF',
63 ],
64 // circle
65 'circleProgressColor' => [
66 'type' => 'string',
67 'default' => '#000000',
68 ],
69 'circleBackgroundColor' => [
70 'type' => 'string',
71 'default' => '#dadada',
72 ],
73 'circleSize' => [
74 'type' => 'number',
75 'default' => 110,
76 ],
77 'circleStrokeSize' => [
78 'type' => 'number',
79 'default' => 10,
80 ],
81
82 'contentColor' => [
83 'type' => 'string',
84 'default' => 'white'
85 ]
86 ];
87
88 $attributes = array_merge(
89 $attributes,
90 Alignment::get_attribute( 'alignment', true, [ 'value' => 'center' ] ),
91 Typography::get_attribute( 'contentTypography', true ),
92 TextShadow::get_attribute( 'contentTextShadow' ),
93 TextStroke::get_attribute( 'contentTextStroke', true ),
94 Border::get_attribute( 'barBorder', true ),
95 ButtonGroup::get_attribute( 'layout', false, [
96 'value' => 'bar',
97 ] ),
98 Range::get_attribute( [
99 'attributeName' => 'barHeightSize',
100 'attributeObjectKey' => 'value',
101 'isResponsive' => true,
102 'defaultValue' => 40,
103 'defaultValueMobile' => 30,
104 'defaultValueTablet' => 30,
105 'hasUnit' => true,
106 'unitDefaultValue' => 'px',
107 ] ),
108 );
109
110 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
111
112
113