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

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

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