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

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

143 lines 3.0 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
19 'alignment' => [
20 'type' => 'string',
21 'default' => 'left'
22 ],
23
24 'menuItemTextColor' => [
25 'type' => 'string',
26 'default' => ''
27 ],
28 'menuItemTextColorH' => [
29 'type' => 'string',
30 'default' => '#000000',
31 ],
32 'menuItemBackground' => [
33 'type' => 'string',
34 'default' => '',
35 ],
36 'menuItemBackgroundH' => [
37 'type' => 'string',
38 'default' => '',
39 ],
40 'menuItemTransition' => [
41 'type' => 'number',
42 'default' => 0
43 ],
44 'menuItemDisplay' => [
45 'type' => 'string',
46 'default' => 'inline',
47 ],
48 'hamburgerAlignment' => [
49 'type' => 'string',
50 'default' => 'left'
51 ],
52 'hamburgerColor' => [
53 'type' => 'string',
54 'default' => 'black'
55 ],
56 'hamburgerBackground' => [
57 'type' => 'string',
58 'default' => ''
59 ],
60 'sideBarMenuDevice' => [
61 'type' => 'string',
62 'default' => 'mobile'
63 ],
64 'menuResponsiveBackground' => [
65 'type' => 'string',
66 'default' => ''
67 ],
68 'menuResponsiveTextColor' => [
69 'type' => 'string',
70 'default' => ''
71 ],
72 'subMenuResponsiveColor' => [
73 'type' => 'string',
74 'default' => ''
75 ],
76 'subMenuResponsiveBg' => [
77 'type' => 'string',
78 'default' => ''
79 ],
80 'subMenuItemTextColor' => [
81 'type' => 'string',
82 'default' => '',
83 ],
84 'subMenuItemBackground' => [
85 'type' => 'string',
86 'default' => '',
87 ],
88 'subMenuItemTextColorH' => [
89 'type' => 'string',
90 'default' => '',
91 ],
92 'subMenuItemBackgroundH' => [
93 'type' => 'string',
94 'default' => '',
95 ],
96 'subMenuItemTransition' => [
97 'type' => 'number',
98 'default' => 0,
99 ],
100
101 ];
102
103 $attributes = array_merge(
104 $attributes,
105 Dimensions::get_attribute( 'padding', false ),
106 Dimensions::get_attribute( 'hamburgerPadding', false ),
107 Dimensions::get_attribute( 'menuItemPadding', false ),
108 Dimensions::get_attribute( 'menuItemMargin', false ),
109 Border::get_attribute( 'menuItemBorder', true ),
110 Border::get_attribute( 'hamburgerBorder', true ),
111 Typography::get_attribute( 'menuItemTypography', true ),
112 // sub menu style
113 BoxShadow::get_attribute( 'subMenuBoxShadow', true ),
114 Dimensions::get_attribute( 'subMenuPadding', false ),
115 Border::get_attribute( 'subMenuBorder', true ),
116 Range::get_attribute( [
117 'attributeName' => 'hamburgerHeight',
118 'isResponsive' => false,
119 'defaultValue' => 3,
120 'attributeObjectKey' => 'value',
121 'hasUnit' => true,
122 'unitDefaultValue' => 'px',
123 ]),
124 Range::get_attribute( [
125 'attributeName' => 'hamburgerWidth',
126 'isResponsive' => false,
127 'defaultValue' => 30,
128 'attributeObjectKey' => 'value',
129 'hasUnit' => true,
130 'unitDefaultValue' => 'px',
131 ]),
132 Range::get_attribute([
133 'attributeName' => 'subMenuWidth',
134 'attributeObjectKey' => 'value',
135 'isResponsive' => true,
136 'defaultValue' => 250,
137 'hasUnit' => true,
138 'unitDefaultValue' => 'px',
139 ]),
140 );
141 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
142
143