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