PluginProbe
Float menu – awesome floating side menu / 6.1.2
Float menu – awesome floating side menu v6.1.2
7.2.5 trunk 2.1 2.2 3.0.1 3.1 3.2.2 3.3.1 3.5 3.5.1 3.5.2 3.5.3. 3.5.4 4.0 4.1 4.1.1 4.2 4.3 4.3.1 4.3.2 5.0 5.0.1 5.0.2 5.0.3 5.1 All 57 releases
← All changes | admin/settings/options/menu.php +81 -173 trunk6.1.2 View file →
@@ -1,208 +1,116 @@
1 1 <?php
2 2
3 +use FloatMenuLite\Settings_Helper;
3 4
4 -use FloatMenuLite\WOWP_Plugin;
5 -
6 5 defined( 'ABSPATH' ) || exit;
7 6
8 7 $args = [
8 + 'item_tooltip' => [
9 + 'type' => 'text',
10 + 'title' => __( 'Label Text', 'float-menu' ),
11 + ],
9 12
10 - 'style' => [
11 - [
12 - 'item_tooltip' => [
13 - 'type' => 'text',
14 - 'title' => __( 'Text', 'float-menu' ),
15 - ],
16 - ],
17 - [
18 - 'item_tooltip_font' => [
19 - 'type' => 'select',
20 - 'title' => __( 'Font Family', 'float-menu' ),
21 - 'atts' => [
22 - 'inherit' => __( 'Use Your Themes', 'float-menu' ),
23 - 'Tahoma' => __( 'Tahoma', 'float-menu' ),
24 - 'Georgia' => __( 'Georgia', 'float-menu' ),
25 - 'Comic Sans MS' => __( 'Comic Sans MS', 'float-menu' ),
26 - 'Arial' => __( 'Arial', 'float-menu' ),
27 - 'Lucida Grande' => __( 'Lucida Grande', 'float-menu' ),
28 - 'Times New Roman' => __( 'Times New Roman', 'float-menu' ),
29 - ],
30 - ],
31 13
32 - 'item_tooltip_style' => [
33 - 'type' => 'select',
34 - 'title' => __( 'Font Style', 'float-menu' ),
35 - 'atts' => [
36 - 'normal' => __( 'Normal', 'float-menu' ),
37 - 'italic' => __( 'Italic', 'float-menu' ),
38 - ],
39 - ],
14 + 'item_type' => [
15 + 'type' => 'select',
16 + 'title' => __( 'Type', 'float-menu' ),
17 + 'atts' => Settings_Helper::item_type(),
18 + ],
40 19
41 - 'item_tooltip_weight' => [
42 - 'type' => 'select',
43 - 'title' => __( 'Font Weight ', 'float-menu' ),
44 - 'atts' => [
45 - 'normal' => __( 'Normal', 'float-menu' ),
46 - 'lighter' => __( 'Lighter', 'float-menu' ),
47 - 'bold' => __( 'Bold', 'float-menu' ),
48 - 'bolder' => __( 'Bolder', 'float-menu' ),
49 - ],
50 - ],
51 - ],
52 - [
53 - 'color' => [
54 - 'type' => 'text',
55 - 'val' => '#ffffff',
56 - 'atts' => [
57 - 'class' => 'wpie-color',
58 - 'data-alpha-enabled' => 'true',
59 - ],
60 - 'title' => __( 'Color', 'float-menu' ),
61 - ],
20 + 'item_link' => [
21 + 'type' => 'text',
22 + 'title' => __( 'Link', 'float-menu' ),
23 + 'class' => 'is-hidden',
24 + ],
62 25
63 - 'hcolor' => [
64 - 'type' => 'text',
65 - 'val' => '#ffffff',
66 - 'atts' => [
67 - 'class' => 'wpie-color',
68 - 'data-alpha-enabled' => 'true',
69 - ],
70 - 'title' => __( 'Hover Color', 'float-menu' ),
71 - ],
26 + 'new_tab' => [
27 + 'type' => 'checkbox',
28 + 'title' => __( 'Open in new Window', 'float-menu' ),
29 + 'label' => __( 'Enable', 'float-menu' ),
30 + 'class' => 'is-hidden',
31 + ],
72 32
73 - 'bcolor' => [
74 - 'type' => 'text',
75 - 'val' => '#184c72',
76 - 'atts' => [
77 - 'class' => 'wpie-color',
78 - 'data-alpha-enabled' => 'true',
79 - ],
80 - 'title' => __( 'Background', 'float-menu' ),
81 - ],
82 33
83 - 'hbcolor' => [
84 - 'type' => 'text',
85 - 'val' => '#184c72',
86 - 'atts' => [
87 - 'class' => 'wpie-color',
88 - 'data-alpha-enabled' => 'true',
89 - ],
90 - 'title' => __( 'Hover Background', 'float-menu' ),
91 - ],
92 - ],
34 +
35 + // Icons
36 + 'item_icon' => [
37 + 'type' => 'select',
38 + 'title' => __( 'Icon', 'float-menu' ),
39 + 'atts' => Settings_Helper::icons(),
93 40 ],
94 41
95 - 'type' => [
96 - [
97 - 'item_type' => [
98 - 'type' => 'select',
99 - 'title' => __( 'Type', 'float-menu' ),
100 - 'atts' => [
101 - 'links_start' => __( 'Links', 'float-menu' ),
102 - 'link' => __( 'Link', 'float-menu' ),
103 - 'login' => __( 'Login', 'float-menu' ),
104 - 'logout' => __( 'Logout', 'float-menu' ),
105 - 'lostpassword' => __( 'Lostpassword', 'float-menu' ),
106 - 'register' => __( 'Register', 'float-menu' ),
107 - 'links_end' => __( 'Links', 'float-menu' ),
108 - ],
109 - ],
110 42
111 - 'item_link' => [
112 - 'type' => 'text',
113 - 'title' => __( 'Link', 'float-menu' ),
114 - 'class' => 'is-hidden',
115 - ],
43 + // Style
44 + 'color' => [
45 + 'type' => 'text',
46 + 'val' => '#ffffff',
47 + 'atts' => [
48 + 'class' => 'wpie-color',
49 + 'data-alpha-enabled' => 'true',
50 + ],
51 + 'title' => __( 'Color', 'float-menu' ),
52 + ],
116 53
117 - 'new_tab' => [
118 - 'type' => 'checkbox',
119 - 'title' => __( 'Open in new Window', 'float-menu' ),
120 - 'label' => __( 'Enable', 'float-menu' ),
121 - 'class' => 'is-hidden',
122 - ],
54 + 'hcolor' => [
55 + 'type' => 'text',
56 + 'val' => '#ffffff',
57 + 'atts' => [
58 + 'class' => 'wpie-color',
59 + 'data-alpha-enabled' => 'true',
123 60 ],
61 + 'title' => __( 'Hover Color', 'float-menu' ),
124 62 ],
125 63
126 - 'icon' => [
127 - [
128 - 'icon_type' => [
129 - 'type' => 'select',
130 - 'title' => __( 'Icon Type', 'float-menu' ),
131 - 'value' => 'icon',
132 - 'options' => [
133 - 'icon' => __( 'Icon', 'float-menu' ),
134 - 'text' => __( 'Text', 'float-menu' ),
135 - ]
136 - ],
64 + 'bcolor' => [
65 + 'type' => 'text',
66 + 'val' => '#184c72',
67 + 'atts' => [
68 + 'class' => 'wpie-color',
69 + 'data-alpha-enabled' => 'true',
70 + ],
71 + 'title' => __( 'Background', 'float-menu' ),
72 + ],
137 73
138 - 'item_custom_text' => [
139 - 'type' => 'text',
140 - 'title' => __( 'Enter text', 'float-menu' ),
141 - 'atts' => [
142 - 'placeholder' => __( 'Enter text', 'float-menu' )
143 - ],
144 - ],
145 -
146 - 'item_icon' => [
147 - 'type' => 'text',
148 - 'title' => __( 'Icon', 'float-menu' ),
149 - 'value' => 'fas fa-wand-magic-sparkles',
150 - 'options' => [
151 - 'class' => 'wpie-icon-box',
152 - ],
153 - ],
74 + 'hbcolor' => [
75 + 'type' => 'text',
76 + 'val' => '#184c72',
77 + 'atts' => [
78 + 'class' => 'wpie-color',
79 + 'data-alpha-enabled' => 'true',
154 80 ],
81 + 'title' => __( 'Hover Background', 'float-menu' ),
155 82 ],
156 83
157 84
158 - 'attributes' => [
159 - [
160 - 'button_id' => [
161 - 'type' => 'text',
162 - 'title' => __( 'ID for element', 'float-menu' ),
163 - ],
85 + // Attributes
86 + 'button_id' => [
87 + 'type' => 'text',
88 + 'title' => __( 'ID for element', 'float-menu' ),
89 + ],
164 90
165 - 'button_class' => [
166 - 'type' => 'text',
167 - 'title' => __( 'Class for element', 'float-menu' ),
168 - ],
91 + 'button_class' => [
92 + 'type' => 'text',
93 + 'title' => __( 'Class for element', 'float-menu' ),
94 + ],
169 95
170 - 'link_rel' => [
171 - 'type' => 'text',
172 - 'title' => __( 'Attribute: rel', 'float-menu' ),
173 - ],
96 + 'link_rel' => [
97 + 'type' => 'text',
98 + 'title' => __( 'Attribute: rel', 'float-menu' ),
99 + ],
174 100
175 - 'aria_label' => [
176 - 'type' => 'text',
177 - 'title' => __( 'Aria label', 'float-menu' ),
178 - ],
179 - ],
101 + 'aria_label' => [
102 + 'type' => 'text',
103 + 'title' => __( 'Aria label', 'float-menu' ),
180 104 ],
181 -];
182 105
183 -$args = apply_filters( WOWP_Plugin::PREFIX . '_menu_options', $args );
184 106
185 -$prefix = 'menu_1-';
186 -$data = [
187 - 'args' => $args,
188 - 'opt' => [],
189 - 'tabs' => [],
190 107 ];
191 108
192 -foreach ( $args as $i => $group ) {
193 - $data['tabs'][] = $i;
109 +$prefix = 'menu_1-';
110 +$newArgs = [];
194 111
195 - if ( is_array( $group ) ) {
196 -
197 - foreach ( $group as $k => $v ) {
198 -
199 - foreach ( $v as $key => $val ) {
200 - $group_key = $prefix . $key;
201 - $data['opt'][ $group_key ] = $val;
202 - }
203 -
204 - }
205 - }
112 +foreach ( $args as $key => $value ) {
113 + $newArgs[ $prefix . $key ] = $value;
206 114 }
207 115
208 -return $data;
116 +return $newArgs;