PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.8.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.8.0
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 1.2.0 1.2.1 All 78 releases
ablocks / includes / blocks / lists / attributes.php

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

171 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use ABlocks\Controls\Alignment;
4 use ABlocks\Controls\Dimensions;
5 use ABlocks\Controls\Typography;
6 use ABlocks\Controls\Border;
7 use ABlocks\Controls\Range;
8 use ABlocks\Components\ButtonGroup;
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 $attributes = [
14 'block_id' => [
15 'type' => 'string',
16 'default' => '',
17 ],
18 'blockVersion' => array(
19 'type' => 'number',
20 'default' => '',
21 ),
22 'markerType' => [
23 'type' => 'string',
24 'default' => 'icon',
25 ],
26 'markerColor' => [
27 'type' => 'string',
28 'default' => ''
29 ],
30 'emoji' => [
31 'type' => 'string',
32 'default' => '',
33 ],
34 'iconColor' => [
35 'type' => 'string',
36 'default' => '#000000',
37 ],
38 'lists' => [
39 'type' => 'array',
40 'default' => [
41 [
42 'id' => 0,
43 'text' => '',
44 'link' => [
45 'linkDestination' => '',
46 'href' => '',
47 'lightbox' => '',
48 'linkTarget' => '',
49 'rel' => '',
50 'noFollow' => '',
51 'keyValue' => '',
52 'linkClass' => '',
53 ],
54 'iconColor' => '',
55 'textColor' => '',
56 'makerColor' => '',
57 'isOpen' => false,
58 ]
59 ]
60 ],
61 'listIconsClasses' => [
62 'type' => 'array',
63 'default' => [],
64 ],
65 'listIcons' => [
66 'type' => 'array',
67 'default' => []
68 ],
69 'iconType' => [
70 'type' => 'string',
71 'default' => 'default',
72 ],
73 'iconShape' => [
74 'type' => 'string',
75 'default' => 'circle',
76 ],
77 'iconBackground' => [
78 'type' => 'boolean',
79 'default' => false,
80 ],
81 'iconBackgroundColor' => [
82 'type' => 'string',
83 'default' => '',
84 ],
85 'textColor' => [
86 'type' => 'string',
87 'default' => '#000000',
88 ],
89 'belowItem' => [
90 'type' => 'number',
91 'default' => 0,
92 ],
93 'divider' => [
94 'type' => 'boolean',
95 'default' => false,
96 ],
97 'dividerPatternUrl' => [
98 'type' => 'string',
99 'default' => 'solid',
100 ],
101 'borderColor' => [
102 'type' => 'string',
103 'default' => '#000000',
104 ],
105 ];
106
107 $attributes = array_merge(
108 $attributes,
109 Alignment::get_attribute( 'position', true, [ 'value' => 'center' ] ),
110 Alignment::get_attribute( 'horizontalAlignment', true, [ 'value' => 'flex-start' ] ),
111 Dimensions::get_attribute( 'padding', false ),
112 Border::get_attribute( 'border', true ),
113 Typography::get_attribute( 'typography', true ),
114 ButtonGroup::get_attribute( 'verticalAlignment', false, [
115 'value' => 'flex-start',
116 ] ),
117 ButtonGroup::get_attribute( 'stack', false, [
118 'value' => 'vertical',
119 ] ),
120 Range::get_attribute([
121 'attributeName' => 'iconSize',
122 'attributeObjectKey' => 'value',
123 'isResponsive' => true,
124 'defaultValue' => 20,
125 'hasUnit' => true,
126 'unitDefaultValue' => 'px',
127 ]),
128 Range::get_attribute([
129 'attributeName' => 'markerSize',
130 'attributeObjectKey' => 'value',
131 'defaultValue' => 10,
132 'defaultValueTablet' => 10,
133 'defaultValueMobile' => 10,
134 ]),
135 Range::get_attribute([
136 'attributeName' => 'textIndent',
137 'attributeObjectKey' => 'value',
138 'isResponsive' => true,
139 'defaultValue' => 8,
140 'defaultValueTablet' => 8,
141 'defaultValueMobile' => 8,
142
143 ]),
144 Range::get_attribute([
145 'attributeName' => 'spaceBetween',
146 'attributeObjectKey' => 'value',
147 'isResponsive' => true,
148 'defaultValue' => 20,
149 'defaultValueTablet' => 20,
150 'defaultValueMobile' => 20,
151 ]),
152 Range::get_attribute([
153 'attributeName' => 'width',
154 'attributeObjectKey' => 'value',
155 'isResponsive' => true,
156 'defaultValue' => 100,
157 'hasUnit' => true,
158 'unitDefaultValue' => 'px',
159 ]),
160 Range::get_attribute([
161 'attributeName' => 'weight',
162 'attributeObjectKey' => 'value',
163 'isResponsive' => true,
164 'defaultValue' => 5,
165 'hasUnit' => true,
166 'unitDefaultValue' => 'px',
167 ]),
168 );
169 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
170
171