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

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

172 lines 4.0 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\Border;
4 use ABlocks\Controls\Dimensions;
5 use ABlocks\Controls\Alignment;
6 use ABlocks\Controls\GroupButton;
7 use ABlocks\Controls\Range;
8 use ABlocks\Controls\Typography;
9 use ABlocks\Controls\TextShadow;
10 use ABlocks\Controls\TextStroke;
11 use ABlocks\Controls\Icon;
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15
16 $attributes = [
17 'block_id' => [
18 'type' => 'string',
19 'default' => '',
20 ],
21 'device' => [
22 'type' => 'string',
23 'default' => '',
24 ],
25 'columnGap' => [
26 'type' => 'object',
27 'default' => [
28 'value' => 20,
29 'valueTablet' => 20,
30 'valueMobile' => 10,
31 ],
32 ],
33 'allowIcon' => [
34 'type' => 'boolean',
35 'default' => true,
36 ],
37 'allowDescription' => [
38 'type' => 'boolean',
39 'default' => true,
40 ],
41 'allowDivider' => [
42 'type' => 'boolean',
43 'default' => true,
44 ],
45 'itemBackgroundH' => [
46 'type' => 'string',
47 'default' => '',
48 ],
49 'itemBackground' => [
50 'type' => 'string',
51 'default' => '',
52 ],
53 'transition' => [
54 'type' => 'number',
55 'default' => '',
56 ],
57 'titleTag' => [
58 'type' => 'string',
59 'default' => 'p',
60 ],
61 'titleColor' => [
62 'type' => 'string',
63 'default' => '#13191B',
64 ],
65 'descriptionTag' => [
66 'type' => 'string',
67 'default' => 'p',
68 ],
69 'descriptionColor' => [
70 'type' => 'string',
71 'default' => '#74777C',
72 ],
73 // divider related attributes
74 'placeDivider' => [
75 'type' => 'string',
76 'default' => 'near title',
77 ],
78 'dividerPatternUrl' => [
79 'type' => 'string',
80 'default' => 'dashed',
81 ],
82 'dividerType' => [
83 'type' => 'string',
84 'default' => 'dashed',
85 ],
86 'color' => [
87 'type' => 'string',
88 'default' => '#000000',
89 ],
90 'placePrice' => [
91 'type' => 'string',
92 'default' => 'right',
93 ],
94 'priceTag' => [
95 'type' => 'string',
96 'default' => 'p',
97 ],
98 'priceColor' => [
99 'type' => 'string',
100 'default' => '#595959',
101 ],
102 ];
103
104 $attributes = array_merge(
105 $attributes,
106 Typography::get_attribute('titleTypography', true, [
107 'weight' => '600',
108 ]),
109 TextShadow::get_attribute( 'titleTextShadow' ),
110 TextStroke::get_attribute( 'titleTextStroke', true ),
111 Typography::get_attribute( 'descriptionTypography', true ),
112 TextShadow::get_attribute( 'descriptionTextShadow' ),
113 TextStroke::get_attribute( 'descriptionTextStroke', true ),
114 Typography::get_attribute( 'priceTypography', true ),
115 TextShadow::get_attribute( 'priceTextShadow' ),
116 TextStroke::get_attribute( 'priceTextStroke', true ),
117 Icon::get_attribute( 'icon' ),
118 Typography::get_attribute( 'elementTextTypography', true ),
119 TextStroke::get_attribute( 'elementTextStroke', true ),
120 Alignment::get_attribute( 'alignment', true, [ 'value' => 'flex-start' ] ),
121 Alignment::get_attribute( 'titleAlignment', true, [ 'value' => 'left' ] ),
122 Alignment::get_attribute( 'descriptionAlignment', true, [ 'value' => 'left' ] ),
123 Alignment::get_attribute( 'priceAlignment', true, [ 'value' => 'left' ] ),
124 GroupButton::get_attribute( 'itemsDirection', true, [
125 'value' => 'row'
126 ] ),
127 Border::get_attribute( 'itemBorder', true ),
128 Dimensions::get_attribute( 'itemPadding', true ),
129 Range::get_attribute( [
130 'attributeName' => 'columnGap',
131 'attributeObjectKey' => 'value',
132 'isResponsive' => true,
133 'defaultValue' => 20,
134 'defaultValueTablet' => 20,
135 'defaultValueMobile' => 10,
136 'hasUnit' => true,
137 'unitDefaultValue' => 'px',
138 ] ),
139 Range::get_attribute( [
140 'attributeName' => 'width',
141 'attributeObjectKey' => 'value',
142 'isResponsive' => true,
143 'defaultValue' => 100,
144 'defaultValueMobile' => 100,
145 'defaultValueTablet' => 100,
146 'hasUnit' => false,
147 ] ),
148 Range::get_attribute( [
149 'attributeName' => 'weight',
150 'isResponsive' => false,
151 'defaultValue' => 2,
152 ] ),
153 Range::get_attribute( [
154 'attributeName' => 'size',
155 'isResponsive' => false,
156 'defaultValue' => 20,
157 ] ),
158 Range::get_attribute( [
159 'attributeName' => 'gap',
160 'attributeObjectKey' => 'value',
161 'isResponsive' => true,
162 'defaultValue' => 10,
163 'defaultValueMobile' => 3,
164 'defaultValueTablet' => 1,
165 'hasUnit' => true,
166 'unitDefaultValue' => 'px',
167 ] ),
168 );
169
170 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
171
172