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/progress-tracker/attributes.php +116 -0 2.7.62.13.0 View file →
@@ -1,0 +1,116 @@
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 + 'blockVersion' => [
19 + 'type' => 'number',
20 + 'default' => '',
21 + ],
22 + 'progressValue' => [
23 + 'type' => 'number',
24 + 'default' => 100,
25 + ],
26 + 'maxValue' => [
27 + 'type' => 'number',
28 + 'default' => 100,
29 + ],
30 + 'barColor' => [
31 + 'type' => 'string',
32 + 'default' => 'black',
33 + ],
34 + 'trackColor' => [
35 + 'type' => 'string',
36 + 'default' => '#e0e0e0',
37 + ],
38 + 'mediaPosition' => [
39 + 'type' => 'string',
40 + 'default' => 'top',
41 + ],
42 + 'isShowPercentage' => [
43 + 'type' => 'boolean',
44 + 'default' => true,
45 + ],
46 + 'direction' => [
47 + 'type' => 'string',
48 + 'default' => 'left',
49 + ],
50 + 'progressRelative' => [
51 + 'type' => 'string',
52 + 'default' => 'entire_page',
53 + ],
54 + 'progressRelativeSelector' => [
55 + 'type' => 'string',
56 + 'default' => '',
57 + ],
58 +
59 + // progress bar attributes
60 + 'barProgressColor' => [
61 + 'type' => 'string',
62 + 'default' => '#000000',
63 + ],
64 + 'barBackgroundColor' => [
65 + 'type' => 'string',
66 + 'default' => '#DDDDDF',
67 + ],
68 + // circle
69 + 'circleProgressColor' => [
70 + 'type' => 'string',
71 + 'default' => '#000000',
72 + ],
73 + 'circleBackgroundColor' => [
74 + 'type' => 'string',
75 + 'default' => '#dadada',
76 + ],
77 + 'circleSize' => [
78 + 'type' => 'number',
79 + 'default' => 110,
80 + ],
81 + 'circleStrokeSize' => [
82 + 'type' => 'number',
83 + 'default' => 10,
84 + ],
85 +
86 + 'contentColor' => [
87 + 'type' => 'string',
88 + 'default' => '#ffffff'
89 + ]
90 +];
91 +
92 +$attributes = array_merge(
93 + $attributes,
94 + Alignment::get_attribute( 'alignment', true, [ 'value' => 'center' ] ),
95 + Typography::get_attribute( 'contentTypography', true ),
96 + TextShadow::get_attribute( 'contentTextShadow' ),
97 + TextStroke::get_attribute( 'contentTextStroke', true ),
98 + Border::get_attribute( 'barBorder', true ),
99 + ButtonGroup::get_attribute( 'layout', false, [
100 + 'value' => 'bar',
101 + ] ),
102 + Range::get_attribute( [
103 + 'attributeName' => 'barHeightSize',
104 + 'attributeObjectKey' => 'value',
105 + 'isResponsive' => true,
106 + 'defaultValue' => 40,
107 + 'defaultValueMobile' => 30,
108 + 'defaultValueTablet' => 30,
109 + 'hasUnit' => true,
110 + 'unitDefaultValue' => 'px',
111 + ] ),
112 +);
113 +
114 +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
115 +
116 +