PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.14.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.14.0
2.14.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 All 81 releases
ablocks / includes / blocks / menu / attributes.php

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

170 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
4 use ABlocks\Controls\Dimensions;
5 use ABlocks\Controls\Typography;
6 use ABlocks\Controls\Border;
7 use ABlocks\Controls\Range;
8 use ABlocks\Controls\BoxShadow;
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 'alignment' => [
23 'type' => 'object',
24 'default' => [
25 'value' => 'left',
26 'valueTablet' => '',
27 'valueMobile' => '',
28 ],
29 ],
30
31 'menuItemTextColor' => [
32 'type' => 'string',
33 'default' => ''
34 ],
35 'menuItemTextColorH' => [
36 'type' => 'string',
37 'default' => '',
38 ],
39 'menuItemBackground' => [
40 'type' => 'string',
41 'default' => '',
42 ],
43 'menuItemBackgroundH' => [
44 'type' => 'string',
45 'default' => '',
46 ],
47 'menuItemTransition' => [
48 'type' => 'number',
49 'default' => 0
50 ],
51 'menuItemDisplay' => [
52 'type' => 'string',
53 'default' => 'inline',
54 ],
55 'hamburgerAlignment' => [
56 'type' => 'string',
57 'default' => 'left'
58 ],
59 'hamburgerColor' => [
60 'type' => 'string',
61 'default' => 'black'
62 ],
63 'hamburgerBackground' => [
64 'type' => 'string',
65 'default' => ''
66 ],
67 'sideBarMenuDevice' => [
68 'type' => 'string',
69 'default' => 'mobile'
70 ],
71 'enableTabletHamburger' => [
72 'type' => 'boolean',
73 'default' => false,
74 ],
75 'mobileMenuPosition' => [
76 'type' => 'string',
77 'default' => 'below-header'
78 ],
79 'subMenuTrigger' => [
80 'type' => 'string',
81 'default' => 'hover'
82 ],
83 'menuResponsiveBackground' => [
84 'type' => 'string',
85 'default' => ''
86 ],
87 'menuResponsiveTextColor' => [
88 'type' => 'string',
89 'default' => ''
90 ],
91 'subMenuResponsiveColor' => [
92 'type' => 'string',
93 'default' => ''
94 ],
95 'subMenuResponsiveBg' => [
96 'type' => 'string',
97 'default' => ''
98 ],
99 'subMenuItemTextColor' => [
100 'type' => 'string',
101 'default' => '',
102 ],
103 'subMenuItemBackground' => [
104 'type' => 'string',
105 'default' => '',
106 ],
107 'subMenuItemTextColorH' => [
108 'type' => 'string',
109 'default' => '',
110 ],
111 'subMenuItemBackgroundH' => [
112 'type' => 'string',
113 'default' => '',
114 ],
115 'subMenuItemTransition' => [
116 'type' => 'number',
117 'default' => 0,
118 ],
119 'menuActveColor' => [
120 'type' => 'string',
121 'default' => '',
122 ],
123 'menuActveColorBg' => [
124 'type' => 'string',
125 'default' => '',
126 ],
127
128 ];
129
130 $attributes = array_merge(
131 $attributes,
132 Dimensions::get_attribute( 'padding', false ),
133 Dimensions::get_attribute( 'hamburgerPadding', false ),
134 Dimensions::get_attribute( 'menuItemPadding', false ),
135 Dimensions::get_attribute( 'menuItemMargin', false ),
136 Border::get_attribute( 'menuItemBorder', true ),
137 Border::get_attribute( 'hamburgerBorder', true ),
138 Typography::get_attribute( 'menuItemTypography', true ),
139 // sub menu style
140 BoxShadow::get_attribute( 'subMenuBoxShadow', true ),
141 Dimensions::get_attribute( 'subMenuPadding', false ),
142 Border::get_attribute( 'subMenuBorder', true ),
143 Range::get_attribute( [
144 'attributeName' => 'hamburgerHeight',
145 'isResponsive' => false,
146 'defaultValue' => 3,
147 'attributeObjectKey' => 'value',
148 'hasUnit' => true,
149 'unitDefaultValue' => 'px',
150 ]),
151 Range::get_attribute( [
152 'attributeName' => 'hamburgerWidth',
153 'isResponsive' => false,
154 'defaultValue' => 30,
155 'attributeObjectKey' => 'value',
156 'hasUnit' => true,
157 'unitDefaultValue' => 'px',
158 ]),
159 Range::get_attribute([
160 'attributeName' => 'subMenuWidth',
161 'attributeObjectKey' => 'value',
162 'isResponsive' => true,
163 'defaultValue' => 250,
164 'hasUnit' => true,
165 'unitDefaultValue' => 'px',
166 ]),
167 );
168 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
169
170