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

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

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