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

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

219 lines 4.7 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 use ABlocks\Controls\Typography;
7 use ABlocks\Controls\Border;
8 use ABlocks\Controls\Dimensions;
9 use ABlocks\Controls\Range;
10 use ABlocks\Controls\Alignment;
11 use ABlocks\Controls\BoxShadow;
12 $attributes = [
13 'block_id' => [
14 'type' => 'string',
15 ],
16 'filterList' => [
17 'type' => 'array',
18 'default' => [
19 [
20 'id' => 0,
21 'text' => 'All',
22 'isActive' => true
23 ],
24 [
25 'id' => 1,
26 'text' => 'Item 01',
27 'isActive' => false
28 ],
29 ],
30 ],
31 'filterableCardsNumbers' => [
32 'type' => 'number',
33 'default' => '5'
34 ],
35 'animation' => [
36 'type' => 'string',
37 'default' => 'fade-in'
38 ],
39 'enableFilter' => [
40 'type' => 'boolean',
41 'default' => true
42 ],
43 'layout' => [
44 'type' => 'string',
45 'default' => 'filter'
46 ],
47 'searchNotFoundText' => [
48 'type' => 'string',
49 'default' => 'No items Found'
50 ],
51 'filterButtonColor' => [
52 'type' => 'string',
53 'default' => ''
54 ],
55 'filterButtonColorH' => [
56 'type' => 'string',
57 'default' => ''
58 ],
59 'filterButtonBackground' => [
60 'type' => 'string',
61 'default' => ''
62 ],
63 'filterButtonBackgroundH' => [
64 'type' => 'string',
65 'default' => ''
66 ],
67 'filterButtonTransition' => [
68 'type' => 'number',
69 'default' => 0
70 ],
71 'itemShows' => [
72 'type' => 'number',
73 'default' => 6,
74 ],
75 'gridStyle' => [
76 'type' => 'string',
77 'default' => 'grid'
78 ],
79 'searchMenuColor' => [
80 'type' => 'string',
81 'default' => '',
82 ],
83 'searchMenuColorH' => [
84 'type' => 'string',
85 'default' => '',
86 ],
87 'searchMenuBackground' => [
88 'type' => 'string',
89 'default' => '',
90 ],
91 'searchMenuBackgroundH' => [
92 'type' => 'string',
93 'default' => '',
94 ],
95 'searchMenuTransition' => [
96 'type' => 'string',
97 'default' => ''
98 ],
99
100 'searchPlaceHolder' => [
101 'type' => 'string',
102 'default' => 'Search...'
103 ],
104 'gridColumns' => [
105 'type' => 'number',
106 'default' => 2,
107 ],
108 'cardHeight' => [
109 'type' => 'number'
110 ],
111 'activeClassColor' => [
112 'type' => 'string',
113 'default' => '#fff'
114 ],
115 'activeClassBackground' => [
116 'type' => 'string',
117 'default' => '#13191B'
118
119 ],
120 // button style load more
121 'moreButtonAlignment' => [
122 'type' => 'string',
123 'default' => 'center'
124 ],
125 'loadMoreButton' => [
126 'type' => 'boolean',
127 'default' => false
128 ],
129 'loadMoreButtonText' => [
130 'type' => 'string',
131 'default' => 'Show More',
132 ],
133 'loadMoreButtonTextColor' => [
134 'type' => 'string',
135 'default' => '#fff',
136 'copyStyle' => true,
137 ],
138 'loadMoreButtonTextColorH' => [
139 'type' => 'string',
140 'default' => '#fff ',
141 'copyStyle' => true,
142 ],
143 'loadMoreButtonBackground' => [
144 'type' => 'string',
145 'default' => '#13191B',
146 'copyStyle' => true,
147 ],
148 'loadMoreButtonBackgroundH' => [
149 'type' => 'string',
150 'default' => '#13191B',
151 'copyStyle' => true,
152 ],
153 'loadMoreButtonTransition' => [
154 'type' => 'number',
155 'default' => '',
156 'copyStyle' => true,
157 ],
158 'dataPerPageShow' => [
159 'type' => 'number',
160 'default' => '6'
161 ],
162 'noMoreItemsText' => [
163 'type' => 'string',
164 'default' => 'No More Items !'
165 ]
166
167
168 ];
169
170 $attributes = array_merge(
171 $attributes,
172 Typography::get_attribute( 'filterButtonTypography', true ),
173 Border::get_attribute( 'filterButtonBorder', true ),
174 Border::get_attribute( 'activeClassBorder', true ),
175 Dimensions::get_attribute( 'filterButtonPadding', false ),
176 Dimensions::get_attribute( 'filterButtonMargin', false ),
177 Border::get_attribute( 'searchMenuBorder', true ),
178 Dimensions::get_attribute( 'searchMenuPadding', false ),
179 Dimensions::get_attribute( 'searchMenuMargin', false ),
180 Alignment::get_attribute( 'filterAlignment', true, [ 'value' => 'Center' ] ),
181 Range::get_attribute([
182 'attributeName' => 'filterButtonGap',
183 'attributeObjectKey' => 'value',
184 'isResponsive' => true,
185 'defaultValue' => 8,
186 'hasUnit' => false,
187 'unitDefaultValue' => 'px',
188 ]),
189 Range::get_attribute([
190 'attributeName' => 'loadMoreButtonGap',
191 'attributeObjectKey' => 'value',
192 'isResponsive' => true,
193 'defaultValue' => '',
194 'hasUnit' => false,
195 'unitDefaultValue' => 'px',
196 ]),
197 Range::get_attribute([
198 'attributeName' => 'itemGap',
199 'attributeObjectKey' => 'value',
200 'isResponsive' => true,
201 'defaultValue' => 10,
202 'hasUnit' => false,
203 'unitDefaultValue' => 'px',
204 ]),
205 Range::get_attribute( [
206 'attributeName' => 'animationDuration',
207 'isResponsive' => false,
208 'defaultValue' => 700,
209 ] ),
210 // button style
211 Border::get_attribute( 'moreButtonBorder', true ),
212 Dimensions::get_attribute( 'moreButtonPadding', true ),
213 Typography::get_attribute( 'moreButtonTypography', true ),
214 Alignment::get_attribute( 'position', true, [ 'value' => 'left' ] ),
215 Alignment::get_attribute( 'alignment', true, [ 'value' => 'left' ] ),
216 BoxShadow::get_attribute( 'moreButtonboxShadow', true ),
217 );
218 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
219