PluginProbe
Responsive Menu – Create Mobile-Friendly Menu / 4.7.4
Responsive Menu – Create Mobile-Friendly Menu v4.7.4
4.7.4 4.7.3 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.10 4.1.11 4.1.12 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 All 91 releases
← All changes | v4.0.0/templates/rmp-editor.php +2527 -2065 4.0.0 → 4.7.4 View file →
@@ -1,9 +1,9 @@
1 1 <?php
2 2 /**
3 3 * This is menu editor page where we can customize the menu with
4 4 * all dynamic option and also the preview.
5 - *
5 + *
6 6 * @since 4.0.0
7 7 *
8 8 * @package responsive_menu_pro
9 9 */
@@ -22,13 +22,13 @@
22 22 use RMP\Features\Inc\UI_Manager;
23 23 use RMP\Features\Inc\Theme_Manager;
24 24 use RMP\Features\Inc\Editor;
25 25
26 -$body_classes = [
26 +$body_classes = array(
27 27 'rmp-editor-active',
28 28 'wp-version-' . str_replace( '.', '-', $wp_version ),
29 29 'rmp-version-' . str_replace( '.', '-', RMP_PLUGIN_VERSION ),
30 -];
30 +);
31 31
32 32 $body_classes = array_merge( get_body_class(), $body_classes );
33 33 if ( is_rtl() ) {
34 34 $body_classes[] = 'rtl';
@@ -33,16 +33,28 @@
33 33 if ( is_rtl() ) {
34 34 $body_classes[] = 'rtl';
35 35 }
36 36
37 +// Check dark mode options.
38 +$global_settings = get_option( 'rmp_global_setting_options' );
39 +if ( ! empty( $global_settings['rmp_dark_mode'] ) ) {
40 + $body_classes[] = 'rmp-dark-mode';
41 +}
42 +
37 43 $option_manager = Option_Manager::get_instance();
38 44 $control_manager = Control_Manager::get_instance();
39 45 $ui_manager = UI_Manager::get_instance();
40 46 $theme_manager = Theme_Manager::get_instance();
41 47 $editor = Editor::get_instance();
42 -$menu_id = get_the_ID();
43 -$options = $option_manager->get_options( $menu_id );
44 -
48 +$menu_id = get_the_ID();
49 +$options = $option_manager->get_options( $menu_id );
50 +$menu_to_use = $option_manager->get_option( $menu_id, 'menu_to_use' );
51 +$current_wp_menu = wp_get_nav_menu_object($menu_to_use);
52 +global $wp_filesystem;
53 +if ( empty( $wp_filesystem ) ) {
54 + require_once ABSPATH . 'wp-admin/includes/file.php';
55 +}
56 +WP_Filesystem();
45 57 ?>
46 58 <!DOCTYPE html>
47 59 <html <?php language_attributes(); ?>>
48 60 <head>
@@ -47,68 +59,98 @@
47 59 <html <?php language_attributes(); ?>>
48 60 <head>
49 61 <meta charset="utf-8" />
50 62 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
51 - <title><?php echo __( 'rmp-menu-editor', 'responsive-menu-pro' ) . ' | ' . get_the_title(); ?></title>
63 + <title><?php echo esc_html__( 'rmp-menu-editor', 'responsive-menu' ) . ' | ' . esc_html( get_the_title() ); ?></title>
52 64 </head>
53 - <body class="wp-admin wp-core-ui js post-php post-type-rmp_menu <?php echo implode( ' ', $body_classes ); ?>">
65 + <body class="wp-admin wp-core-ui js post-php post-type-rmp_menu <?php echo esc_attr( implode( ' ', $body_classes ) ); ?>">
54 66 <div id="rmp-editor-wrapper" class="rmp-editor-overlay expanded rmp-preview-mobile">
55 67 <form method="post" enctype="multipart/form-data" id="rmp-editor-form" class="rmp-editor-sidebar">
56 68 <input type="hidden" name="rmp_device_mode" id="rmp_device_mode" value="mobile"/>
57 - <input type="hidden" id="menu_id" name="menu_id" value="<?php echo get_the_ID(); ?>"/>
69 + <input type="hidden" id="menu_id" name="menu_id" value="<?php echo esc_attr( get_the_ID() ); ?>"/>
58 70 <?php
59 - echo $editor->header_section( $options['menu_name'] );
71 + $editor->header_section( $options['menu_name'] );
60 72 ?>
61 73
62 74 <div id="rmp-editor-main">
63 - <div id="rmp-editor-nav" class="rmp-editor-controls-nav" role="navigation" aria-label="<?php echo $options['menu_name']; ?>">
75 + <div id="rmp-editor-nav" class="rmp-editor-controls-nav" role="navigation" aria-label="<?php echo esc_attr( $options['menu_name'] ); ?>">
64 76 <ul id="rmp-editor-pane" class="rmp-editor-pane-parent">
65 77 <li id="rmp-tab-item-mobile-menu" class="rmp-tab-item" aria-owns="tab-mobile-menu">
66 78 <span class="rmp-tab-item-icon">
67 - <?php echo file_get_contents( RMP_PLUGIN_PATH_V4 .'/assets/admin/icons/svg/mobile.svg' ); ?>
79 + <?php
80 + $svg_mobile = $wp_filesystem->get_contents( RMP_PLUGIN_PATH_V4 . '/assets/admin/icons/svg/mobile.svg' );
81 + if ( $svg_mobile ) {
82 + echo wp_kses( $svg_mobile, rmp_allow_svg_html_tags() );
83 + }
84 + ?>
68 85 </span>
69 - <h3 class="rmp-tab-item-title"><?php esc_html_e( 'Mobile Menu', 'responsive-menu-pro' ); ?></h3>
86 + <h3 class="rmp-tab-item-title"><?php esc_html_e( 'Mobile Menu', 'responsive-menu' ); ?></h3>
70 87 </li>
71 88
72 89 <li id="rmp-tab-item-desktop-menu" class="rmp-tab-item" aria-owns="tab-desktop-menu">
73 90 <span class="rmp-tab-item-icon">
74 - <?php echo file_get_contents( RMP_PLUGIN_PATH_V4 .'/assets/admin/icons/svg/desktop.svg' ); ?>
91 + <?php
92 + $svg_desktop = $wp_filesystem->get_contents( RMP_PLUGIN_PATH_V4 . '/assets/admin/icons/svg/desktop.svg' );
93 + if ( $svg_desktop ) {
94 + echo wp_kses( $svg_desktop, rmp_allow_svg_html_tags() );
95 + }
96 + ?>
75 97 </span>
76 98 <h3 class="rmp-tab-item-title">
77 - <span> <?php esc_html_e( 'Desktop Menu', 'responsive-menu-pro' ); ?></span>
78 - <a target="_blank" class="upgrade-tooltip" href="https://responsive.menu/pricing?utm_source=free-plugin&utm_medium=option&utm_campaign=hide_on_mobile" > <?php echo __('Pro','responsive-menu-pro'); ?> </a>
99 + <span> <?php esc_html_e( 'Desktop Menu', 'responsive-menu' ); ?></span>
100 + <a target="_blank" rel="noopener" class="upgrade-tooltip" href="https://responsive.menu/pricing?utm_source=free-plugin&utm_medium=option&utm_campaign=hide_on_mobile" > <?php echo esc_html__( 'Pro', 'responsive-menu' ); ?> </a>
79 101 </h3>
80 102 </li>
81 103
82 104 <li id="rmp-tab-item-dropdowns" class="rmp-tab-item" aria-owns="tab-menu-styling">
83 105 <span class="rmp-tab-item-icon">
84 - <?php echo file_get_contents( RMP_PLUGIN_PATH_V4 .'/assets/admin/icons/svg/dropdowns.svg' ); ?>
106 + <?php
107 + $svg_dropdowns = $wp_filesystem->get_contents( RMP_PLUGIN_PATH_V4 . '/assets/admin/icons/svg/dropdowns.svg' );
108 + if ( $svg_dropdowns ) {
109 + echo wp_kses( $svg_dropdowns, rmp_allow_svg_html_tags() );
110 + }
111 + ?>
85 112 </span>
86 - <h3 class="rmp-tab-item-title"><?php esc_html_e( 'Menu Styling', 'responsive-menu-pro' ); ?></h3>
113 + <h3 class="rmp-tab-item-title"><?php esc_html_e( 'Menu Styling', 'responsive-menu' ); ?></h3>
87 114 </li>
88 -
115 +
89 116 <li id="rmp-tab-item-header-bar" class="rmp-tab-item" aria-owns="tab-header-bar">
90 117 <span class="rmp-tab-item-icon">
91 - <?php echo file_get_contents( RMP_PLUGIN_PATH_V4 .'/assets/admin/icons/svg/header.svg' ); ?>
118 + <?php
119 + $svg_header = $wp_filesystem->get_contents( RMP_PLUGIN_PATH_V4 . '/assets/admin/icons/svg/header.svg' );
120 + if ( $svg_header ) {
121 + echo wp_kses( $svg_header, rmp_allow_svg_html_tags() );
122 + }
123 + ?>
92 124 </span>
93 125 <h3 class="rmp-tab-item-title">
94 - <span><?php esc_html_e( 'Header Bar', 'responsive-menu-pro' ); ?></span>
95 - <a target="_blank" class="upgrade-tooltip" href="https://responsive.menu/pricing?utm_source=free-plugin&utm_medium=option&utm_campaign=hide_on_mobile" > <?php echo __('Pro','responsive-menu-pro'); ?> </a>
126 + <span><?php esc_html_e( 'Header Bar', 'responsive-menu' ); ?></span>
127 + <a target="_blank" rel="noopener" class="upgrade-tooltip" href="https://responsive.menu/pricing?utm_source=free-plugin&utm_medium=option&utm_campaign=hide_on_mobile" > <?php echo esc_html__( 'Pro', 'responsive-menu' ); ?> </a>
96 128 </h3>
97 129 </li>
98 130
99 131 <li id="rmp-tab-item-themes" class="rmp-tab-item" aria-owns="tab-themes">
100 132 <span class="rmp-tab-item-icon">
101 - <?php echo file_get_contents( RMP_PLUGIN_PATH_V4 .'/assets/admin/icons/svg/advanced.svg' ); ?>
133 + <?php
134 + $svg_advanced = $wp_filesystem->get_contents( RMP_PLUGIN_PATH_V4 . '/assets/admin/icons/svg/advanced.svg' );
135 + if ( $svg_advanced ) {
136 + echo wp_kses( $svg_advanced, rmp_allow_svg_html_tags() );
137 + }
138 + ?>
102 139 </span>
103 - <h3 class="rmp-tab-item-title"><?php esc_html_e( 'Themes', 'responsive-menu-pro' ); ?></h3>
140 + <h3 class="rmp-tab-item-title"><?php esc_html_e( 'Themes', 'responsive-menu' ); ?></h3>
104 141 </li>
105 142
106 143 <li id="rmp-tab-item-settings" class="rmp-tab-item" aria-owns="tab-settings">
107 144 <span class="rmp-tab-item-icon">
108 - <?php echo file_get_contents( RMP_PLUGIN_PATH_V4 .'/assets/admin/icons/svg/general.svg' ); ?>
145 + <?php
146 + $svg_general = $wp_filesystem->get_contents( RMP_PLUGIN_PATH_V4 . '/assets/admin/icons/svg/general.svg' );
147 + if ( $svg_general ) {
148 + echo wp_kses( $svg_general, rmp_allow_svg_html_tags() );
149 + }
150 + ?>
109 151 </span>
110 - <h3 class="rmp-tab-item-title"><?php esc_html_e( 'Settings', 'responsive-menu-pro' ); ?></h3>
152 + <h3 class="rmp-tab-item-title"><?php esc_html_e( 'Settings', 'responsive-menu' ); ?></h3>
111 153 </li>
112 154 </ul>
113 155 </div>
114 156
@@ -114,13 +156,15 @@
114 156
115 157 <div id="tab-themes" class="rmp-accordions" aria-label="Themes">
116 158 <ul class="rmp-accordion-container" id="rmp-theme-items">
117 159 <?php
118 - echo $ui_manager->start_accordion_item( [
119 - 'item_header' => [
120 - 'item_title' => __('Theme options','responsive-menu-pro'),
121 - ]
122 - ] );
160 + $ui_manager->start_accordion_item(
161 + array(
162 + 'item_header' => array(
163 + 'item_title' => esc_html__( 'Theme Details', 'responsive-menu' ),
164 + ),
165 + )
166 + );
123 167
124 168 $theme_name = 'Default';
125 169 if ( ! empty( $options['menu_theme'] ) ) {
126 170 $theme_name = $options['menu_theme'];
@@ -125,13 +169,13 @@
125 169 if ( ! empty( $options['menu_theme'] ) ) {
126 170 $theme_name = $options['menu_theme'];
127 171 }
128 172
129 - echo $control_manager->add_hidden_control(
130 - [
173 + $control_manager->add_hidden_control(
174 + array(
131 175 'value' => $theme_name,
132 176 'name' => 'menu[menu_theme]',
133 - ]
177 + )
134 178 );
135 179
136 180 $theme_type = 'default';
137 181 if ( ! empty( $options['theme_type'] ) ) {
@@ -137,56 +181,61 @@
137 181 if ( ! empty( $options['theme_type'] ) ) {
138 182 $theme_type = $options['theme_type'];
139 183 }
140 184
141 - echo $control_manager->add_hidden_control(
142 - [
185 + $control_manager->add_hidden_control(
186 + array(
143 187 'value' => $theme_type,
144 188 'name' => 'menu[theme_type]',
145 - ]
189 + )
146 190 );
147 191
148 - echo $control_manager->add_sub_heading(
149 - ['text' => 'Theme Name - ' . $theme_name ]
192 + $control_manager->add_sub_heading(
193 + array( 'text' => 'Theme Name - ' . $theme_name )
150 194 );
151 195
152 - echo $theme_manager->get_theme_thumbnail( $theme_name, $theme_type );
196 + $theme_manager->get_theme_thumbnail( $theme_name, $theme_type );
153 197
154 198
155 - echo $control_manager->add_button_control(
156 - [
157 - 'label' => __('Change Theme','responsive-menu-pro'),
158 - 'id' => 'rmp-change-theme-action',
199 + $control_manager->add_button_control(
200 + array(
201 + 'label' => esc_html__( 'Change Theme', 'responsive-menu' ),
202 + 'id' => 'rmp-change-theme-action',
159 203 'group_classes' => 'full-size',
160 - 'class' => 'rmp-theme-change-button',
161 - ]
204 + 'class' => 'rmp-theme-change-button',
205 + )
162 206 );
163 - echo $ui_manager->accordion_divider();
207 + $ui_manager->accordion_divider();
164 208
165 - echo $control_manager->add_button_control(
166 - [
167 - 'label' => __('Save As Theme','responsive-menu-pro'),
168 - 'id' => 'rmp-theme-save-action',
209 + $control_manager->add_button_control(
210 + array(
211 + 'label' => esc_html__( 'Save As Theme', 'responsive-menu' ),
212 + 'id' => 'rmp-theme-save-action',
169 213 'group_classes' => 'full-size',
170 - 'class' => 'rmp-theme-save-button',
171 - ]
214 + 'class' => 'rmp-theme-save-button',
215 + )
172 216 );
173 217
174 -
175 - echo $ui_manager->end_accordion_item();
176 - ?>
218 +
219 + $ui_manager->end_accordion_item();
220 +
221 + /**
222 + * Fires after prepare the theme setting section.
223 + *
224 + * @since 4.1.0
225 + *
226 + * @param int $menu_id
227 + * @param array $options
228 + */
229 + do_action( 'rmp_tab_themes', $menu_id, $options );
230 +
231 + ?>
177 232 </ul>
178 233 </div>
179 234
180 - <?php
181 - if ( ! empty( get_option('responsive_menu_version') ) ) {
182 - include_once RMP_PLUGIN_PATH_V4 . '/templates/legacy-settings.php';
183 - }
184 - ?>
185 -
186 235 <div id="tab-header-bar" class="rmp-accordions" aria-label="Header Bar">
187 236 <?php
188 - echo $control_manager->upgrade_notice();
237 + $control_manager->upgrade_notice();
189 238 ?>
190 239 </div>
191 240
192 241 <div id="tab-advanced-settings" class="rmp-accordions" aria-label="Advanced">
@@ -191,132 +240,178 @@
191 240
192 241 <div id="tab-advanced-settings" class="rmp-accordions" aria-label="Advanced">
193 242 <ul class="rmp-accordion-container">
194 243 <?php
195 -
196 - //Device Breakpoints
197 - echo $ui_manager->start_accordion_item( [
198 - 'item_header' => [
199 - 'item_title' => __('Menu Breakpoint','responsive-menu-pro'),
200 - ]
201 - ] );
202 244
203 - echo $control_manager->add_text_input_control( [
204 - 'label' => __('Breakpoint','responsive-menu-pro'),
205 - 'type' => 'number',
206 - 'id' => 'rmp-menu-tablet-breakpoint',
207 - 'name' => 'menu[tablet_breakpoint]',
208 - 'value' => rmp_get_value($options,'tablet_breakpoint'),
209 - 'tool_tip' => [
210 - 'text' => __( 'Set the breakpoint below which you want hamburger menu', 'responsive-menu-pro' ),
211 - ],
212 - 'has_unit' => [
213 - 'unit_type' => 'px',
214 - ],
215 - ] );
216 - echo $ui_manager->end_accordion_item();
245 + // Device Breakpoints
246 + $ui_manager->start_accordion_item(
247 + array(
248 + 'item_header' => array(
249 + 'item_title' => esc_html__( 'Menu Breakpoint', 'responsive-menu' ),
250 + ),
251 + )
252 + );
217 253
218 - echo $ui_manager->start_accordion_item( [
219 - 'item_header' => [
220 - 'item_title' => __('Animation Speeds','responsive-menu-pro'),
221 - ]
222 - ] );
223 -
224 - echo $ui_manager->start_group_controls();
225 -
226 - echo $control_manager->add_text_input_control( [
227 - 'label' => __('Colours','responsive-menu-pro'),
228 - 'type' => 'text',
229 - 'id' => 'rmp-menu-transition-speed',
230 - 'name' => 'menu[transition_speed]',
231 - 'value' => rmp_get_value($options,'transition_speed'),
232 -
233 - 'tool_tip' => [
234 - 'text' => __('Specify the speed at which colours transition from standard to active or hover states.','responsive-menu-pro')
235 - ],
236 - 'has_unit' => [
237 - 'unit_type' => 's',
238 - ],
239 - ] );
254 + $control_manager->add_text_input_control(
255 + array(
256 + 'label' => esc_html__( 'Breakpoint', 'responsive-menu' ),
257 + 'type' => 'number',
258 + 'id' => 'rmp-menu-tablet-breakpoint',
259 + 'name' => 'menu[tablet_breakpoint]',
260 + 'value' => rmp_get_value( $options, 'tablet_breakpoint' ),
261 + 'tool_tip' => array(
262 + 'text' => esc_html__( 'Set the breakpoint below which you want hamburger menu', 'responsive-menu' ),
263 + ),
264 + 'has_unit' => array(
265 + 'unit_type' => 'px',
266 + ),
267 + )
268 + );
269 + $ui_manager->end_accordion_item();
240 270
241 - echo $control_manager->add_text_input_control( [
242 - 'label' => __('Sub Menus','responsive-menu-pro'),
243 - 'type' => 'text',
244 - 'id' => 'rmp-sub-menu-speed',
245 - 'name' => 'menu[sub_menu_speed]',
246 - 'value' => rmp_get_value($options,'sub_menu_speed'),
247 -
248 - 'tool_tip' => [
249 - 'text' => __('Specify the speed at which the sub menus transition.','responsive-menu-pro')
250 - ],
251 - 'has_unit' => [
252 - 'unit_type' => 's',
253 - ],
254 - ] );
271 + $ui_manager->start_accordion_item(
272 + array(
273 + 'item_header' => array(
274 + 'item_title' => esc_html__( 'Animation Speeds', 'responsive-menu' ),
275 + ),
276 + )
277 + );
255 278
256 - echo $ui_manager->end_group_controls();
279 + $ui_manager->start_group_controls();
257 280
258 -
259 - echo $ui_manager->end_accordion_item();
281 + $control_manager->add_text_input_control(
282 + array(
283 + 'label' => esc_html__( 'Colours', 'responsive-menu' ),
284 + 'type' => 'text',
285 + 'id' => 'rmp-menu-transition-speed',
286 + 'name' => 'menu[transition_speed]',
287 + 'value' => rmp_get_value( $options, 'transition_speed' ),
260 288
261 - echo $ui_manager->start_accordion_item( [
262 - 'item_header' => [
263 - 'item_title' => __('Technical','responsive-menu-pro'),
264 - ],
265 - 'feature_type' => 'pro'
266 - ] );
289 + 'tool_tip' => array(
290 + 'text' => esc_html__( 'Specify the speed at which colours transition from standard to active or hover states.', 'responsive-menu' ),
291 + ),
292 + 'has_unit' => array(
293 + 'unit_type' => 's',
294 + ),
295 + )
296 + );
267 297
268 - echo $control_manager->add_switcher_control( [
269 - 'label' => __('Trigger Menu on page load','responsive-menu-pro'),
270 - 'id' => 'rmp-show-menu-on-page-load',
271 - 'class' => 'rmp-show-menu-on-page-load',
272 - 'tool_tip' => [
273 - 'text' => __('The menu will appear in expanded state when the page loads.','responsive-menu-pro'),
274 - ],
275 - 'feature_type' => 'pro',
276 - 'name' => 'menu[show_menu_on_page_load]',
277 - 'is_checked' => '',
278 -
279 - ] );
298 + $control_manager->add_text_input_control(
299 + array(
300 + 'label' => esc_html__( 'Sub Menus', 'responsive-menu' ),
301 + 'type' => 'text',
302 + 'id' => 'rmp-sub-menu-speed',
303 + 'name' => 'menu[sub_menu_speed]',
304 + 'value' => rmp_get_value( $options, 'sub_menu_speed' ),
280 305
281 - echo $control_manager->add_switcher_control( [
282 - 'label' => __('Disable Background Scrolling','responsive-menu-pro'),
283 - 'id' => 'rmp-menu-disable-scrolling',
284 - 'class' => 'rmp-menu-disable-scrolling',
285 - 'feature_type' => 'pro',
286 - 'tool_tip' => [
287 - 'text' => __('This will disable the background page scrolling.','responsive-menu-pro'),
288 - ],
289 - 'name' => 'menu[menu_disable_scrolling]',
290 - 'is_checked' => ''
291 - ] );
306 + 'tool_tip' => array(
307 + 'text' => esc_html__( 'Specify the speed at which the sub menus transition.', 'responsive-menu' ),
308 + ),
309 + 'has_unit' => array(
310 + 'unit_type' => 's',
311 + ),
312 + )
313 + );
292 314
293 - echo $ui_manager->end_accordion_item();
315 + $ui_manager->end_group_controls();
294 316
295 - echo $ui_manager->start_accordion_item( [
296 - 'item_header' => [
297 - 'item_title' => __('Page Overlay','responsive-menu-pro')
298 - ],
299 - 'tool_tip' => [
300 - 'text' => __('Put a backdrop when menu is active.','responsive-menu-pro'),
301 - ],
302 - 'feature_type' => 'pro',
303 - 'item_content' => [
304 - 'content_class' => 'upgrade-notice-contents'
305 - ]
306 - ]);
307 317
308 - echo $control_manager->upgrade_notice();
318 + $ui_manager->end_accordion_item();
309 319
310 - echo $ui_manager->end_accordion_item();
311 -
312 - ?>
320 + $ui_manager->start_accordion_item(
321 + array(
322 + 'item_header' => array(
323 + 'item_title' => esc_html__( 'Technical', 'responsive-menu' ),
324 + ),
325 + 'feature_type' => 'pro',
326 + )
327 + );
328 +
329 + $control_manager->add_switcher_control(
330 + array(
331 + 'label' => esc_html__( 'Trigger Menu on page load', 'responsive-menu' ),
332 + 'id' => 'rmp-show-menu-on-page-load',
333 + 'class' => 'rmp-show-menu-on-page-load',
334 + 'tool_tip' => array(
335 + 'text' => esc_html__( 'The menu will appear in expanded state when the page loads.', 'responsive-menu' ),
336 + ),
337 + 'feature_type' => 'pro',
338 + 'name' => 'menu[show_menu_on_page_load]',
339 + 'is_checked' => '',
340 +
341 + )
342 + );
343 +
344 + $control_manager->add_switcher_control(
345 + array(
346 + 'label' => esc_html__( 'Disable Background Scrolling', 'responsive-menu' ),
347 + 'id' => 'rmp-menu-disable-scrolling',
348 + 'class' => 'rmp-menu-disable-scrolling',
349 + 'feature_type' => 'pro',
350 + 'tool_tip' => array(
351 + 'text' => esc_html__( 'This will disable the background page scrolling.', 'responsive-menu' ),
352 + ),
353 + 'name' => 'menu[menu_disable_scrolling]',
354 + 'is_checked' => '',
355 + )
356 + );
357 +
358 + $control_manager->add_switcher_control(
359 + array(
360 + 'label' => esc_html__( 'Enable Smooth Scrolling', 'responsive-menu' ),
361 + 'id' => 'rmp-menu-smooth-scroll-on',
362 + 'class' => 'rmp-menu-smooth-scroll-on',
363 + 'tool_tip' => array(
364 + 'text' => esc_html__( 'The webpage will scroll smoothly to their target sections on same page.', 'responsive-menu' ),
365 + ),
366 + 'name' => 'smooth_scroll_on',
367 + 'feature_type' => 'pro',
368 + 'is_checked' => '',
369 + )
370 + );
371 +
372 + $control_manager->add_text_input_control(
373 + array(
374 + 'label' => esc_html__( 'Scroll Speed', 'responsive-menu' ),
375 + 'type' => 'number',
376 + 'id' => 'rmp-menu-smooth-scroll-speed',
377 + 'name' => 'smooth_scroll_speed',
378 + 'feature_type' => 'pro',
379 + 'value' => '0',
380 + 'has_unit' => array(
381 + 'unit_type' => 'ms',
382 + ),
383 + )
384 + );
385 +
386 + $ui_manager->end_accordion_item();
387 +
388 + $ui_manager->start_accordion_item(
389 + array(
390 + 'item_header' => array(
391 + 'item_title' => esc_html__( 'Page Overlay', 'responsive-menu' ),
392 + ),
393 + 'tool_tip' => array(
394 + 'text' => esc_html__( 'Put a backdrop when menu is active.', 'responsive-menu' ),
395 + ),
396 + 'feature_type' => 'pro',
397 + 'item_content' => array(
398 + 'content_class' => 'upgrade-notice-contents',
399 + ),
400 + )
401 + );
402 +
403 + $control_manager->upgrade_notice();
404 +
405 + $ui_manager->end_accordion_item();
406 +
407 + ?>
313 408 </ul>
314 409 </div>
315 410
316 411 <div id="tab-desktop-menu" class="rmp-accordions" aria-label="Desktop Menu">
317 412 <?php
318 - echo $control_manager->upgrade_notice();
413 + $control_manager->upgrade_notice();
319 414 ?>
320 415 </div>
321 416
322 417 <div id="tab-mobile-menu" class="rmp-accordions" aria-label="Mobile Menu">
@@ -321,26 +416,30 @@
321 416
322 417 <div id="tab-mobile-menu" class="rmp-accordions" aria-label="Mobile Menu">
323 418 <ul class="rmp-editor-pane-parent">
324 419 <?php
325 - echo $ui_manager->add_editor_menu_item( [
326 - 'item_class' => 'is-child-item',
327 - 'aria_owns' => 'tab-container',
328 - 'item_header' => [
329 - 'item_svg_icon' => RMP_PLUGIN_PATH_V4 .'/assets/admin/icons/svg/container.svg',
330 - 'item_title' => __('Container','responsive-menu-pro'),
331 - ]
332 - ] );
420 + $ui_manager->add_editor_menu_item(
421 + array(
422 + 'item_class' => 'is-child-item',
423 + 'aria_owns' => 'tab-container',
424 + 'item_header' => array(
425 + 'item_svg_icon' => RMP_PLUGIN_PATH_V4 . '/assets/admin/icons/svg/container.svg',
426 + 'item_title' => esc_html__( 'Container', 'responsive-menu' ),
427 + ),
428 + )
429 + );
333 430
334 - echo $ui_manager->add_editor_menu_item( [
335 - 'item_class' => 'is-child-item',
336 - 'aria_owns' => 'tab-toggle-button',
337 - 'item_header' => [
338 - 'item_svg_icon' => RMP_PLUGIN_PATH_V4 .'/assets/admin/icons/svg/toggle.svg',
339 - 'item_title' => __('Toggle button','responsive-menu-pro'),
340 - ]
341 - ] );
342 - ?>
431 + $ui_manager->add_editor_menu_item(
432 + array(
433 + 'item_class' => 'is-child-item',
434 + 'aria_owns' => 'tab-toggle-button',
435 + 'item_header' => array(
436 + 'item_svg_icon' => RMP_PLUGIN_PATH_V4 . '/assets/admin/icons/svg/toggle.svg',
437 + 'item_title' => esc_html__( 'Toggle button', 'responsive-menu' ),
438 + ),
439 + )
440 + );
441 + ?>
343 442 </ul>
344 443 </div>
345 444
346 445 <div id="tab-settings" class="rmp-accordions" aria-label="Settings">
@@ -345,37 +444,31 @@
345 444
346 445 <div id="tab-settings" class="rmp-accordions" aria-label="Settings">
347 446 <ul class="rmp-editor-pane-parent">
348 447 <?php
349 - echo $ui_manager->add_editor_menu_item( [
350 - 'item_class' => 'is-child-item rmp-tab-item-general-settings',
351 - 'aria_owns' => 'tab-general-settings',
352 - 'item_header' => [
353 - 'item_svg_icon' => RMP_PLUGIN_PATH_V4 .'/assets/admin/icons/svg/general.svg',
354 - 'item_title' => __('General Settings','responsive-menu-pro'),
355 - ]
356 - ] );
448 + $ui_manager->add_editor_menu_item(
449 + array(
450 + 'item_class' => 'is-child-item rmp-tab-item-general-settings',
451 + 'aria_owns' => 'tab-general-settings',
452 + 'item_header' => array(
453 + 'item_svg_icon' => RMP_PLUGIN_PATH_V4 . '/assets/admin/icons/svg/general.svg',
454 + 'item_title' => esc_html__( 'General Settings', 'responsive-menu' ),
455 + ),
456 + )
457 + );
357 458
358 - echo $ui_manager->add_editor_menu_item( [
359 - 'item_class' => 'is-child-item rmp-tab-item-advanced-settings',
360 - 'aria_owns' => 'tab-advanced-settings',
361 - 'item_header' => [
362 - 'item_svg_icon' => RMP_PLUGIN_PATH_V4 .'/assets/admin/icons/svg/advanced.svg',
363 - 'item_title' => __('Advanced Settings','responsive-menu-pro'),
364 - ]
365 - ] );
459 + $ui_manager->add_editor_menu_item(
460 + array(
461 + 'item_class' => 'is-child-item rmp-tab-item-advanced-settings',
462 + 'aria_owns' => 'tab-advanced-settings',
463 + 'item_header' => array(
464 + 'item_svg_icon' => RMP_PLUGIN_PATH_V4 . '/assets/admin/icons/svg/advanced.svg',
465 + 'item_title' => esc_html__( 'Advanced Settings', 'responsive-menu' ),
466 + ),
467 + )
468 + );
366 469
367 - if ( ! empty( get_option('responsive_menu_version') ) ) {
368 - echo $ui_manager->add_editor_menu_item( [
369 - 'item_class' => 'is-child-item rmp-tab-item-legacy-settings',
370 - 'aria_owns' => 'tab-legacy-settings',
371 - 'item_header' => [
372 - 'item_svg_icon' => RMP_PLUGIN_PATH_V4 .'/assets/admin/icons/svg/general.svg',
373 - 'item_title' => __('Legacy Settings','responsive-menu-pro'),
374 - ]
375 - ] );
376 - }
377 - ?>
470 + ?>
378 471 </ul>
379 472 </div>
380 473
381 474 <div id="tab-general-settings" class="rmp-accordions" aria-label="General Settings">
@@ -381,98 +474,103 @@
381 474 <div id="tab-general-settings" class="rmp-accordions" aria-label="General Settings">
382 475 <ul class="rmp-accordion-container">
383 476 <?php
384 477
385 - echo $ui_manager->start_accordion_item( [
386 - 'item_header' => [
387 - 'item_title' => __('Menu Settings','responsive-menu-pro'),
388 - ],
389 - 'feature_type' => 'semi-pro'
390 - ]);
478 + $ui_manager->start_accordion_item(
479 + array(
480 + 'item_header' => array(
481 + 'item_title' => esc_html__( 'Menu Settings', 'responsive-menu' ),
482 + ),
483 + 'feature_type' => 'semi-pro',
484 + )
485 + );
391 486
392 - echo $ui_manager->start_group_controls();
393 -
394 - echo $control_manager->add_text_input_control( [
395 - 'label' => __('Name','responsive-menu-pro'),
396 - 'type' => 'text',
397 - 'id' => 'rmp-menu-name',
398 - 'name' => 'menu[menu_name]',
399 - 'value' => rmp_get_value( $options, 'menu_name' ),
400 - ] );
487 + $ui_manager->start_group_controls();
401 488
402 - $label = sprintf( '%s <strong> %s </strong> <a href="%s" target="_blank"> %s </a>
403 - <br/> <strong> %s <a href="%s" target="_blank"> %s </a> %s </strong>',
404 - esc_html__( 'If no options appear here, make sure you have set them up under', 'responsive-menu-pro' ),
405 - esc_html__( 'Appearance > Menus or', 'responsive-menu-pro' ),
406 - esc_url( admin_url() . 'nav-menus.php' ),
407 - esc_html__('here', 'responsive-menu-pro' ),
408 - esc_html__('Please note that the', 'responsive-menu-pro' ),
409 - esc_url( admin_url() . 'nav-menus.php' ),
410 - esc_html__('Theme Location', 'responsive-menu-pro' ),
411 - esc_html__('option will take precedence over this.', 'responsive-menu-pro' )
489 + $control_manager->add_text_input_control(
490 + array(
491 + 'label' => esc_html__( 'Name', 'responsive-menu' ),
492 + 'type' => 'text',
493 + 'id' => 'rmp-menu-name',
494 + 'name' => 'menu[menu_name]',
495 + 'value' => rmp_get_value( $options, 'menu_name' ),
496 + )
412 497 );
413 498
414 - $menus = wp_get_nav_menus();
415 - $wp_menu_list = [];
416 - foreach ( $menus as $menu ) {
417 - $wp_menu_list[ $menu->slug ] = $menu->name;
499 + $label = sprintf(
500 + esc_html__( 'If no options appear here, make sure you have set them up under', 'responsive-menu' ) . '<strong>' . esc_html__( 'Appearance > Menus or', 'responsive-menu' ) . '</strong> <a href="' . esc_url( admin_url() . 'nav-menus.php' ) . '" target="_blank" rel="noopener"> ' . esc_html__( 'here', 'responsive-menu' ) . ' </a>
501 + <br/> <strong> ' . esc_html__( 'Please note that the', 'responsive-menu' ) . ' <a href="' . esc_url( admin_url() . 'nav-menus.php' ) . '" target="_blank" rel="noopener"> ' . esc_html__( 'Theme Location', 'responsive-menu' ) . ' </a> ' . esc_html__( 'option will take precedence over this.', 'responsive-menu' ) . ' </strong>'
502 + );
503 +
504 + $nav_menus = wp_get_nav_menus();
505 + $wp_menu_list = array();
506 + foreach ( $nav_menus as $nav_menu ) {
507 + $wp_menu_list[ $nav_menu->term_id ] = $nav_menu->name;
418 508 }
419 - echo $control_manager->add_select_control( [
420 - 'label' => __('Choose WP Menu','responsive-menu-pro'),
421 - 'id' => 'rmp-menu-to-use',
422 - 'tool_tip' => [
423 - 'text' => $label,
424 - ],
425 - 'name' => 'menu[menu_to_use]',
426 - 'options' => $wp_menu_list,
427 - 'value' => rmp_get_value( $options, 'menu_to_use' ),
428 - ] );
429 - echo $ui_manager->end_group_controls();
509 + $control_manager->add_select_control(
510 + array(
511 + 'label' => esc_html__( 'Choose WP Menu', 'responsive-menu' ),
512 + 'id' => 'rmp-menu-to-use',
513 + 'tool_tip' => array(
514 + 'text' => $label,
515 + ),
516 + 'name' => 'menu[menu_to_use]',
517 + 'options' => $wp_menu_list,
518 + 'value' => $current_wp_menu->term_id,
519 + )
520 + );
521 + $ui_manager->end_group_controls();
430 522
431 - echo $ui_manager->accordion_divider();
523 + $ui_manager->accordion_divider();
432 524
433 - echo $control_manager->add_switcher_control( [
434 - 'label' => __(' Use different menu for mobile & tablet ','responsive-menu-pro'),
435 - 'group_classes' => 'full-size',
436 - 'id' => 'rmp-menu-different-menu-for-mobile',
437 - 'class' => 'rmp-menu-different-menu-for-mobile',
438 - 'feature_type' => 'pro',
439 - 'name' => 'mobile_menu_to_use',
440 - 'is_checked' => false
441 - ] );
525 + $control_manager->add_switcher_control(
526 + array(
527 + 'label' => esc_html__( ' Use different menu for mobile & tablet ', 'responsive-menu' ),
528 + 'group_classes' => 'full-size',
529 + 'id' => 'rmp-menu-different-menu-for-mobile',
530 + 'class' => 'rmp-menu-different-menu-for-mobile',
531 + 'feature_type' => 'pro',
532 + 'name' => 'mobile_menu_to_use',
533 + 'is_checked' => false,
534 + )
535 + );
442 536
443 - echo $ui_manager->accordion_divider();
444 - echo $control_manager->add_device_visibility_control( $options );
537 + $ui_manager->accordion_divider();
538 + $control_manager->add_device_visibility_control( $options );
445 539
446 - echo $ui_manager->accordion_divider();
447 - echo $control_manager->add_select_control( [
448 - 'label' => __('Display condition','responsive-menu-pro'),
449 - 'id' => 'rmp-menu-display-condition',
450 - 'name' => 'menu[menu_display_on]',
451 - 'options' => [
452 - 'all-pages' => __( 'Show on all pages ', 'responsive-menu-pro' ),
453 - 'shortcode' => __( 'Use as shortcode', 'responsive-menu-pro' ),
454 - 'exclude-pages' => __( 'Exclude some pages (PRO) ', 'responsive-menu-pro' ),
455 - 'include-pages' => __( 'Include only pages (PRO)', 'responsive-menu-pro' )
456 - ],
457 - 'value' => rmp_get_value( $options, 'menu_display_on' ),
458 - ] );
540 + $ui_manager->accordion_divider();
541 + $control_manager->add_select_control(
542 + array(
543 + 'label' => esc_html__( 'Display condition', 'responsive-menu' ),
544 + 'id' => 'rmp-menu-display-condition',
545 + 'name' => 'menu[menu_display_on]',
546 + 'options' => array(
547 + 'all-pages' => esc_html__( 'Show on all pages ', 'responsive-menu' ),
548 + 'shortcode' => esc_html__( 'Use as shortcode', 'responsive-menu' ),
549 + 'exclude-pages' => esc_html__( 'Exclude some pages (PRO) ', 'responsive-menu' ),
550 + 'include-pages' => esc_html__( 'Include only pages (PRO)', 'responsive-menu' ),
551 + ),
552 + 'value' => rmp_get_value( $options, 'menu_display_on' ),
553 + )
554 + );
459 555
460 - echo $ui_manager->accordion_divider();
461 - echo $control_manager->add_text_input_control( [
462 - 'label' => __('Hide Theme Menu','responsive-menu-pro'),
463 - 'type' => 'text',
464 - 'group_classes' => 'full-size',
465 - 'id' => 'rmp-menu-to-hide',
466 - 'name' => 'menu[menu_to_hide]',
467 - 'tool_tip' => [
468 - 'text' => __('To hide your current theme menu you need to put the CSS selector here. Any legal CSS selection criteria is valid.','responsive-menu-pro' )
469 - ],
470 - 'value' => rmp_get_value($options,'menu_to_hide'),
471 - ] );
556 + $ui_manager->accordion_divider();
557 + $control_manager->add_text_input_control(
558 + array(
559 + 'label' => esc_html__( 'Hide Theme Menu', 'responsive-menu' ),
560 + 'type' => 'text',
561 + 'group_classes' => 'full-size',
562 + 'id' => 'rmp-menu-to-hide',
563 + 'name' => 'menu[menu_to_hide]',
564 + 'tool_tip' => array(
565 + 'text' => esc_html__( 'To hide your current theme menu you need to put the CSS selector here. Any legal CSS selection criteria is valid.', 'responsive-menu' ),
566 + ),
567 + 'value' => rmp_get_value( $options, 'menu_to_hide' ),
568 + )
569 + );
472 570
473 - echo $ui_manager->end_accordion_item();
474 - ?>
571 + $ui_manager->end_accordion_item();
572 + ?>
475 573 </ul>
476 574 </div>
477 575
478 576 <div id="tab-menu-styling" class="rmp-accordions" aria-label="Menu Styling">
@@ -477,1209 +575,1374 @@
477 575
478 576 <div id="tab-menu-styling" class="rmp-accordions" aria-label="Menu Styling">
479 577 <ul class="rmp-accordion-container">
480 578 <?php
481 -
482 579
483 - echo $ui_manager->start_accordion_item( [
484 - 'item_header' => [
485 - 'item_title' => __('Menu ','responsive-menu-pro'),
486 - ],
487 - 'feature_type' => 'semi-pro'
488 - ] );
489 - echo $ui_manager->start_tabs_controls_panel(
490 - [ 'tab_classes' => 'rmp-tab-content',
491 - 'tab_items' =>
492 - [
493 - 0 => [
494 - 'item_class' => 'nav-tab-active',
495 - 'item_target' => 'menu-item-contents',
496 - 'item_text' => __('Contents ','responsive-menu-pro'),
497 - ],
498 - 1 => [
499 - 'item_class' => '',
500 - 'item_target' => 'menu-item-styling',
501 - 'item_text' => __('Styling ','responsive-menu-pro'),
502 - ]
503 - ]
504 - ]
580 +
581 + $ui_manager->start_accordion_item(
582 + array(
583 + 'item_header' => array(
584 + 'item_title' => esc_html__( 'Menu Settings', 'responsive-menu' ),
585 + ),
586 + 'feature_type' => 'semi-pro',
587 + )
588 + );
589 +
590 +
591 + $control_manager->add_text_input_control(
592 + array(
593 + 'label' => esc_html__( 'Custom Walker', 'responsive-menu' ),
594 + 'group_classes' => 'full-size',
595 + 'type' => 'text',
596 + 'id' => 'rmp-custom-walker',
597 + 'tool_tip' => array(
598 + 'text' => esc_html__( 'Modify the HTML output by using a custom Walker class.', 'responsive-menu' ),
599 + ),
600 + 'name' => 'menu[custom_walker]',
601 + 'value' => rmp_get_value( $options, 'custom_walker' ),
602 + )
603 + );
604 +
605 +
606 + $ui_manager->start_group_controls();
607 + $control_manager->add_color_control(
608 + array(
609 + 'label' => esc_html__( 'Menu Background', 'responsive-menu' ),
610 + 'id' => 'rmp-menu-background-colour',
611 + 'name' => 'menu[menu_background_colour]',
612 + 'value' => rmp_get_value( $options, 'menu_background_colour' ),
613 + )
505 614 );
506 615
507 - echo $ui_manager->start_tab_item(
508 - [
509 - 'item_id' => 'menu-item-contents',
510 - 'item_class' => 'title-contents',
511 - ]
616 + $control_manager->add_select_control(
617 + array(
618 + 'label' => esc_html__( 'Depth Level', 'responsive-menu' ),
619 + 'id' => 'rmp-menu-depth',
620 + 'tool_tip' => array(
621 + 'text' => esc_html__( 'Set the level of nesting for sub menus.', 'responsive-menu' ),
622 + ),
623 + 'name' => 'menu[menu_depth]',
624 + 'options' => array(
625 + '1' => 1,
626 + '2' => 2,
627 + '3' => 3,
628 + '4' => 4,
629 + '5' => 5,
630 + ),
631 + 'value' => rmp_get_value( $options, 'menu_depth' ),
632 + )
512 633 );
513 634
514 - echo $ui_manager->start_group_controls();
635 + $ui_manager->end_group_controls();
515 636
516 - echo $control_manager->add_color_control( [
517 - 'label' => __('Menu Background','responsive-menu-pro'),
518 - 'id' => 'rmp-menu-background-colour',
519 - 'name' => 'menu[menu_background_colour]',
520 - 'value' => rmp_get_value($options,'menu_background_colour'),
521 - ] );
522 -
523 - echo $control_manager->add_select_control( [
524 - 'label' => __('Depth Level','responsive-menu-pro'),
525 - 'id' => 'rmp-menu-depth',
526 - 'tool_tip' => [
527 - 'text' => __('Set the level of nesting for sub menus.','responsive-menu-pro'),
528 - ],
529 - 'name' => 'menu[menu_depth]',
530 - 'options' => array( '1'=>1, '2'=>2, '3' => 3, '4'=>4,'5'=>5 ),
531 - 'value' => rmp_get_value($options,'menu_depth'),
532 - ] );
533 -
534 - echo $ui_manager->end_group_controls();
535 -
536 - echo $ui_manager->accordion_divider();
537 -
538 - echo $control_manager->add_switcher_control( [
539 - 'label' => __('Item Descriptions','responsive-menu-pro'),
540 - 'id' => 'rmp-menu-submenu-descriptions-on',
541 - 'tool_tip' => [
542 - 'text' => __('Show the description text of menu items. Description text should be set while creating WordPress menus.','responsive-menu-pro'),
543 - ],
544 - 'name' => 'menu[submenu_descriptions_on]',
545 - 'is_checked' => is_rmp_option_checked('on', $options,'submenu_descriptions_on'),
546 - ] );
547 -
548 - echo $ui_manager->accordion_divider();
549 -
550 -
551 -
552 - echo $control_manager->add_text_input_control( [
553 - 'label' => __('Custom Walker','responsive-menu-pro'),
554 - 'group_classes' => 'full-size',
555 - 'type' => 'text',
556 - 'id' => 'rmp-custom-walker',
557 - 'tool_tip' => [
558 - 'text' => __('Modify the HTML output by using a custom Walker class.','responsive-menu-pro'),
559 - ],
560 - 'name' => 'menu[custom_walker]',
561 - 'value' => rmp_get_value($options,'custom_walker'),
562 - ] );
563 - echo $ui_manager->end_tab_item();
564 - echo $ui_manager->start_tab_item(
565 - [
566 - 'item_id' => 'menu-item-styling',
567 - 'item_class' => 'title-contents',
568 - ]
637 + $control_manager->add_group_text_control(
638 + array(
639 + 'label' => esc_html__( 'Padding', 'responsive-menu' ),
640 + 'type' => 'text',
641 + 'class' => 'rmp-menu-section-padding',
642 + 'name' => 'menu[menu_section_padding]',
643 + 'input_options' => array( 'top', 'right', 'bottom', 'left' ),
644 + 'value_options' => ! empty( $options['menu_section_padding'] ) ? $options['menu_section_padding'] : '',
645 + )
569 646 );
570 - echo $control_manager->add_switcher_control( [
571 - 'label' => __('Smooth Scroll Enabled','responsive-menu-pro'),
572 - 'id' => 'rmp-menu-smooth-scroll-on',
573 - 'class' => 'rmp-menu-smooth-scroll-on',
574 - 'tool_tip' => [
575 - 'text' => __('The webpage will scroll smoothly to their target sections on same page.','responsive-menu-pro'),
576 - ],
577 - 'name' => 'smooth_scroll_on',
578 - 'feature_type' => 'pro',
579 - 'is_checked' => ''
580 - ] );
581 -
582 - echo $control_manager->add_text_input_control( [
583 - 'label' => __('Scroll Speed','responsive-menu-pro'),
584 - 'type' => 'number',
585 - 'id' => 'rmp-menu-smooth-scroll-speed',
586 - 'name' => 'smooth_scroll_speed',
587 - 'feature_type' => 'pro',
588 - 'value' => '0',
589 - 'has_unit' => [
590 - 'unit_type' => 'ms',
591 - ],
592 - ] );
593 - echo $ui_manager->end_tab_item();
594 647
595 - echo $ui_manager->end_accordion_item();
648 + $ui_manager->end_accordion_item();
596 649
597 - echo $ui_manager->start_accordion_item( [
598 - 'item_header' => [
599 - 'item_title' => __('Item Icon','responsive-menu-pro'),
600 - ],
601 - 'feature_type' => 'pro',
602 - 'item_content' => [
603 - 'content_class' => 'upgrade-notice-contents'
604 - ]
605 - ] );
606 - echo $control_manager->upgrade_notice();
607 - echo $ui_manager->end_accordion_item();
650 + $ui_manager->start_accordion_item(
651 + array(
652 + 'item_header' => array(
653 + 'item_title' => esc_html__( 'Item Icon', 'responsive-menu' ),
654 + ),
655 + 'feature_type' => 'pro',
656 + 'item_content' => array(
657 + 'content_class' => 'upgrade-notice-contents',
658 + ),
659 + )
660 + );
661 + $control_manager->upgrade_notice();
662 + $ui_manager->end_accordion_item();
608 663
609 - echo $ui_manager->start_accordion_item( [
610 - 'item_header' => [
611 - 'item_title' => __('Item Styling','responsive-menu-pro'),
612 - ]
613 - ] );
664 + $ui_manager->start_accordion_item(
665 + array(
666 + 'item_header' => array(
667 + 'item_title' => esc_html__( 'Item Styling', 'responsive-menu' ),
668 + ),
669 + )
670 + );
614 671
615 - echo $ui_manager->start_tabs_controls_panel(
616 - [ 'tab_classes' => 'rmp-tab-content',
672 + $ui_manager->start_tabs_controls_panel(
673 + array(
674 + 'tab_classes' => 'rmp-tab-content',
617 675 'tab_items' =>
618 - [
619 - 0 => [
676 + array(
677 + 0 => array(
620 678 'item_class' => 'nav-tab-active',
621 679 'item_target' => 'top-level-item-styling',
622 - 'item_text' => __('Top Level','responsive-menu-pro'),
623 - ],
624 - 1 => [
680 + 'item_text' => esc_html__( 'Top Level', 'responsive-menu' ),
681 + ),
682 + 1 => array(
625 683 'item_class' => '',
626 684 'item_target' => 'sub-level-item-styling',
627 - 'item_text' => __('Sub Menu','responsive-menu-pro'),
628 - ]
629 - ]
630 - ]
685 + 'item_text' => esc_html__( 'Sub Menu', 'responsive-menu' ),
686 + ),
687 + ),
688 + )
631 689 );
632 -
633 - echo $ui_manager->start_tab_item(
634 - [
690 +
691 + $ui_manager->start_tab_item(
692 + array(
635 693 'item_id' => 'top-level-item-styling',
636 694 'item_class' => 'title-contents',
637 - ]
695 + )
638 696 );
639 - echo $control_manager->add_text_input_control( [
640 - 'label' => __('Item Height','responsive-menu-pro'),
641 - 'type' => 'number',
642 - 'id' => 'rmp-menu-links-height',
643 - 'name' => 'menu[menu_links_height]',
644 - 'value' => rmp_get_value($options,'menu_links_height'),
645 - 'group_classes' => 'full-size',
646 - 'multi_device' => true,
647 - 'has_unit' => [
648 - 'unit_type' => 'all',
649 - 'id' => 'rmp-menu-links-height-unit',
650 - 'name' => 'menu[menu_links_height_unit]',
651 - 'classes' => 'is-unit',
652 - 'default' => 'px',
653 - 'value' => rmp_get_value($options,'menu_links_height_unit'),
697 + $control_manager->add_text_input_control(
698 + array(
699 + 'label' => esc_html__( 'Item Height', 'responsive-menu' ),
700 + 'type' => 'number',
701 + 'id' => 'rmp-menu-links-height',
702 + 'class' => 'no-updates',
703 + 'name' => 'menu[menu_links_height]',
704 + 'value' => rmp_get_value( $options, 'menu_links_height' ),
705 + 'group_classes' => 'full-size',
706 + 'multi_device' => true,
707 + 'has_unit' => array(
708 + 'unit_type' => 'all',
709 + 'id' => 'rmp-menu-links-height-unit',
710 + 'name' => 'menu[menu_links_height_unit]',
711 + 'classes' => 'is-unit no-updates',
712 + 'default' => 'px',
713 + 'value' => rmp_get_value( $options, 'menu_links_height_unit' ),
714 + 'multi_device' => true,
715 + ),
716 + )
717 + );
718 +
719 + $control_manager->add_text_input_control(
720 + array(
721 + 'label' => esc_html__( 'Line Height', 'responsive-menu' ),
722 + 'type' => 'number',
723 + 'id' => 'rmp-menu-links-line-height',
724 + 'class' => 'no-updates',
725 + 'name' => 'menu[menu_links_line_height]',
726 + 'value' => rmp_get_value( $options, 'menu_links_line_height' ),
727 + 'group_classes' => 'full-size',
728 + 'multi_device' => true,
729 + 'has_unit' => array(
730 + 'unit_type' => 'all',
731 + 'id' => 'rmp-menu-links-line-height-unit',
732 + 'name' => 'menu[menu_links_line_height_unit]',
733 + 'classes' => 'is-unit no-updates',
734 + 'default' => 'px',
735 + 'value' => rmp_get_value( $options, 'menu_links_line_height_unit' ),
736 + 'multi_device' => true,
737 + ),
738 + )
739 + );
740 +
741 + $control_manager->add_text_input_control(
742 + array(
743 + 'label' => esc_html__( 'Padding', 'responsive-menu' ),
744 + 'type' => 'number',
745 + 'id' => 'rmp-menu-depth-level-0',
746 + 'class' => 'no-updates',
747 + 'name' => 'menu[menu_depth_0]',
748 + 'value' => rmp_get_value( $options, 'menu_depth_0' ),
749 + 'group_classes' => 'full-size',
750 + 'has_unit' => array(
751 + 'unit_type' => 'all',
752 + 'id' => 'rmp-menu-depth-level-0-unit',
753 + 'name' => 'menu[menu_depth_0_unit]',
754 + 'classes' => 'is-unit no-updates',
755 + 'default' => '%',
756 + 'value' => rmp_get_value( $options, 'menu_depth_0_unit' ),
757 + ),
758 + )
759 + );
760 +
761 + $ui_manager->start_sub_accordion();
762 +
763 + $ui_manager->start_accordion_item(
764 + array(
765 + 'item_header' => array(
766 + 'item_title' => esc_html__( 'Typography', 'responsive-menu' ),
767 + ),
768 + )
769 + );
770 +
771 + $control_manager->add_text_input_control(
772 + array(
773 + 'label' => esc_html__( 'Font Size', 'responsive-menu' ),
774 + 'type' => 'number',
775 + 'id' => 'rmp-menu-font-size',
776 + 'name' => 'menu[menu_font_size]',
777 + 'class' => 'no-updates',
778 + 'value' => rmp_get_value( $options, 'menu_font_size' ),
779 + 'group_classes' => 'full-size',
780 + 'multi_device' => true,
781 + 'has_unit' => array(
782 + 'unit_type' => 'all',
783 + 'id' => 'rmp-menu-font-size-unit',
784 + 'name' => 'menu[menu_font_size_unit]',
785 + 'default' => 'px',
786 + 'classes' => 'is-unit no-updates',
787 + 'value' => rmp_get_value( $options, 'menu_font_size_unit' ),
788 + 'multi_device' => true,
789 + ),
790 + )
791 + );
792 +
793 +
794 +
795 + $control_manager->add_text_input_control(
796 + array(
797 + 'label' => esc_html__( 'Font Family', 'responsive-menu' ),
798 + 'type' => 'text',
799 + 'id' => 'rmp-menu-font',
800 + 'name' => 'menu[menu_font]',
801 + 'class' => 'no-updates',
802 + 'value' => rmp_get_value( $options, 'menu_font' ),
654 803 'multi_device' => true,
655 - ],
656 - ] );
804 + )
805 + );
657 806
658 - echo $control_manager->add_text_input_control( [
659 - 'label' => __('Line Height','responsive-menu-pro'),
660 - 'type' => 'number',
661 - 'id' => 'rmp-menu-links-line-height',
662 - 'name' => 'menu[menu_links_line_height]',
663 - 'value' => rmp_get_value($options,'menu_links_line_height'),
664 - 'group_classes' => 'full-size',
665 - 'multi_device' => true,
666 - 'has_unit' => [
667 - 'unit_type' => 'all',
668 - 'id' => 'rmp-menu-links-line-height-unit',
669 - 'name' => 'menu[menu_links_line_height_unit]',
670 - 'classes' => 'is-unit',
671 - 'default' => 'px',
672 - 'value' => rmp_get_value($options,'menu_links_line_height_unit'),
807 + $control_manager->add_select_control(
808 + array(
809 + 'label' => esc_html__( 'Font Weight', 'responsive-menu' ),
810 + 'id' => 'rmp-menu-font-weight',
811 + 'class' => 'no-updates',
812 + 'name' => 'menu[menu_font_weight]',
813 + 'options' => rmp_font_weight_options(),
814 + 'value' => rmp_get_value( $options, 'menu_font_weight' ),
815 + 'group_classes' => 'full-size',
816 + )
817 + );
818 +
819 + $control_manager->add_text_alignment_control(
820 + array(
821 + 'label' => esc_html__( 'Text Alignment', 'responsive-menu' ),
822 + 'class' => 'rmp-menu-text-alignment',
823 + 'name' => 'menu[menu_text_alignment]',
824 + 'options' => array( 'left', 'center', 'right', 'justify' ),
825 + 'value' => rmp_get_value( $options, 'menu_text_alignment' ),
826 + 'group_classes' => 'full-size',
827 + )
828 + );
829 +
830 + $control_manager->add_text_input_control(
831 + array(
832 + 'label' => esc_html__( 'Letter Spacing', 'responsive-menu' ),
833 + 'type' => 'number',
834 + 'id' => 'rmp-menu-text-letter-spacing',
835 + 'class' => 'no-updates',
836 + 'name' => 'menu[menu_text_letter_spacing]',
837 + 'value' => rmp_get_value( $options, 'menu_text_letter_spacing' ),
838 + 'group_classes' => 'full-size',
839 + 'has_unit' => array(
840 + 'unit_type' => 'px',
841 + ),
842 + )
843 + );
844 +
845 + $control_manager->add_switcher_control(
846 + array(
847 + 'label' => esc_html__( 'Word Wrap', 'responsive-menu' ),
848 + 'id' => 'rmp-menu-word-wrap',
849 + 'class' => 'rmp-menu-word-wrap',
850 + 'tool_tip' => array(
851 + 'text' => esc_html__( 'Allow the menu items to wrap around to the next line.', 'responsive-menu' ),
852 + ),
853 + 'name' => 'menu[menu_word_wrap]',
854 + 'is_checked' => is_rmp_option_checked( 'on', $options, 'menu_word_wrap' ),
855 +
856 + )
857 + );
858 +
859 + $ui_manager->end_accordion_item();
860 +
861 + $ui_manager->start_accordion_item(
862 + array(
863 + 'item_header' => array(
864 + 'item_title' => esc_html__( 'Text Color', 'responsive-menu' ),
865 + ),
866 + )
867 + );
868 +
869 +
870 + $control_manager->add_color_control(
871 + array(
872 + 'label' => esc_html__( 'Normal', 'responsive-menu' ),
873 + 'id' => 'rmp-menu-link-color',
874 + 'name' => 'menu[menu_link_colour]',
875 + 'value' => rmp_get_value( $options, 'menu_link_colour' ),
673 876 'multi_device' => true,
674 - ],
675 - ] );
877 + )
878 + );
676 879
677 - echo $control_manager->add_text_input_control( [
678 - 'label' => __('Padding','responsive-menu-pro'),
679 - 'type' => 'number',
680 - 'id' => 'rmp-menu-depth-level-0',
681 - 'name' => 'menu[menu_depth_0]',
682 - 'value' => rmp_get_value($options,'menu_depth_0'),
683 - 'group_classes' => 'full-size',
684 - 'has_unit' => [
685 - 'unit_type' => 'all',
686 - 'id' => 'rmp-menu-depth-level-0-unit',
687 - 'name' => 'menu[menu_depth_0_unit]',
688 - 'classes' => 'is-unit',
689 - 'default' => '%',
690 - 'value' => rmp_get_value($options,'menu_depth_0_unit'),
691 - ],
692 - ] );
880 + $control_manager->add_color_control(
881 + array(
882 + 'label' => esc_html__( 'Hover', 'responsive-menu' ),
883 + 'id' => 'rmp-menu-link-hover-color',
884 + 'name' => 'menu[menu_link_hover_colour]',
885 + 'value' => rmp_get_value( $options, 'menu_link_hover_colour' ),
693 886
694 - echo $ui_manager->start_sub_accordion();
887 + 'multi_device' => true,
888 + )
889 + );
695 890
696 - echo $ui_manager->start_accordion_item( [
697 - 'item_header' => [
698 - 'item_title' => __('Typography','responsive-menu-pro')
699 - ]
700 - ] );
701 -
702 - echo $control_manager->add_text_input_control( [
703 - 'label' => __('Font Size','responsive-menu-pro'),
704 - 'type' => 'number',
705 - 'id' => 'rmp-menu-font-size',
706 - 'name' => 'menu[menu_font_size]',
707 - 'class' => 'no-updates',
708 - 'value' => rmp_get_value($options,'menu_font_size'),
709 - 'group_classes' => 'full-size',
710 - 'multi_device' => true,
711 - 'has_unit' => [
712 - 'unit_type' => 'all',
713 - 'id' => 'rmp-menu-font-size-unit',
714 - 'name' => 'menu[menu_font_size_unit]',
715 - 'default' => 'px',
716 - 'classes' => 'is-unit no-updates',
717 - 'value' => rmp_get_value($options,'menu_font_size_unit'),
891 + $control_manager->add_color_control(
892 + array(
893 + 'label' => esc_html__( 'Active Item', 'responsive-menu' ),
894 + 'id' => 'rmp-menu-current-link-active-color',
895 + 'name' => 'menu[menu_current_link_colour]',
896 + 'value' => rmp_get_value( $options, 'menu_current_link_colour' ),
897 +
898 + )
899 + );
900 +
901 + $control_manager->add_color_control(
902 + array(
903 + 'label' => esc_html__( 'Active Item Hover', 'responsive-menu' ),
904 + 'id' => 'rmp-menu-current-link-active-hover-color',
905 + 'name' => 'menu[menu_current_link_hover_colour]',
906 + 'value' => rmp_get_value( $options, 'menu_current_link_hover_colour' ),
907 +
908 + )
909 + );
910 +
911 + $ui_manager->end_accordion_item();
912 +
913 + $ui_manager->start_accordion_item(
914 + array(
915 + 'item_header' => array(
916 + 'item_title' => esc_html__( 'Background Color', 'responsive-menu' ),
917 + ),
918 + )
919 + );
920 +
921 + $control_manager->add_color_control(
922 + array(
923 + 'label' => esc_html__( 'Background', 'responsive-menu' ),
924 + 'id' => 'rmp-menu-item-background-colour',
925 + 'name' => 'menu[menu_item_background_colour]',
926 + 'value' => rmp_get_value( $options, 'menu_item_background_colour' ),
927 +
718 928 'multi_device' => true,
719 - ],
720 - ] );
721 929
722 -
930 + )
931 + );
723 932
724 - echo $control_manager->add_text_input_control( [
725 - 'label' => __('Font Family','responsive-menu-pro'),
726 - 'type' => 'text',
727 - 'id' => 'rmp-menu-font',
728 - 'name' => 'menu[menu_font]',
729 - 'class' => 'no-updates',
730 - 'value' => rmp_get_value($options,'menu_font'),
731 - 'multi_device' => true,
732 - ] );
933 + $control_manager->add_color_control(
934 + array(
935 + 'label' => esc_html__( 'Background Hover', 'responsive-menu' ),
936 + 'id' => 'rmp-menu-item-background-hover-color',
937 + 'name' => 'menu[menu_item_background_hover_colour]',
938 + 'value' => rmp_get_value( $options, 'menu_item_background_hover_colour' ),
733 939
734 - echo $control_manager->add_select_control( [
735 - 'label' => __('Font Weight','responsive-menu-pro'),
736 - 'id' => 'rmp-menu-font-weight',
737 - 'class' => 'no-updates',
738 - 'name' => 'menu[menu_font_weight]',
739 - 'options' => rmp_font_weight_options(),
740 - 'value' => rmp_get_value($options,'menu_font_weight'),
741 - 'group_classes' => 'full-size',
742 - ] );
940 + 'multi_device' => true,
941 + )
942 + );
743 943
744 - echo $control_manager->add_text_alignment_control( [
745 - 'label' => __('Text Alignment','responsive-menu-pro'),
746 - 'class' => 'rmp-menu-text-alignment',
747 - 'name' => 'menu[menu_text_alignment]',
748 - 'options' => ['left','center','right','justify'],
749 - 'value' => rmp_get_value($options,'menu_text_alignment'),
750 - 'group_classes' => 'full-size',
751 - ] );
944 + $control_manager->add_color_control(
945 + array(
946 + 'label' => esc_html__( 'Active Item Background', 'responsive-menu' ),
947 + 'id' => 'rmp-menu-current-item-background-color',
948 + 'name' => 'menu[menu_current_item_background_colour]',
949 + 'value' => rmp_get_value( $options, 'menu_current_item_background_colour' ),
752 950
753 - echo $control_manager->add_text_input_control( [
754 - 'label' => __('Letter Spacing','responsive-menu-pro'),
755 - 'type' => 'number',
756 - 'id' => 'rmp-menu-text-letter-spacing',
757 - 'name' => 'menu[menu_text_letter_spacing]',
758 - 'value' => rmp_get_value($options,'menu_text_letter_spacing'),
759 - 'group_classes' => 'full-size',
760 - 'has_unit' => [
761 - 'unit_type' => 'px',
762 - ],
763 - ] );
951 + )
952 + );
764 953
765 - echo $control_manager->add_switcher_control( [
766 - 'label' => __('Word Wrap','responsive-menu-pro'),
767 - 'id' => 'rmp-menu-word-wrap',
768 - 'class' => 'rmp-menu-word-wrap',
769 - 'tool_tip' => [
770 - 'text' => __('Allow the menu items to wrap around to the next line.','responsive-menu-pro'),
771 - ],
772 - 'name' => 'menu[menu_word_wrap]',
773 - 'is_checked' => is_rmp_option_checked('on', $options,'menu_word_wrap'),
774 -
775 - ] );
954 + $control_manager->add_color_control(
955 + array(
956 + 'label' => esc_html__( 'Active Item Background Hover', 'responsive-menu' ),
957 + 'id' => 'rmp-menu-current-item-background-hover-color',
958 + 'name' => 'menu[menu_current_item_background_hover_colour]',
959 + 'value' => rmp_get_value( $options, 'menu_current_item_background_hover_colour' ),
776 960
777 - echo $ui_manager->end_accordion_item();
961 + )
962 + );
963 + $ui_manager->end_accordion_item();
778 964
779 - echo $ui_manager->start_accordion_item( [
780 - 'item_header' => [
781 - 'item_title' => __('Text Color','responsive-menu-pro')
782 - ]
783 - ] );
965 + $ui_manager->start_accordion_item(
966 + array(
967 + 'item_header' => array(
968 + 'item_title' => esc_html__( 'Border', 'responsive-menu' ),
969 + ),
970 + )
971 + );
784 972
973 + $control_manager->add_text_input_control(
974 + array(
975 + 'label' => esc_html__( 'Border Width', 'responsive-menu' ),
976 + 'type' => 'number',
977 + 'id' => 'rmp-menu-border-width',
978 + 'name' => 'menu[menu_border_width]',
979 + 'value' => rmp_get_value( $options, 'menu_border_width' ),
980 + 'class' => 'no-updates',
981 + 'tool_tip' => array(
982 + 'text' => esc_html__( 'Set the border size for each menu link and it\'s unit.', 'responsive-menu' ),
983 + ),
984 + 'has_unit' => array(
985 + 'unit_type' => 'all',
986 + 'id' => 'rmp-menu-border-width-unit',
987 + 'name' => 'menu[menu_border_width_unit]',
988 + 'classes' => 'is-unit no-updates',
989 + 'default' => 'px',
990 + 'value' => rmp_get_value( $options, 'menu_border_width_unit' ),
991 + ),
992 + )
993 + );
785 994
786 - echo $control_manager->add_color_control( [
787 - 'label' => __('Normal','responsive-menu-pro'),
788 - 'id' => 'rmp-menu-link-color',
789 - 'name' => 'menu[menu_link_colour]',
790 - 'value' => rmp_get_value($options,'menu_link_colour'),
791 - 'multi_device' => true,
792 - ] );
995 + $ui_manager->start_group_controls();
996 + $control_manager->add_color_control(
997 + array(
998 + 'label' => esc_html__( 'Normal', 'responsive-menu' ),
999 + 'id' => 'rmp-menu-item-border-colour',
1000 + 'name' => 'menu[menu_item_border_colour]',
1001 + 'value' => rmp_get_value( $options, 'menu_item_border_colour' ),
793 1002
794 - echo $control_manager->add_color_control( [
795 - 'label' => __('Hover','responsive-menu-pro'),
796 - 'id' => 'rmp-menu-link-hover-color',
797 - 'name' => 'menu[menu_link_hover_colour]',
798 - 'value' => rmp_get_value($options,'menu_link_hover_colour'),
799 -
800 - 'multi_device' => true,
801 - ] );
1003 + )
1004 + );
802 1005
803 - echo $control_manager->add_color_control( [
804 - 'label' => __('Active Item','responsive-menu-pro'),
805 - 'id' => 'rmp-menu-current-link-active-color',
806 - 'name' => 'menu[menu_current_link_colour]',
807 - 'value' => rmp_get_value($options,'menu_current_link_colour'),
808 -
809 - ] );
1006 + $control_manager->add_color_control(
1007 + array(
1008 + 'label' => esc_html__( 'Hover', 'responsive-menu' ),
1009 + 'id' => 'rmp-menu-item-border-colour-hover',
1010 + 'name' => 'menu[menu_item_border_colour_hover]',
1011 + 'value' => rmp_get_value( $options, 'menu_item_border_colour_hover' ),
810 1012
811 - echo $control_manager->add_color_control( [
812 - 'label' => __('Active Item Hover','responsive-menu-pro'),
813 - 'id' => 'rmp-menu-current-link-active-hover-color',
814 - 'name' => 'menu[menu_current_link_hover_colour]',
815 - 'value' => rmp_get_value($options,'menu_current_link_hover_colour'),
816 -
817 - ] );
818 -
819 - echo $ui_manager->end_accordion_item();
1013 + )
1014 + );
1015 + $ui_manager->end_group_controls();
820 1016
821 - echo $ui_manager->start_accordion_item( [
822 - 'item_header' => [
823 - 'item_title' => __('Background Color','responsive-menu-pro')
824 - ]
825 - ] );
1017 + $ui_manager->start_group_controls();
1018 + $control_manager->add_color_control(
1019 + array(
1020 + 'label' => esc_html__( 'Active Item', 'responsive-menu' ),
1021 + 'id' => 'rmp-menu-item-border-colour-active',
1022 + 'name' => 'menu[menu_current_item_border_colour]',
1023 + 'value' => rmp_get_value( $options, 'menu_current_item_border_colour' ),
826 1024
827 - echo $control_manager->add_color_control( [
828 - 'label' => __('Background','responsive-menu-pro'),
829 - 'id' => 'rmp-menu-item-background-colour',
830 - 'name' => 'menu[menu_item_background_colour]',
831 - 'value' => rmp_get_value($options,'menu_item_background_colour'),
832 -
833 - 'multi_device' => true,
1025 + )
1026 + );
834 1027
835 - ] );
1028 + $control_manager->add_color_control(
1029 + array(
1030 + 'label' => esc_html__( 'Active Hover', 'responsive-menu' ),
1031 + 'id' => 'rmp-menu-current-item-border-hover-colour',
1032 + 'tool_tip' => array(
1033 + 'text' => esc_html__( 'Set the border colour when the mouse rolls over the current menu item.', 'responsive-menu' ),
1034 + ),
1035 + 'name' => 'menu[menu_current_item_border_hover_colour]',
1036 + 'value' => rmp_get_value( $options, 'menu_current_item_border_hover_colour' ),
836 1037
837 - echo $control_manager->add_color_control( [
838 - 'label' => __('Background Hover','responsive-menu-pro'),
839 - 'id' => 'rmp-menu-item-background-hover-color',
840 - 'name' => 'menu[menu_item_background_hover_colour]',
841 - 'value' => rmp_get_value($options,'menu_item_background_hover_colour'),
842 -
843 - 'multi_device' => true,
844 - ] );
1038 + )
1039 + );
1040 + $ui_manager->end_group_controls();
845 1041
846 - echo $control_manager->add_color_control( [
847 - 'label' => __('Active Item Background','responsive-menu-pro'),
848 - 'id' => 'rmp-menu-current-item-background-color',
849 - 'name' => 'menu[menu_current_item_background_colour]',
850 - 'value' => rmp_get_value($options,'menu_current_item_background_colour'),
851 -
852 - ] );
1042 + $ui_manager->end_accordion_item();
853 1043
854 - echo $control_manager->add_color_control( [
855 - 'label' => __('Active Item Background Hover','responsive-menu-pro'),
856 - 'id' => 'rmp-menu-current-item-background-hover-color',
857 - 'name' => 'menu[menu_current_item_background_hover_colour]',
858 - 'value' => rmp_get_value($options,'menu_current_item_background_hover_colour'),
859 -
860 - ] );
861 - echo $ui_manager->end_accordion_item();
1044 + $ui_manager->end_sub_accordion();
1045 + $ui_manager->end_tab_item();
862 1046
863 - echo $ui_manager->start_accordion_item( [
864 - 'item_header' => [
865 - 'item_title' => __('Border','responsive-menu-pro')
866 - ]
867 - ] );
1047 + $ui_manager->start_tab_item(
1048 + array(
1049 + 'item_id' => 'sub-level-item-styling',
1050 + 'item_class' => 'title-contents',
1051 + )
1052 + );
1053 + $control_manager->add_text_input_control(
1054 + array(
1055 + 'label' => esc_html__( 'Item Height', 'responsive-menu' ),
1056 + 'type' => 'number',
1057 + 'id' => 'rmp-submenu-links-height',
1058 + 'class' => 'no-updates',
1059 + 'name' => 'menu[submenu_links_height]',
1060 + 'value' => rmp_get_value( $options, 'submenu_links_height' ),
1061 + 'multi_device' => true,
1062 + 'group_classes' => 'full-size',
1063 + 'has_unit' => array(
1064 + 'unit_type' => 'all',
1065 + 'id' => 'rmp-submenu-links-height-unit',
1066 + 'name' => 'menu[submenu_links_height_unit]',
1067 + 'classes' => 'is-unit no-updates',
1068 + 'default' => 'px',
1069 + 'value' => rmp_get_value( $options, 'submenu_links_height_unit' ),
1070 + 'multi_device' => true,
1071 + ),
1072 + )
1073 + );
868 1074
869 - echo $control_manager->add_text_input_control( [
870 - 'label' => __('Border Width','responsive-menu-pro'),
871 - 'type' => 'number',
872 - 'id' => 'rmp-menu-border-width',
873 - 'name' => 'menu[menu_border_width]',
874 - 'value' => rmp_get_value($options,'menu_border_width'),
875 - 'class' => 'no-updates',
876 - 'tool_tip' => [
877 - 'text' => __('Set the border size for each menu link and it\'s unit.', 'responsive-menu-pro'),
878 - ],
879 - 'has_unit' => [
880 - 'unit_type' => 'all',
881 - 'id' => 'rmp-menu-border-width-unit',
882 - 'name' => 'menu[menu_border_width_unit]',
883 - 'classes' => 'is-unit',
884 - 'default' => 'px',
885 - 'value' => rmp_get_value($options,'menu_border_width_unit'),
886 - ],
887 - ] );
1075 + $control_manager->add_text_input_control(
1076 + array(
1077 + 'label' => esc_html__( 'Line Height', 'responsive-menu' ),
1078 + 'type' => 'number',
1079 + 'id' => 'rmp-submenu-links-line-height',
1080 + 'class' => 'no-updates',
1081 + 'name' => 'menu[submenu_links_line_height]',
1082 + 'value' => rmp_get_value( $options, 'submenu_links_line_height' ),
1083 + 'multi_device' => true,
1084 + 'group_classes' => 'full-size',
1085 + 'has_unit' => array(
1086 + 'unit_type' => 'all',
1087 + 'id' => 'rmp-submenu-links-line-height-unit',
1088 + 'name' => 'menu[submenu_links_line_height_unit]',
1089 + 'classes' => 'is-unit no-updates',
1090 + 'default' => 'px',
1091 + 'value' => rmp_get_value( $options, 'submenu_links_line_height_unit' ),
1092 + 'multi_device' => true,
1093 + ),
1094 + )
1095 + );
888 1096
889 - echo $ui_manager->start_group_controls();
890 - echo $control_manager->add_color_control( [
891 - 'label' => __('Normal','responsive-menu-pro'),
892 - 'id' => 'rmp-menu-item-border-colour',
893 - 'name' => 'menu[menu_item_border_colour]',
894 - 'value' => rmp_get_value($options,'menu_item_border_colour'),
895 -
896 - ] );
1097 + $ui_manager->start_sub_accordion();
1098 + $ui_manager->start_accordion_item(
1099 + array(
1100 + 'item_header' => array(
1101 + 'item_title' => esc_html__( 'Indentation', 'responsive-menu' ),
1102 + ),
1103 + )
1104 + );
1105 + $control_manager->add_select_control(
1106 + array(
1107 + 'label' => esc_html__( 'Side', 'responsive-menu' ),
1108 + 'id' => 'rmp-menu-depth-side',
1109 + 'tool_tip' => array(
1110 + 'text' => esc_html__( 'You can set which side of the menu items the padding should be on.', 'responsive-menu' ),
1111 + ),
1112 + 'name' => 'menu[menu_depth_side]',
1113 + 'options' => array(
1114 + 'right' => 'Right',
1115 + 'left' => 'Left',
1116 + ),
1117 + 'value' => rmp_get_value( $options, 'menu_depth_side' ),
1118 + )
1119 + );
897 1120
898 - echo $control_manager->add_color_control( [
899 - 'label' => __('Hover','responsive-menu-pro'),
900 - 'id' => 'rmp-menu-item-border-colour-hover',
901 - 'name' => 'menu[menu_item_border_colour_hover]',
902 - 'value' => rmp_get_value($options,'menu_item_border_colour_hover'),
903 -
904 - ] );
905 - echo $ui_manager->end_group_controls();
906 -
907 - echo $ui_manager->start_group_controls();
908 - echo $control_manager->add_color_control( [
909 - 'label' => __('Active Item','responsive-menu-pro'),
910 - 'id' => 'rmp-menu-button-line-colour-active',
911 - 'name' => 'menu[menu_current_item_border_colour]',
912 - 'value' => rmp_get_value($options,'menu_current_item_border_colour'),
913 -
914 - ] );
915 1121
916 - echo $control_manager->add_color_control( [
917 - 'label' => __('Active Hover','responsive-menu-pro'),
918 - 'id' => 'rmp-menu-current-item-border-hover-colour',
919 - 'tool_tip' => [
920 - 'text' => __('Set the border colour when the mouse rolls over the current menu item.','responsive-menu-pro'),
921 - ],
922 - 'name' => 'menu[menu_current_item_border_hover_colour]',
923 - 'value' => rmp_get_value($options,'menu_current_item_border_hover_colour'),
924 -
925 - ] );
926 - echo $ui_manager->end_group_controls();
1122 + $ui_manager->start_group_controls();
1123 + $control_manager->add_text_input_control(
1124 + array(
1125 + 'label' => esc_html__( 'Child Level 1', 'responsive-menu' ),
1126 + 'type' => 'number',
1127 + 'id' => 'rmp-menu-depth-level-1',
1128 + 'name' => 'menu[menu_depth_1]',
1129 + 'value' => rmp_get_value( $options, 'menu_depth_1' ),
927 1130
928 - echo $ui_manager->end_accordion_item();
1131 + 'has_unit' => array(
1132 + 'unit_type' => 'all',
1133 + 'id' => 'rmp-menu-depth-level-1-unit',
1134 + 'name' => 'menu[menu_depth_1_unit]',
1135 + 'classes' => 'is-unit',
1136 + 'default' => '%',
1137 + 'value' => rmp_get_value( $options, 'menu_depth_1_unit' ),
1138 + ),
1139 + )
1140 + );
929 1141
930 - echo $ui_manager->end_sub_accordion();
931 - echo $ui_manager->end_tab_item();
1142 + $control_manager->add_text_input_control(
1143 + array(
1144 + 'label' => esc_html__( 'Child Level 2', 'responsive-menu' ),
1145 + 'type' => 'number',
1146 + 'id' => 'rmp-menu-depth-level-2',
1147 + 'name' => 'menu[menu_depth_2]',
1148 + 'value' => rmp_get_value( $options, 'menu_depth_2' ),
932 1149
933 - echo $ui_manager->start_tab_item(
934 - [
935 - 'item_id' => 'sub-level-item-styling',
936 - 'item_class' => 'title-contents',
937 - ]
938 - );
939 - echo $control_manager->add_text_input_control( [
940 - 'label' => __('Item Height','responsive-menu-pro'),
941 - 'type' => 'number',
942 - 'id' => 'rmp-submenu-links-height',
943 - 'name' => 'menu[submenu_links_height]',
944 - 'value' => rmp_get_value($options,'submenu_links_height'),
945 - 'multi_device' => true,
946 - 'group_classes' => 'full-size',
947 - 'has_unit' => [
948 - 'unit_type' => 'all',
949 - 'id' => 'rmp-submenu-links-height-unit',
950 - 'name' => 'menu[submenu_links_height_unit]',
951 - 'classes' => 'is-unit',
952 - 'default' => 'px',
953 - 'value' => rmp_get_value($options,'submenu_links_height_unit'),
954 - 'multi_device' => true,
955 - ],
956 - ] );
1150 + 'has_unit' => array(
1151 + 'unit_type' => 'all',
1152 + 'id' => 'rmp-menu-depth-level-2-unit',
1153 + 'name' => 'menu[menu_depth_2_unit]',
1154 + 'classes' => 'is-unit',
1155 + 'default' => '%',
1156 + 'value' => rmp_get_value( $options, 'menu_depth_2_unit' ),
1157 + ),
1158 + )
1159 + );
957 1160
958 - echo $control_manager->add_text_input_control( [
959 - 'label' => __('Line Height','responsive-menu-pro'),
960 - 'type' => 'number',
961 - 'id' => 'rmp-submenu-links-line-height',
962 - 'name' => 'menu[submenu_links_line_height]',
963 - 'value' => rmp_get_value($options,'submenu_links_line_height'),
964 - 'multi_device' => true,
965 - 'group_classes' => 'full-size',
966 - 'has_unit' => [
967 - 'unit_type' => 'all',
968 - 'id' => 'rmp-submenu-links-line-height-unit',
969 - 'name' => 'menu[submenu_links_line_height_unit]',
970 - 'classes' => 'is-unit',
971 - 'default' => 'px',
972 - 'value' => rmp_get_value($options,'submenu_links_line_height_unit'),
973 - 'multi_device' => true,
974 - ],
975 - ] );
1161 + $ui_manager->end_group_controls();
976 1162
977 - echo $ui_manager->start_sub_accordion();
978 - echo $ui_manager->start_accordion_item( [
979 - 'item_header' => [
980 - 'item_title' => __('Indentation','responsive-menu-pro')
981 - ]
982 - ] );
983 - echo $control_manager->add_select_control( [
984 - 'label' => __('Side','responsive-menu-pro'),
985 - 'id' => 'rmp-menu-depth-side',
986 - 'tool_tip' => [
987 - 'text' => __('You can set which side of the menu items the padding should be on.','responsive-menu-pro'),
988 - ],
989 - 'name' => 'menu[menu_depth_side]',
990 - 'options' => array( 'right' => 'Right' , 'left' => 'Left' ),
991 - 'value' => rmp_get_value($options,'menu_depth_side'),
992 - ] );
993 -
994 -
995 - echo $ui_manager->start_group_controls();
996 - echo $control_manager->add_text_input_control( [
997 - 'label' => __('Child Level 1','responsive-menu-pro'),
998 - 'type' => 'number',
999 - 'id' => 'rmp-menu-depth-level-1',
1000 - 'name' => 'menu[menu_depth_1]',
1001 - 'value' => rmp_get_value($options,'menu_depth_1'),
1002 -
1003 - 'has_unit' => [
1004 - 'unit_type' => 'all',
1005 - 'id' => 'rmp-menu-depth-level-1-unit',
1006 - 'name' => 'menu[menu_depth_1_unit]',
1007 - 'classes' => 'is-unit',
1008 - 'default' => '%',
1009 - 'value' => rmp_get_value($options,'menu_depth_1_unit'),
1010 - ],
1011 - ] );
1012 -
1013 - echo $control_manager->add_text_input_control( [
1014 - 'label' => __('Child Level 2','responsive-menu-pro'),
1015 - 'type' => 'number',
1016 - 'id' => 'rmp-menu-depth-level-2',
1017 - 'name' => 'menu[menu_depth_2]',
1018 - 'value' => rmp_get_value($options,'menu_depth_2'),
1019 -
1020 - 'has_unit' => [
1021 - 'unit_type' => 'all',
1022 - 'id' => 'rmp-menu-depth-level-2-unit',
1023 - 'name' => 'menu[menu_depth_2_unit]',
1024 - 'classes' => 'is-unit',
1025 - 'default' => '%',
1026 - 'value' => rmp_get_value($options,'menu_depth_2_unit'),
1027 - ],
1028 - ] );
1029 -
1030 - echo $ui_manager->end_group_controls();
1163 + $ui_manager->start_group_controls();
1164 + $control_manager->add_text_input_control(
1165 + array(
1166 + 'label' => esc_html__( 'Child Level 3', 'responsive-menu' ),
1167 + 'type' => 'number',
1168 + 'id' => 'rmp-menu-depth-level-3',
1169 + 'name' => 'menu[menu_depth_3]',
1170 + 'value' => rmp_get_value( $options, 'menu_depth_3' ),
1031 1171
1032 - echo $ui_manager->start_group_controls();
1033 - echo $control_manager->add_text_input_control( [
1034 - 'label' => __('Child Level 3','responsive-menu-pro'),
1035 - 'type' => 'number',
1036 - 'id' => 'rmp-menu-depth-level-3',
1037 - 'name' => 'menu[menu_depth_3]',
1038 - 'value' => rmp_get_value($options,'menu_depth_3'),
1039 -
1040 - 'has_unit' => [
1041 - 'unit_type' => 'all',
1042 - 'id' => 'rmp-menu-depth-level-3-unit',
1043 - 'name' => 'menu[menu_depth_3_unit]',
1044 - 'classes' => 'is-unit',
1045 - 'default' => '%',
1046 - 'value' => rmp_get_value($options,'menu_depth_3_unit'),
1047 - ],
1048 - ] );
1172 + 'has_unit' => array(
1173 + 'unit_type' => 'all',
1174 + 'id' => 'rmp-menu-depth-level-3-unit',
1175 + 'name' => 'menu[menu_depth_3_unit]',
1176 + 'classes' => 'is-unit',
1177 + 'default' => '%',
1178 + 'value' => rmp_get_value( $options, 'menu_depth_3_unit' ),
1179 + ),
1180 + )
1181 + );
1049 1182
1050 - echo $control_manager->add_text_input_control( [
1051 - 'label' => __('Child Level 4','responsive-menu-pro'),
1052 - 'type' => 'number',
1053 - 'id' => 'rmp-menu-depth-level-4',
1054 - 'name' => 'menu[menu_depth_4]',
1055 - 'value' => rmp_get_value($options,'menu_depth_4'),
1056 -
1057 - 'has_unit' => [
1058 - 'unit_type' => 'all',
1059 - 'id' => 'rmp-menu-depth-level-4-unit',
1060 - 'name' => 'menu[menu_depth_4_unit]',
1061 - 'classes' => 'is-unit',
1062 - 'default' => '%',
1063 - 'value' => rmp_get_value($options,'menu_depth_4_unit'),
1064 - ],
1065 - ] );
1066 - echo $ui_manager->end_group_controls();
1183 + $control_manager->add_text_input_control(
1184 + array(
1185 + 'label' => esc_html__( 'Child Level 4', 'responsive-menu' ),
1186 + 'type' => 'number',
1187 + 'id' => 'rmp-menu-depth-level-4',
1188 + 'name' => 'menu[menu_depth_4]',
1189 + 'value' => rmp_get_value( $options, 'menu_depth_4' ),
1067 1190
1068 - echo $ui_manager->end_accordion_item();
1069 - echo $ui_manager->start_accordion_item( [
1070 - 'item_header' => [
1071 - 'item_title' => __('Background Color','responsive-menu-pro')
1072 - ]
1073 - ] );
1074 - echo $control_manager->add_color_control( [
1075 - 'label' => __('Normal','responsive-menu-pro'),
1076 - 'id' => 'rmp-submenu-item-background-color',
1077 - 'name' => 'menu[submenu_item_background_colour]',
1078 - 'value' => rmp_get_value($options,'submenu_item_background_colour'),
1079 - 'multi_device' => true,
1080 - ] );
1081 -
1082 - echo $control_manager->add_color_control( [
1083 - 'label' => __('Hover','responsive-menu-pro'),
1084 - 'id' => 'rmp-submenu-item-background-hover-color',
1085 - 'name' => 'menu[submenu_item_background_hover_colour]',
1086 - 'value' => rmp_get_value($options,'submenu_item_background_hover_colour'),
1087 -
1088 - 'multi_device' => true,
1089 - ] );
1090 -
1091 - echo $ui_manager->start_group_controls();
1092 - echo $control_manager->add_color_control( [
1093 - 'label' => __('Active Item','responsive-menu-pro'),
1094 - 'id' => 'rmp-submenu-current-item-background-color',
1095 - 'name' => 'menu[submenu_current_item_background_colour]',
1096 - 'value' => rmp_get_value($options,'submenu_current_item_background_colour'),
1097 -
1098 - ] );
1099 -
1100 - echo $control_manager->add_color_control( [
1101 - 'label' => __('Active Item Hover','responsive-menu-pro'),
1102 - 'id' => 'rmp-submenu-current-item-background-hover-color',
1103 - 'name' => 'menu[submenu_current_item_background_hover_colour]',
1104 - 'value' => rmp_get_value($options,'submenu_current_item_background_hover_colour'),
1105 -
1106 - ] );
1107 - echo $ui_manager->end_group_controls();
1108 - echo $ui_manager->end_accordion_item();
1109 - echo $ui_manager->start_accordion_item( [
1110 - 'item_header' => [
1111 - 'item_title' => __('Border','responsive-menu-pro')
1112 - ]
1113 - ] );
1114 - echo $control_manager->add_text_input_control( [
1115 - 'label' => __('Border Width','responsive-menu-pro'),
1116 - 'type' => 'number',
1117 - 'id' => 'rmp-submenu-border-width',
1118 - 'name' => 'menu[submenu_border_width]',
1119 - 'value' => rmp_get_value($options,'submenu_border_width'),
1120 - 'tool_tip' => [
1121 - 'text' => __('Set the border size for each menu link and it\'s unit.','responsive-menu-pro'),
1122 - ],
1123 - 'has_unit' => [
1124 - 'unit_type' => 'all',
1125 - 'id' => 'rmp-submenu-border-width-unit',
1126 - 'name' => 'menu[submenu_border_width_unit]',
1127 - 'classes' => 'is-unit',
1128 - 'value' => rmp_get_value($options,'submenu_border_width_unit'),
1129 - ],
1130 - ] );
1131 -
1132 - echo $ui_manager->start_group_controls();
1133 - echo $control_manager->add_color_control( [
1134 - 'label' => __('Normal','responsive-menu-pro'),
1135 - 'id' => 'rmp-submenu-item-border-colour',
1136 - 'name' => 'menu[submenu_item_border_colour]',
1137 - 'value' => rmp_get_value($options,'submenu_item_border_colour'),
1138 -
1139 - ] );
1140 -
1141 - echo $control_manager->add_color_control( [
1142 - 'label' => __('Hover','responsive-menu-pro'),
1143 - 'id' => 'rmp-submenu-item-border-colour-hover',
1144 - 'name' => 'menu[submenu_item_border_colour_hover]',
1145 - 'value' => rmp_get_value($options,'submenu_item_border_colour_hover'),
1146 -
1147 - ] );
1148 - echo $ui_manager->end_group_controls();
1191 + 'has_unit' => array(
1192 + 'unit_type' => 'all',
1193 + 'id' => 'rmp-menu-depth-level-4-unit',
1194 + 'name' => 'menu[menu_depth_4_unit]',
1195 + 'classes' => 'is-unit',
1196 + 'default' => '%',
1197 + 'value' => rmp_get_value( $options, 'menu_depth_4_unit' ),
1198 + ),
1199 + )
1200 + );
1201 + $ui_manager->end_group_controls();
1149 1202
1150 - echo $ui_manager->start_group_controls();
1151 - echo $control_manager->add_color_control( [
1152 - 'label' => __('Active Item','responsive-menu-pro'),
1153 - 'id' => 'rmp-submenu-button-line-colour-active',
1154 - 'name' => 'menu[submenu_current_item_border_colour]',
1155 - 'value' => rmp_get_value($options,'submenu_current_item_border_colour'),
1156 -
1157 - ] );
1158 -
1159 - echo $control_manager->add_color_control( [
1160 - 'label' => __('Active Item Hover','responsive-menu-pro'),
1161 - 'id' => 'rmp-submenu-current-item-border-hover-colour',
1162 - 'tool_tip' => [
1163 - 'text' => __('Set the border colour when the mouse rolls over the current submenu item.','responsive-menu-pro'),
1164 - ],
1165 - 'name' => 'menu[submenu_current_item_border_hover_colour]',
1166 - 'value' => rmp_get_value($options,'submenu_current_item_border_hover_colour'),
1167 -
1168 - ] );
1169 - echo $ui_manager->end_group_controls();
1170 -
1171 - echo $ui_manager->end_accordion_item();
1172 - echo $ui_manager->start_accordion_item( [
1173 - 'item_header' => [
1174 - 'item_title' => __('Typography','responsive-menu-pro')
1175 - ]
1176 - ] );
1177 - echo $control_manager->add_text_input_control( [
1178 - 'label' => __('Font Size','responsive-menu-pro'),
1179 - 'type' => 'number',
1180 - 'id' => 'rmp-submenu-font-size',
1181 - 'class' => 'no-updates',
1182 - 'name' => 'menu[submenu_font_size]',
1183 - 'value' => rmp_get_value($options,'submenu_font_size'),
1184 - 'multi_device' => true,
1185 - 'has_unit' => [
1186 - 'unit_type' => 'all',
1187 - 'id' => 'rmp-submenu-font-size-unit',
1188 - 'name' => 'menu[submenu_font_size_unit]',
1189 - 'classes' => 'is-unit',
1190 - 'default' => 'px',
1191 - 'value' => rmp_get_value($options,'submenu_font_size_unit'),
1203 + $ui_manager->end_accordion_item();
1204 + $ui_manager->start_accordion_item(
1205 + array(
1206 + 'item_header' => array(
1207 + 'item_title' => esc_html__( 'Background Color', 'responsive-menu' ),
1208 + ),
1209 + )
1210 + );
1211 + $control_manager->add_color_control(
1212 + array(
1213 + 'label' => esc_html__( 'Normal', 'responsive-menu' ),
1214 + 'id' => 'rmp-submenu-item-background-color',
1215 + 'name' => 'menu[submenu_item_background_colour]',
1216 + 'value' => rmp_get_value( $options, 'submenu_item_background_colour' ),
1192 1217 'multi_device' => true,
1193 - ],
1194 - ] );
1195 -
1196 - echo $control_manager->add_text_input_control( [
1197 - 'label' => __('Font Family','responsive-menu-pro'),
1198 - 'type' => 'text',
1199 - 'id' => 'rmp-submenu-font',
1200 - 'name' => 'menu[submenu_font]',
1201 - 'class' => 'no-updates',
1202 - 'value' => rmp_get_value($options,'submenu_font'),
1203 - 'multi_device' => true,
1204 - ] );
1205 -
1206 - echo $ui_manager->start_group_controls();
1218 + )
1219 + );
1207 1220
1208 - echo $control_manager->add_select_control( [
1209 - 'label' => __('Font Weight','responsive-menu-pro'),
1210 - 'id' => 'rmp-submenu-font-weight',
1211 - 'name' => 'menu[submenu_font_weight]',
1212 - 'class' => 'no-updates',
1213 - 'options' => rmp_font_weight_options(),
1214 - 'value' => rmp_get_value($options,'submenu_font_weight'),
1215 - ] );
1221 + $control_manager->add_color_control(
1222 + array(
1223 + 'label' => esc_html__( 'Hover', 'responsive-menu' ),
1224 + 'id' => 'rmp-submenu-item-background-hover-color',
1225 + 'name' => 'menu[submenu_item_background_hover_colour]',
1226 + 'value' => rmp_get_value( $options, 'submenu_item_background_hover_colour' ),
1216 1227
1217 - echo $control_manager->add_text_input_control( [
1218 - 'label' => __('Letter Spacing','responsive-menu-pro'),
1219 - 'type' => 'number',
1220 - 'id' => 'rmp-submenu-text-letter-spacing',
1221 - 'name' => 'menu[submenu_text_letter_spacing]',
1222 - 'value' => rmp_get_value($options,'submenu_text_letter_spacing'),
1223 - 'has_unit' => [
1224 - 'unit_type' => 'px',
1225 - ],
1226 - ] );
1227 -
1228 - echo $ui_manager->end_group_controls();
1228 + 'multi_device' => true,
1229 + )
1230 + );
1229 1231
1232 + $ui_manager->start_group_controls();
1233 + $control_manager->add_color_control(
1234 + array(
1235 + 'label' => esc_html__( 'Active Item', 'responsive-menu' ),
1236 + 'id' => 'rmp-submenu-current-item-background-color',
1237 + 'name' => 'menu[submenu_current_item_background_colour]',
1238 + 'value' => rmp_get_value( $options, 'submenu_current_item_background_colour' ),
1230 1239
1231 - echo $control_manager->add_text_alignment_control( [
1232 - 'label' => __('Text Alignment','responsive-menu-pro'),
1233 - 'class' => 'rmp-submenu-text-alignment',
1234 - 'name' => 'menu[submenu_text_alignment]',
1235 - 'options' => ['left','center','right','justify'],
1236 - 'value' => rmp_get_value($options,'submenu_text_alignment'),
1237 - ] );
1240 + )
1241 + );
1238 1242
1243 + $control_manager->add_color_control(
1244 + array(
1245 + 'label' => esc_html__( 'Active Item Hover', 'responsive-menu' ),
1246 + 'id' => 'rmp-submenu-current-item-background-hover-color',
1247 + 'name' => 'menu[submenu_current_item_background_hover_colour]',
1248 + 'value' => rmp_get_value( $options, 'submenu_current_item_background_hover_colour' ),
1239 1249
1240 - echo $ui_manager->end_accordion_item();
1241 - echo $ui_manager->start_accordion_item( [
1242 - 'item_header' => [
1243 - 'item_title' => __('Text Color','responsive-menu-pro')
1244 - ]
1245 - ] );
1246 - echo $control_manager->add_color_control( [
1247 - 'label' => __('Color','responsive-menu-pro'),
1248 - 'id' => 'rmp-submenu-link-color',
1249 - 'name' => 'menu[submenu_link_colour]',
1250 - 'value' => rmp_get_value($options,'submenu_link_colour'),
1251 - 'multi_device' => true,
1252 -
1253 - ] );
1250 + )
1251 + );
1252 + $ui_manager->end_group_controls();
1253 + $ui_manager->end_accordion_item();
1254 + $ui_manager->start_accordion_item(
1255 + array(
1256 + 'item_header' => array(
1257 + 'item_title' => esc_html__( 'Border', 'responsive-menu' ),
1258 + ),
1259 + )
1260 + );
1261 + $control_manager->add_text_input_control(
1262 + array(
1263 + 'label' => esc_html__( 'Border Width', 'responsive-menu' ),
1264 + 'type' => 'number',
1265 + 'id' => 'rmp-submenu-border-width',
1266 + 'class' => 'no-updates',
1267 + 'name' => 'menu[submenu_border_width]',
1268 + 'value' => rmp_get_value( $options, 'submenu_border_width' ),
1269 + 'tool_tip' => array(
1270 + 'text' => esc_html__( 'Set the border size for each menu link and it\'s unit.', 'responsive-menu' ),
1271 + ),
1272 + 'has_unit' => array(
1273 + 'unit_type' => 'all',
1274 + 'id' => 'rmp-submenu-border-width-unit',
1275 + 'name' => 'menu[submenu_border_width_unit]',
1276 + 'classes' => 'is-unit no-updates',
1277 + 'default' => 'px',
1278 + 'value' => rmp_get_value( $options, 'submenu_border_width_unit' ),
1279 + ),
1280 + )
1281 + );
1254 1282
1255 - echo $control_manager->add_color_control( [
1256 - 'label' => __('Hover Color','responsive-menu-pro'),
1257 - 'id' => 'rmp-submenu-link-hover-color',
1258 - 'name' => 'menu[submenu_link_hover_colour]',
1259 - 'value' => rmp_get_value($options,'submenu_link_hover_colour'),
1260 - 'multi_device' => true,
1261 - ] );
1283 + $ui_manager->start_group_controls();
1284 + $control_manager->add_color_control(
1285 + array(
1286 + 'label' => esc_html__( 'Normal', 'responsive-menu' ),
1287 + 'id' => 'rmp-submenu-item-border-colour',
1288 + 'name' => 'menu[submenu_item_border_colour]',
1289 + 'value' => rmp_get_value( $options, 'submenu_item_border_colour' ),
1262 1290
1263 - echo $ui_manager->start_group_controls();
1264 - echo $control_manager->add_color_control( [
1265 - 'label' => __('Active Item Color','responsive-menu-pro'),
1266 - 'id' => 'rmp-submenu-link-colour-active',
1267 - 'name' => 'menu[submenu_current_link_colour]',
1268 - 'value' => rmp_get_value($options,'submenu_current_link_colour'),
1269 - ] );
1291 + )
1292 + );
1270 1293
1271 - echo $control_manager->add_color_control( [
1272 - 'label' => __('Active Item Hover','responsive-menu-pro'),
1273 - 'id' => 'rmp-submenu-link-active-hover-color',
1274 - 'name' => 'menu[submenu_current_link_hover_colour]',
1275 - 'value' => rmp_get_value($options,'submenu_current_link_hover_colour'),
1276 - ] );
1277 - echo $ui_manager->end_group_controls();
1294 + $control_manager->add_color_control(
1295 + array(
1296 + 'label' => esc_html__( 'Hover', 'responsive-menu' ),
1297 + 'id' => 'rmp-submenu-item-border-colour-hover',
1298 + 'name' => 'menu[submenu_item_border_colour_hover]',
1299 + 'value' => rmp_get_value( $options, 'submenu_item_border_colour_hover' ),
1278 1300
1279 - echo $ui_manager->end_accordion_item();
1280 - echo $ui_manager->end_sub_accordion();
1281 -
1282 - echo $ui_manager->end_tab_item();
1301 + )
1302 + );
1303 + $ui_manager->end_group_controls();
1283 1304
1284 - echo $ui_manager->end_tabs_controls_panel();
1305 + $ui_manager->start_group_controls();
1306 + $control_manager->add_color_control(
1307 + array(
1308 + 'label' => esc_html__( 'Active Item', 'responsive-menu' ),
1309 + 'id' => 'rmp-submenu-item-border-colour-active',
1310 + 'name' => 'menu[submenu_current_item_border_colour]',
1311 + 'value' => rmp_get_value( $options, 'submenu_current_item_border_colour' ),
1312 + )
1313 + );
1285 1314
1286 - echo $ui_manager->end_accordion_item();
1315 + $control_manager->add_color_control(
1316 + array(
1317 + 'label' => esc_html__( 'Active Item Hover', 'responsive-menu' ),
1318 + 'id' => 'rmp-submenu-current-item-border-hover-colour',
1319 + 'tool_tip' => array(
1320 + 'text' => esc_html__( 'Set the border colour when the mouse rolls over the current submenu item.', 'responsive-menu' ),
1321 + ),
1322 + 'name' => 'menu[submenu_current_item_border_hover_colour]',
1323 + 'value' => rmp_get_value( $options, 'submenu_current_item_border_hover_colour' ),
1287 1324
1325 + )
1326 + );
1327 + $ui_manager->end_group_controls();
1288 1328
1289 - echo $ui_manager->start_accordion_item( [
1290 - 'item_header' => [
1291 - 'item_title' => __('Trigger Icon','responsive-menu-pro'),
1292 - ]
1293 - ] );
1329 + $ui_manager->end_accordion_item();
1330 + $ui_manager->start_accordion_item(
1331 + array(
1332 + 'item_header' => array(
1333 + 'item_title' => esc_html__( 'Typography', 'responsive-menu' ),
1334 + ),
1335 + )
1336 + );
1337 + $control_manager->add_text_input_control(
1338 + array(
1339 + 'label' => esc_html__( 'Font Size', 'responsive-menu' ),
1340 + 'type' => 'number',
1341 + 'id' => 'rmp-submenu-font-size',
1342 + 'class' => 'no-updates',
1343 + 'name' => 'menu[submenu_font_size]',
1344 + 'value' => rmp_get_value( $options, 'submenu_font_size' ),
1345 + 'multi_device' => true,
1346 + 'has_unit' => array(
1347 + 'unit_type' => 'all',
1348 + 'id' => 'rmp-submenu-font-size-unit',
1349 + 'name' => 'menu[submenu_font_size_unit]',
1350 + 'classes' => 'is-unit no-updates',
1351 + 'default' => 'px',
1352 + 'value' => rmp_get_value( $options, 'submenu_font_size_unit' ),
1353 + 'multi_device' => true,
1354 + ),
1355 + )
1356 + );
1294 1357
1295 - echo $ui_manager->start_tabs_controls_panel(
1296 - [ 'tab_classes' => 'rmp-tab-content',
1297 - 'tab_items' =>
1298 - [
1299 - 0 => [
1300 - 'item_class' => 'nav-tab-active',
1301 - 'item_target' => 'menu-item-arrow-text',
1302 - 'item_text' => __('Text','responsive-menu-pro')
1303 - ],
1304 - 1 => [
1305 - 'item_class' => '',
1306 - 'item_target' => 'menu-item-arrow-icon',
1307 - 'item_text' => __('Icon','responsive-menu-pro')
1308 - ],
1309 - 2 => [
1310 - 'item_class' => '',
1311 - 'item_target' => 'menu-item-arrow-image',
1312 - 'item_text' => __('Image','responsive-menu-pro')
1313 - ],
1314 - ]
1315 - ]
1316 - );
1358 + $control_manager->add_text_input_control(
1359 + array(
1360 + 'label' => esc_html__( 'Font Family', 'responsive-menu' ),
1361 + 'type' => 'text',
1362 + 'id' => 'rmp-submenu-font',
1363 + 'name' => 'menu[submenu_font]',
1364 + 'class' => 'no-updates',
1365 + 'value' => rmp_get_value( $options, 'submenu_font' ),
1366 + 'multi_device' => true,
1367 + )
1368 + );
1317 1369
1318 - echo $ui_manager->start_tab_item(
1319 - [
1320 - 'item_id' => 'menu-item-arrow-text',
1321 - 'item_class' => 'title-contents',
1322 - ]
1323 - );
1324 - echo $ui_manager->start_group_controls();
1325 - echo $control_manager->add_text_input_control( [
1326 - 'label' => __('Text Shape','responsive-menu-pro'),
1327 - 'type' => 'text',
1328 - 'id' => 'rmp-menu-inactive-arrow-shape',
1329 - 'name' => 'menu[inactive_arrow_shape]',
1330 - 'value' => rmp_get_value($options,'inactive_arrow_shape'),
1331 -
1332 - ] );
1370 + $ui_manager->start_group_controls();
1333 1371
1334 - echo $control_manager->add_text_input_control( [
1335 - 'label' => __('Active Text Shape','responsive-menu-pro'),
1336 - 'type' => 'text',
1337 - 'id' => 'rmp-menu-active-arrow-shape',
1338 - 'name' => 'menu[active_arrow_shape]',
1339 - 'value' => rmp_get_value($options,'active_arrow_shape'),
1340 -
1341 - ] );
1342 - echo $ui_manager->end_group_controls();
1343 - echo $ui_manager->end_tab_item();
1372 + $control_manager->add_select_control(
1373 + array(
1374 + 'label' => esc_html__( 'Font Weight', 'responsive-menu' ),
1375 + 'id' => 'rmp-submenu-font-weight',
1376 + 'name' => 'menu[submenu_font_weight]',
1377 + 'class' => 'no-updates',
1378 + 'options' => rmp_font_weight_options(),
1379 + 'value' => rmp_get_value( $options, 'submenu_font_weight' ),
1380 + )
1381 + );
1344 1382
1345 - echo $ui_manager->start_tab_item(
1346 - [
1347 - 'item_id' => 'menu-item-arrow-icon',
1348 - 'item_class' => 'title-contents',
1349 - ]
1350 - );
1351 -
1383 + $control_manager->add_text_input_control(
1384 + array(
1385 + 'label' => esc_html__( 'Letter Spacing', 'responsive-menu' ),
1386 + 'type' => 'number',
1387 + 'id' => 'rmp-submenu-text-letter-spacing',
1388 + 'class' => 'no-updates',
1389 + 'name' => 'menu[submenu_text_letter_spacing]',
1390 + 'value' => rmp_get_value( $options, 'submenu_text_letter_spacing' ),
1391 + 'has_unit' => array(
1392 + 'unit_type' => 'px',
1393 + ),
1394 + )
1395 + );
1352 1396
1353 - echo $control_manager->add_icon_picker_control( [
1354 - 'label' => __('Font Icon','responsive-menu-pro'),
1355 - 'id' => 'rmp-menu-inactive-arrow-font-icon',
1356 - 'group_classes' => 'full-size',
1357 - 'class' => 'no-updates',
1358 - 'picker_class' => 'rmp-menu-font-icon-picker-button',
1359 - 'picker_id' => "rmp-menu-inactive-arrow-font-icon-selector",
1360 - 'name' => 'menu[inactive_arrow_font_icon]',
1361 - 'value' => rmp_get_value($options,'inactive_arrow_font_icon'),
1362 -
1363 - ] );
1397 + $ui_manager->end_group_controls();
1364 1398
1365 - echo $control_manager->add_icon_picker_control( [
1366 - 'label' => __('Active Font Icon','responsive-menu-pro'),
1367 - 'id' => 'rmp-menu-active-arrow-font-icon',
1368 - 'group_classes' => 'full-size',
1369 - 'picker_class' => 'rmp-menu-font-icon-picker-button',
1370 - 'picker_id' => "rmp-menu-active-arrow-font-icon-selector",
1371 - 'name' => 'menu[active_arrow_font_icon]',
1372 - 'value' => rmp_get_value($options,'active_arrow_font_icon'),
1373 -
1374 - ] );
1375 1399
1376 - echo $ui_manager->end_tab_item();
1400 + $control_manager->add_text_alignment_control(
1401 + array(
1402 + 'label' => esc_html__( 'Text Alignment', 'responsive-menu' ),
1403 + 'class' => 'rmp-submenu-text-alignment',
1404 + 'name' => 'menu[submenu_text_alignment]',
1405 + 'options' => array( 'left', 'center', 'right', 'justify' ),
1406 + 'value' => rmp_get_value( $options, 'submenu_text_alignment' ),
1407 + )
1408 + );
1377 1409
1378 1410
1379 - echo $ui_manager->start_tab_item(
1380 - [
1381 - 'item_id' => 'menu-item-arrow-image',
1382 - 'item_class' => 'title-style',
1383 - ]
1384 - );
1411 + $ui_manager->end_accordion_item();
1412 + $ui_manager->start_accordion_item(
1413 + array(
1414 + 'item_header' => array(
1415 + 'item_title' => esc_html__( 'Text Color', 'responsive-menu' ),
1416 + ),
1417 + )
1418 + );
1419 + $control_manager->add_color_control(
1420 + array(
1421 + 'label' => esc_html__( 'Color', 'responsive-menu' ),
1422 + 'id' => 'rmp-submenu-link-color',
1423 + 'name' => 'menu[submenu_link_colour]',
1424 + 'value' => rmp_get_value( $options, 'submenu_link_colour' ),
1425 + 'multi_device' => true,
1385 1426
1386 - echo $control_manager->add_image_control( [
1387 - 'label' => __('Image','responsive-menu-pro'),
1388 - 'group_classes' => 'full-size',
1389 - 'id' => 'rmp-menu-inactive-arrow-image',
1390 - 'picker_class' => 'rmp-menu-inactive-arrow-image-selector',
1391 - 'picker_id' => "rmp-menu-inactive-arrow-image-selector",
1392 - 'name' => 'menu[inactive_arrow_image]',
1393 - 'value' => rmp_get_value($options,'inactive_arrow_image'),
1394 -
1395 - ] );
1427 + )
1428 + );
1396 1429
1397 - echo $control_manager->add_image_control( [
1398 - 'label' => __('Active Image','responsive-menu-pro'),
1399 - 'group_classes' => 'full-size',
1400 - 'id' => 'rmp-menu-active-arrow-image',
1401 - 'picker_class' => 'rmp-menu-active-arrow-image-selector',
1402 - 'picker_id' => "rmp-menu-active-arrow-image-selector",
1403 - 'name' => 'menu[active_arrow_image]',
1404 - 'value' => rmp_get_value($options,'active_arrow_image'),
1405 -
1406 - ] );
1407 - echo $ui_manager->end_tab_item();
1430 + $control_manager->add_color_control(
1431 + array(
1432 + 'label' => esc_html__( 'Hover Color', 'responsive-menu' ),
1433 + 'id' => 'rmp-submenu-link-hover-color',
1434 + 'name' => 'menu[submenu_link_hover_colour]',
1435 + 'value' => rmp_get_value( $options, 'submenu_link_hover_colour' ),
1436 + 'multi_device' => true,
1437 + )
1438 + );
1408 1439
1409 - echo $ui_manager->end_tabs_controls_panel();
1440 + $ui_manager->start_group_controls();
1441 + $control_manager->add_color_control(
1442 + array(
1443 + 'label' => esc_html__( 'Active Item Color', 'responsive-menu' ),
1444 + 'id' => 'rmp-submenu-link-colour-active',
1445 + 'name' => 'menu[submenu_current_link_colour]',
1446 + 'value' => rmp_get_value( $options, 'submenu_current_link_colour' ),
1447 + )
1448 + );
1410 1449
1411 - echo $ui_manager->accordion_divider();
1450 + $control_manager->add_color_control(
1451 + array(
1452 + 'label' => esc_html__( 'Active Item Hover', 'responsive-menu' ),
1453 + 'id' => 'rmp-submenu-link-active-hover-color',
1454 + 'name' => 'menu[submenu_current_link_hover_colour]',
1455 + 'value' => rmp_get_value( $options, 'submenu_current_link_hover_colour' ),
1456 + )
1457 + );
1458 + $ui_manager->end_group_controls();
1412 1459
1413 - echo $ui_manager->start_group_controls();
1460 + $ui_manager->end_accordion_item();
1461 + $ui_manager->end_sub_accordion();
1414 1462
1415 - echo $control_manager->add_text_input_control( [
1416 - 'label' => __('Width','responsive-menu-pro'),
1417 - 'type' => 'number',
1418 - 'id' => 'rmp-submenu-arrow-width',
1419 - 'name' => 'menu[submenu_arrow_width]',
1420 - 'value' => rmp_get_value($options,'submenu_arrow_width'),
1421 - 'class' => 'no-updates',
1422 - 'tool_tip' => [
1423 - 'text' => __('Set the width of the menu trigger items and their units.','responsive-menu-pro')
1424 - ],
1425 - 'has_unit' => [
1426 - 'unit_type' => 'all',
1427 - 'id' => 'rmp-submenu-arrow-width-unit',
1428 - 'name' => 'menu[submenu_arrow_width_unit]',
1429 - 'classes' => 'is-unit no-updates',
1430 - 'value' => rmp_get_value($options,'submenu_arrow_width_unit'),
1431 - ],
1432 - ] );
1463 + $ui_manager->end_tab_item();
1433 1464
1434 - echo $control_manager->add_text_input_control( [
1435 - 'label' => __('Height','responsive-menu-pro'),
1436 - 'type' => 'number',
1437 - 'id' => 'rmp-submenu-arrow-height',
1438 - 'name' => 'menu[submenu_arrow_height]',
1439 - 'value' => rmp_get_value($options,'submenu_arrow_height'),
1440 - 'class' => 'no-updates',
1441 - 'tool_tip' => [
1442 - 'text' => __('Set the height of the menu trigger items and their units.','responsive-menu-pro')
1443 - ],
1444 - 'has_unit' => [
1445 - 'unit_type' => 'all',
1446 - 'id' => 'rmp-submenu-arrow-height-unit',
1447 - 'name' => 'menu[submenu_arrow_height_unit]',
1448 - 'classes' => 'is-unit no-updates',
1449 - 'value' => rmp_get_value($options,'submenu_arrow_height_unit')
1450 - ],
1451 - ] );
1465 + $ui_manager->end_tabs_controls_panel();
1452 1466
1453 - echo $ui_manager->end_group_controls();
1467 + $ui_manager->end_accordion_item();
1454 1468
1455 - echo $control_manager->add_select_control( [
1456 - 'label' => __('Position','responsive-menu-pro'),
1457 - 'id' => 'rmp-menu-arrow-position',
1458 - 'class' => 'rmp-menu-arrow-position',
1459 - 'name' => 'menu[arrow_position]',
1460 - 'options' => array( 'right' => 'Right' , 'left' => 'Left' ),
1461 - 'value' => rmp_get_value($options,'arrow_position')
1462 - ] );
1463 1469
1464 - echo $ui_manager->start_sub_accordion();
1470 + $ui_manager->start_accordion_item(
1471 + array(
1472 + 'item_header' => array(
1473 + 'item_title' => esc_html__( 'Trigger Icon', 'responsive-menu' ),
1474 + ),
1475 + )
1476 + );
1465 1477
1466 - echo $ui_manager->start_accordion_item( [
1467 - 'item_header' => [
1468 - 'item_title' => __('Text Color','responsive-menu-pro')
1469 - ]
1470 - ] );
1478 + $ui_manager->start_tabs_controls_panel(
1479 + array(
1480 + 'tab_classes' => 'rmp-tab-content',
1481 + 'tab_items' =>
1482 + array(
1483 + 0 => array(
1484 + 'item_class' => 'nav-tab-active',
1485 + 'item_target' => 'menu-item-arrow-text',
1486 + 'item_text' => esc_html__( 'Text', 'responsive-menu' ),
1487 + ),
1488 + 1 => array(
1489 + 'item_class' => '',
1490 + 'item_target' => 'menu-item-arrow-icon',
1491 + 'item_text' => esc_html__( 'Icon', 'responsive-menu' ),
1492 + ),
1493 + 2 => array(
1494 + 'item_class' => '',
1495 + 'item_target' => 'menu-item-arrow-image',
1496 + 'item_text' => esc_html__( 'Image', 'responsive-menu' ),
1497 + ),
1498 + ),
1499 + )
1500 + );
1471 1501
1472 - echo $ui_manager->start_group_controls();
1502 + $ui_manager->start_tab_item(
1503 + array(
1504 + 'item_id' => 'menu-item-arrow-text',
1505 + 'item_class' => 'title-contents',
1506 + )
1507 + );
1508 + $control_manager->rmp_textarea_control_html(
1509 + array(
1510 + 'label' => esc_html__( 'Text Shape', 'responsive-menu' ),
1511 + 'id' => 'rmp-menu-inactive-arrow-shape',
1512 + 'name' => 'menu[inactive_arrow_shape]',
1513 + 'value' => rmp_get_value( $options, 'inactive_arrow_shape' ),
1514 + 'tool_tip' => array(
1515 + 'text' => esc_html__( 'Use custom icon code or SVG code.', 'responsive-menu' ),
1516 + ),
1517 + )
1518 + );
1473 1519
1474 - echo $control_manager->add_color_control( [
1475 - 'label' => __('Normal','responsive-menu-pro'),
1476 - 'id' => 'rmp-menu-sub-arrow-shape-colour',
1477 - 'name' => 'menu[menu_sub_arrow_shape_colour]',
1478 - 'value' => rmp_get_value($options,'menu_sub_arrow_shape_colour'),
1479 -
1480 - ] );
1481 -
1482 - echo $control_manager->add_color_control( [
1483 - 'label' => __('Hover','responsive-menu-pro'),
1484 - 'id' => 'rmp-menu-sub-arrow-shape-hover-colour',
1485 - 'name' => 'menu[menu_sub_arrow_shape_hover_colour]',
1486 - 'value' => rmp_get_value($options,'menu_sub_arrow_shape_hover_colour'),
1487 -
1488 - ] );
1489 -
1490 - echo $ui_manager->end_group_controls();
1520 + $control_manager->rmp_textarea_control_html(
1521 + array(
1522 + 'label' => esc_html__( 'Active Text Shape', 'responsive-menu' ),
1523 + 'id' => 'rmp-menu-active-arrow-shape',
1524 + 'name' => 'menu[active_arrow_shape]',
1525 + 'value' => rmp_get_value( $options, 'active_arrow_shape' ),
1526 + 'tool_tip' => array(
1527 + 'text' => esc_html__( 'Use custom icon code or SVG code.', 'responsive-menu' ),
1528 + ),
1529 + )
1530 + );
1531 + $ui_manager->end_tab_item();
1491 1532
1492 - echo $ui_manager->start_group_controls();
1533 + $ui_manager->start_tab_item(
1534 + array(
1535 + 'item_id' => 'menu-item-arrow-icon',
1536 + 'item_class' => 'title-contents',
1537 + )
1538 + );
1493 1539
1494 - echo $control_manager->add_color_control( [
1495 - 'label' => __('Active Item','responsive-menu-pro'),
1496 - 'id' => 'rmp-menu-sub-arrow-shape-colour-active',
1497 - 'name' => 'menu[menu_sub_arrow_shape_colour_active]',
1498 - 'value' => rmp_get_value($options,'menu_sub_arrow_shape_colour_active'),
1499 -
1500 - ] );
1501 -
1502 - echo $control_manager->add_color_control( [
1503 - 'label' => __('Active Item Hover','responsive-menu-pro'),
1504 - 'id' => 'rmp-menu-sub-arrow-shape-hover-colour-active',
1505 - 'name' => 'menu[menu_sub_arrow_shape_hover_colour_active]',
1506 - 'value' => rmp_get_value($options,'menu_sub_arrow_shape_hover_colour_active'),
1507 -
1508 - ] );
1509 - echo $ui_manager->end_group_controls();
1510 1540
1511 - echo $ui_manager->end_accordion_item();
1541 + $control_manager->add_icon_picker_control(
1542 + array(
1543 + 'label' => esc_html__( 'Font Icon', 'responsive-menu' ),
1544 + 'id' => 'rmp-menu-inactive-arrow-font-icon',
1545 + 'group_classes' => 'full-size',
1546 + 'class' => 'no-updates',
1547 + 'picker_class' => 'rmp-menu-font-icon-picker-button',
1548 + 'picker_id' => 'rmp-menu-inactive-arrow-font-icon-selector',
1549 + 'name' => 'menu[inactive_arrow_font_icon]',
1550 + 'value' => rmp_get_value( $options, 'inactive_arrow_font_icon' ),
1512 1551
1513 - echo $ui_manager->start_accordion_item( [
1514 - 'item_header' => [
1515 - 'item_title' => __('Border Color','responsive-menu-pro')
1516 - ]
1517 - ] );
1552 + )
1553 + );
1518 1554
1519 - echo $control_manager->add_text_input_control( [
1520 - 'label' => __('Border Width','responsive-menu-pro'),
1521 - 'type' => 'number',
1522 - 'id' => 'rmp-menu-sub-arrow-border-width',
1523 - 'name' => 'menu[menu_sub_arrow_border_width]',
1524 - 'value' => rmp_get_value($options,'menu_sub_arrow_border_width'),
1525 - 'class' => 'no-updates',
1526 - 'has_unit' => [
1527 - 'unit_type' => 'all',
1528 - 'id' => 'rmp-menu-sub-arrow-border-width-unit',
1529 - 'name' => 'menu[menu_sub_arrow_border_width_unit]',
1530 - 'classes' => 'is-unit',
1531 - 'value' => rmp_get_value($options,'menu_sub_arrow_border_width_unit'),
1532 - ],
1533 - ] );
1555 + $control_manager->add_icon_picker_control(
1556 + array(
1557 + 'label' => esc_html__( 'Active Font Icon', 'responsive-menu' ),
1558 + 'id' => 'rmp-menu-active-arrow-font-icon',
1559 + 'group_classes' => 'full-size',
1560 + 'picker_class' => 'rmp-menu-font-icon-picker-button',
1561 + 'picker_id' => 'rmp-menu-active-arrow-font-icon-selector',
1562 + 'name' => 'menu[active_arrow_font_icon]',
1563 + 'value' => rmp_get_value( $options, 'active_arrow_font_icon' ),
1534 1564
1535 - echo $ui_manager->start_group_controls();
1565 + )
1566 + );
1536 1567
1537 - echo $control_manager->add_color_control( [
1538 - 'label' => __('Normal','responsive-menu-pro'),
1539 - 'id' => 'rmp-menu-sub-arrow-border-colour',
1540 - 'name' => 'menu[menu_sub_arrow_border_colour]',
1541 - 'value' => rmp_get_value($options,'menu_sub_arrow_border_colour'),
1542 -
1543 - ] );
1568 + $ui_manager->end_tab_item();
1544 1569
1545 - echo $control_manager->add_color_control( [
1546 - 'label' => __('Hover','responsive-menu-pro'),
1547 - 'id' => 'rmp-menu-sub-arrow-border-hover-colour',
1548 - 'name' => 'menu[menu_sub_arrow_border_hover_colour]',
1549 - 'value' => rmp_get_value($options,'menu_sub_arrow_border_hover_colour'),
1550 -
1551 - ] );
1552 - echo $ui_manager->end_group_controls();
1553 1570
1554 - echo $ui_manager->start_group_controls();
1555 - echo $control_manager->add_color_control( [
1556 - 'label' => __('Active Item','responsive-menu-pro'),
1557 - 'id' => 'rmp-menu-sub-arrow-border-colour-active',
1558 - 'name' => 'menu[menu_sub_arrow_border_colour_active]',
1559 - 'value' => rmp_get_value($options,'menu_sub_arrow_border_colour_active'),
1560 -
1561 - ] );
1571 + $ui_manager->start_tab_item(
1572 + array(
1573 + 'item_id' => 'menu-item-arrow-image',
1574 + 'item_class' => 'title-style',
1575 + )
1576 + );
1562 1577
1563 - echo $control_manager->add_color_control( [
1564 - 'label' => __('Active Item Hover','responsive-menu-pro'),
1565 - 'id' => 'rmp-menu-sub-arrow-border-hover-colour-active',
1566 - 'name' => 'menu[menu_sub_arrow_border_hover_colour_active]',
1567 - 'value' => rmp_get_value($options,'menu_sub_arrow_border_hover_colour_active'),
1568 -
1569 - ] );
1570 - echo $ui_manager->end_group_controls();
1578 + $control_manager->add_image_control(
1579 + array(
1580 + 'label' => esc_html__( 'Image', 'responsive-menu' ),
1581 + 'group_classes' => 'full-size',
1582 + 'id' => 'rmp-menu-inactive-arrow-image',
1583 + 'picker_class' => 'rmp-menu-inactive-arrow-image-selector',
1584 + 'picker_id' => 'rmp-menu-inactive-arrow-image-selector',
1585 + 'name' => 'menu[inactive_arrow_image]',
1586 + 'value' => rmp_get_value( $options, 'inactive_arrow_image' ),
1571 1587
1572 - echo $ui_manager->end_accordion_item();
1588 + )
1589 + );
1573 1590
1574 - echo $ui_manager->start_accordion_item( [
1575 - 'item_header' => [
1576 - 'item_title' => __('Background Color','responsive-menu-pro')
1577 - ]
1578 - ] );
1591 + $control_manager->add_image_control(
1592 + array(
1593 + 'label' => esc_html__( 'Active Image', 'responsive-menu' ),
1594 + 'group_classes' => 'full-size',
1595 + 'id' => 'rmp-menu-active-arrow-image',
1596 + 'picker_class' => 'rmp-menu-active-arrow-image-selector',
1597 + 'picker_id' => 'rmp-menu-active-arrow-image-selector',
1598 + 'name' => 'menu[active_arrow_image]',
1599 + 'value' => rmp_get_value( $options, 'active_arrow_image' ),
1579 1600
1580 - echo $ui_manager->start_group_controls();
1601 + )
1602 + );
1603 + $ui_manager->end_tab_item();
1581 1604
1582 - echo $control_manager->add_color_control( [
1583 - 'label' => __('Normal','responsive-menu-pro'),
1584 - 'id' => 'rmp-menu-sub-arrow-background-color',
1585 - 'name' => 'menu[menu_sub_arrow_background_colour]',
1586 - 'value' => rmp_get_value($options,'menu_sub_arrow_background_colour'),
1587 -
1588 - ] );
1605 + $ui_manager->end_tabs_controls_panel();
1589 1606
1590 - echo $control_manager->add_color_control( [
1591 - 'label' => __('Hover','responsive-menu-pro'),
1592 - 'id' => 'rmp-menu-sub-arrow-background-hover-colour',
1593 - 'name' => 'menu[menu_sub_arrow_background_hover_colour]',
1594 - 'value' => rmp_get_value($options,'menu_sub_arrow_background_hover_colour'),
1595 -
1596 - ] );
1597 - echo $ui_manager->end_group_controls();
1598 - echo $ui_manager->start_group_controls();
1607 + $ui_manager->accordion_divider();
1599 1608
1600 - echo $control_manager->add_color_control( [
1601 - 'label' => __('Active Item','responsive-menu-pro'),
1602 - 'id' => 'rmp-menu-sub-arrow-background-colour-active',
1603 - 'name' => 'menu[menu_sub_arrow_background_colour_active]',
1604 - 'value' => rmp_get_value($options,'menu_sub_arrow_background_colour_active'),
1605 -
1606 - ] );
1609 + $ui_manager->start_group_controls();
1607 1610
1608 - echo $control_manager->add_color_control( [
1609 - 'label' => __('Active Item Hover','responsive-menu-pro'),
1610 - 'id' => 'rmp-menu-sub-arrow-background-hover-colour-active',
1611 - 'name' => 'menu[menu_sub_arrow_background_hover_colour_active]',
1612 - 'value' => rmp_get_value($options,'menu_sub_arrow_background_hover_colour_active'),
1613 -
1614 - ] );
1615 - echo $ui_manager->end_group_controls();
1611 + $control_manager->add_text_input_control(
1612 + array(
1613 + 'label' => esc_html__( 'Width', 'responsive-menu' ),
1614 + 'type' => 'number',
1615 + 'id' => 'rmp-submenu-arrow-width',
1616 + 'name' => 'menu[submenu_arrow_width]',
1617 + 'value' => rmp_get_value( $options, 'submenu_arrow_width' ),
1618 + 'class' => 'no-updates',
1619 + 'tool_tip' => array(
1620 + 'text' => esc_html__( 'Set the width of the menu trigger items and their units.', 'responsive-menu' ),
1621 + ),
1622 + 'has_unit' => array(
1623 + 'unit_type' => 'all',
1624 + 'id' => 'rmp-submenu-arrow-width-unit',
1625 + 'name' => 'menu[submenu_arrow_width_unit]',
1626 + 'classes' => 'is-unit',
1627 + 'default' => 'px',
1628 + 'value' => rmp_get_value( $options, 'submenu_arrow_width_unit' ),
1629 + ),
1630 + )
1631 + );
1616 1632
1617 - echo $ui_manager->end_accordion_item();
1633 + $control_manager->add_text_input_control(
1634 + array(
1635 + 'label' => esc_html__( 'Height', 'responsive-menu' ),
1636 + 'type' => 'number',
1637 + 'id' => 'rmp-submenu-arrow-height',
1638 + 'name' => 'menu[submenu_arrow_height]',
1639 + 'value' => rmp_get_value( $options, 'submenu_arrow_height' ),
1640 + 'class' => 'no-updates',
1641 + 'tool_tip' => array(
1642 + 'text' => esc_html__( 'Set the height of the menu trigger items and their units.', 'responsive-menu' ),
1643 + ),
1644 + 'has_unit' => array(
1645 + 'unit_type' => 'all',
1646 + 'id' => 'rmp-submenu-arrow-height-unit',
1647 + 'name' => 'menu[submenu_arrow_height_unit]',
1648 + 'classes' => 'is-unit',
1649 + 'default' => 'px',
1650 + 'value' => rmp_get_value( $options, 'submenu_arrow_height_unit' ),
1651 + ),
1652 + )
1653 + );
1618 1654
1619 - echo $ui_manager->end_sub_accordion();
1655 + $ui_manager->end_group_controls();
1620 1656
1657 + $control_manager->add_select_control(
1658 + array(
1659 + 'label' => esc_html__( 'Position', 'responsive-menu' ),
1660 + 'id' => 'rmp-menu-arrow-position',
1661 + 'class' => 'rmp-menu-arrow-position',
1662 + 'name' => 'menu[arrow_position]',
1663 + 'options' => array(
1664 + 'right' => 'Right',
1665 + 'left' => 'Left',
1666 + ),
1667 + 'value' => rmp_get_value( $options, 'arrow_position' ),
1668 + )
1669 + );
1621 1670
1671 + $ui_manager->start_sub_accordion();
1622 1672
1623 - echo $ui_manager->start_accordion_item( [
1624 - 'item_header' => [
1625 - 'item_title' => __('Animation','responsive-menu-pro'),
1626 - ],
1627 - 'item_content' => [
1628 - 'content_class' => 'upgrade-notice-contents'
1629 - ],
1630 - 'feature_type' => 'pro'
1631 - ] );
1673 + $ui_manager->start_accordion_item(
1674 + array(
1675 + 'item_header' => array(
1676 + 'item_title' => esc_html__( 'Text Color', 'responsive-menu' ),
1677 + ),
1678 + )
1679 + );
1632 1680
1633 - echo $control_manager->upgrade_notice();
1634 - echo $ui_manager->end_accordion_item();
1635 -
1681 + $ui_manager->start_group_controls();
1636 1682
1637 - echo $ui_manager->start_accordion_item( [
1638 - 'item_header' => [
1639 - 'item_title' => __('Behaviour','responsive-menu-pro'),
1640 - ]
1641 - ] );
1683 + $control_manager->add_color_control(
1684 + array(
1685 + 'label' => esc_html__( 'Normal', 'responsive-menu' ),
1686 + 'id' => 'rmp-menu-sub-arrow-shape-colour',
1687 + 'name' => 'menu[menu_sub_arrow_shape_colour]',
1688 + 'value' => rmp_get_value( $options, 'menu_sub_arrow_shape_colour' ),
1642 1689
1643 - echo $control_manager->add_switcher_control( [
1644 - 'label' => __('Use Accordion','responsive-menu-pro'),
1645 - 'id' => 'rmp-menu-accordion-animation',
1646 - 'class' => 'rmp-menu-accordion-animation',
1647 - 'name' => 'menu[accordion_animation]',
1648 - 'is_checked' => is_rmp_option_checked('on', $options,'accordion_animation'),
1649 -
1650 - ] );
1690 + )
1691 + );
1651 1692
1652 - echo $control_manager->add_switcher_control( [
1653 - 'label' => __('Auto Expand All Sub Menus','responsive-menu-pro'),
1654 - 'id' => 'rmp-menu-auto-expand-all-submenus',
1655 - 'class' => 'rmp-menu-auto-expand-all-submenus',
1656 - 'name' => 'menu[auto_expand_all_submenus]',
1657 - 'is_checked' => is_rmp_option_checked('on', $options,'auto_expand_all_submenus'),
1658 -
1659 - ] );
1693 + $control_manager->add_color_control(
1694 + array(
1695 + 'label' => esc_html__( 'Hover', 'responsive-menu' ),
1696 + 'id' => 'rmp-menu-sub-arrow-shape-hover-colour',
1697 + 'name' => 'menu[menu_sub_arrow_shape_hover_colour]',
1698 + 'value' => rmp_get_value( $options, 'menu_sub_arrow_shape_hover_colour' ),
1660 1699
1661 - echo $control_manager->add_switcher_control( [
1662 - 'label' => __('Auto Expand Current Sub Menus','responsive-menu-pro'),
1663 - 'id' => 'rmp-menu-auto-expand-current-submenus',
1664 - 'class' => 'rmp-menu-auto-expand-current-submenus',
1665 - 'name' => 'menu[auto_expand_current_submenus]',
1666 - 'is_checked' => is_rmp_option_checked('on', $options,'auto_expand_current_submenus'),
1667 -
1668 - ] );
1700 + )
1701 + );
1669 1702
1670 - echo $control_manager->add_switcher_control( [
1671 - 'label' => __('Expand Sub items on Parent Item Click','responsive-menu-pro'),
1672 - 'id' => 'rmp-menu-menu-item-click-to-trigger-submenu',
1673 - 'class' => 'rmp-menu-menu-item-click-to-trigger-submenu',
1674 - 'name' => 'menu[menu_item_click_to_trigger_submenu]',
1675 - 'is_checked' => is_rmp_option_checked('on', $options,'menu_item_click_to_trigger_submenu'),
1676 -
1677 - ] );
1703 + $ui_manager->end_group_controls();
1678 1704
1705 + $ui_manager->start_group_controls();
1679 1706
1680 - echo $ui_manager->end_accordion_item();
1681 - ?>
1707 + $control_manager->add_color_control(
1708 + array(
1709 + 'label' => esc_html__( 'Active Item', 'responsive-menu' ),
1710 + 'id' => 'rmp-menu-sub-arrow-shape-colour-active',
1711 + 'name' => 'menu[menu_sub_arrow_shape_colour_active]',
1712 + 'value' => rmp_get_value( $options, 'menu_sub_arrow_shape_colour_active' ),
1713 +
1714 + )
1715 + );
1716 +
1717 + $control_manager->add_color_control(
1718 + array(
1719 + 'label' => esc_html__( 'Active Item Hover', 'responsive-menu' ),
1720 + 'id' => 'rmp-menu-sub-arrow-shape-hover-colour-active',
1721 + 'name' => 'menu[menu_sub_arrow_shape_hover_colour_active]',
1722 + 'value' => rmp_get_value( $options, 'menu_sub_arrow_shape_hover_colour_active' ),
1723 +
1724 + )
1725 + );
1726 + $ui_manager->end_group_controls();
1727 +
1728 + $ui_manager->end_accordion_item();
1729 +
1730 + $ui_manager->start_accordion_item(
1731 + array(
1732 + 'item_header' => array(
1733 + 'item_title' => esc_html__( 'Border Color', 'responsive-menu' ),
1734 + ),
1735 + )
1736 + );
1737 +
1738 + $control_manager->add_text_input_control(
1739 + array(
1740 + 'label' => esc_html__( 'Border Width', 'responsive-menu' ),
1741 + 'type' => 'number',
1742 + 'id' => 'rmp-menu-sub-arrow-border-width',
1743 + 'name' => 'menu[menu_sub_arrow_border_width]',
1744 + 'value' => rmp_get_value( $options, 'menu_sub_arrow_border_width' ),
1745 + 'class' => 'no-updates',
1746 + 'has_unit' => array(
1747 + 'unit_type' => 'all',
1748 + 'id' => 'rmp-menu-sub-arrow-border-width-unit',
1749 + 'name' => 'menu[menu_sub_arrow_border_width_unit]',
1750 + 'classes' => 'is-unit no-updates',
1751 + 'value' => rmp_get_value( $options, 'menu_sub_arrow_border_width_unit' ),
1752 + ),
1753 + )
1754 + );
1755 +
1756 + $ui_manager->start_group_controls();
1757 +
1758 + $control_manager->add_color_control(
1759 + array(
1760 + 'label' => esc_html__( 'Normal', 'responsive-menu' ),
1761 + 'id' => 'rmp-menu-sub-arrow-border-colour',
1762 + 'name' => 'menu[menu_sub_arrow_border_colour]',
1763 + 'value' => rmp_get_value( $options, 'menu_sub_arrow_border_colour' ),
1764 +
1765 + )
1766 + );
1767 +
1768 + $control_manager->add_color_control(
1769 + array(
1770 + 'label' => esc_html__( 'Hover', 'responsive-menu' ),
1771 + 'id' => 'rmp-menu-sub-arrow-border-hover-colour',
1772 + 'name' => 'menu[menu_sub_arrow_border_hover_colour]',
1773 + 'value' => rmp_get_value( $options, 'menu_sub_arrow_border_hover_colour' ),
1774 +
1775 + )
1776 + );
1777 + $ui_manager->end_group_controls();
1778 +
1779 + $ui_manager->start_group_controls();
1780 + $control_manager->add_color_control(
1781 + array(
1782 + 'label' => esc_html__( 'Active Item', 'responsive-menu' ),
1783 + 'id' => 'rmp-menu-sub-arrow-border-colour-active',
1784 + 'name' => 'menu[menu_sub_arrow_border_colour_active]',
1785 + 'value' => rmp_get_value( $options, 'menu_sub_arrow_border_colour_active' ),
1786 +
1787 + )
1788 + );
1789 +
1790 + $control_manager->add_color_control(
1791 + array(
1792 + 'label' => esc_html__( 'Active Item Hover', 'responsive-menu' ),
1793 + 'id' => 'rmp-menu-sub-arrow-border-hover-colour-active',
1794 + 'name' => 'menu[menu_sub_arrow_border_hover_colour_active]',
1795 + 'value' => rmp_get_value( $options, 'menu_sub_arrow_border_hover_colour_active' ),
1796 +
1797 + )
1798 + );
1799 + $ui_manager->end_group_controls();
1800 +
1801 + $ui_manager->end_accordion_item();
1802 +
1803 + $ui_manager->start_accordion_item(
1804 + array(
1805 + 'item_header' => array(
1806 + 'item_title' => esc_html__( 'Background Color', 'responsive-menu' ),
1807 + ),
1808 + )
1809 + );
1810 +
1811 + $ui_manager->start_group_controls();
1812 +
1813 + $control_manager->add_color_control(
1814 + array(
1815 + 'label' => esc_html__( 'Normal', 'responsive-menu' ),
1816 + 'id' => 'rmp-menu-sub-arrow-background-color',
1817 + 'name' => 'menu[menu_sub_arrow_background_colour]',
1818 + 'value' => rmp_get_value( $options, 'menu_sub_arrow_background_colour' ),
1819 +
1820 + )
1821 + );
1822 +
1823 + $control_manager->add_color_control(
1824 + array(
1825 + 'label' => esc_html__( 'Hover', 'responsive-menu' ),
1826 + 'id' => 'rmp-menu-sub-arrow-background-hover-colour',
1827 + 'name' => 'menu[menu_sub_arrow_background_hover_colour]',
1828 + 'value' => rmp_get_value( $options, 'menu_sub_arrow_background_hover_colour' ),
1829 +
1830 + )
1831 + );
1832 + $ui_manager->end_group_controls();
1833 + $ui_manager->start_group_controls();
1834 +
1835 + $control_manager->add_color_control(
1836 + array(
1837 + 'label' => esc_html__( 'Active Item', 'responsive-menu' ),
1838 + 'id' => 'rmp-menu-sub-arrow-background-colour-active',
1839 + 'name' => 'menu[menu_sub_arrow_background_colour_active]',
1840 + 'value' => rmp_get_value( $options, 'menu_sub_arrow_background_colour_active' ),
1841 +
1842 + )
1843 + );
1844 +
1845 + $control_manager->add_color_control(
1846 + array(
1847 + 'label' => esc_html__( 'Active Item Hover', 'responsive-menu' ),
1848 + 'id' => 'rmp-menu-sub-arrow-background-hover-colour-active',
1849 + 'name' => 'menu[menu_sub_arrow_background_hover_colour_active]',
1850 + 'value' => rmp_get_value( $options, 'menu_sub_arrow_background_hover_colour_active' ),
1851 +
1852 + )
1853 + );
1854 + $ui_manager->end_group_controls();
1855 +
1856 + $ui_manager->end_accordion_item();
1857 +
1858 + $ui_manager->end_sub_accordion();
1859 +
1860 +
1861 +
1862 + $ui_manager->start_accordion_item(
1863 + array(
1864 + 'item_header' => array(
1865 + 'item_title' => esc_html__( 'Animation', 'responsive-menu' ),
1866 + ),
1867 + 'item_content' => array(
1868 + 'content_class' => 'upgrade-notice-contents',
1869 + ),
1870 + 'feature_type' => 'pro',
1871 + )
1872 + );
1873 +
1874 + $control_manager->upgrade_notice();
1875 + $ui_manager->end_accordion_item();
1876 +
1877 +
1878 + $ui_manager->start_accordion_item(
1879 + array(
1880 + 'item_header' => array(
1881 + 'item_title' => esc_html__( 'Behaviour', 'responsive-menu' ),
1882 + ),
1883 + )
1884 + );
1885 +
1886 + $control_manager->add_switcher_control(
1887 + array(
1888 + 'label' => esc_html__( 'Item Descriptions', 'responsive-menu' ),
1889 + 'id' => 'rmp-menu-submenu-descriptions-on',
1890 + 'tool_tip' => array(
1891 + 'text' => esc_html__( 'Show the description text of menu items. Description text should be set while creating WordPress menus.', 'responsive-menu' ),
1892 + ),
1893 + 'name' => 'menu[submenu_descriptions_on]',
1894 + 'is_checked' => is_rmp_option_checked( 'on', $options, 'submenu_descriptions_on' ),
1895 + )
1896 + );
1897 +
1898 + $control_manager->add_switcher_control(
1899 + array(
1900 + 'label' => esc_html__( 'Use Accordion', 'responsive-menu' ),
1901 + 'id' => 'rmp-menu-accordion-animation',
1902 + 'class' => 'rmp-menu-accordion-animation',
1903 + 'name' => 'menu[accordion_animation]',
1904 + 'is_checked' => is_rmp_option_checked( 'on', $options, 'accordion_animation' ),
1905 +
1906 + )
1907 + );
1908 +
1909 + $control_manager->add_switcher_control(
1910 + array(
1911 + 'label' => esc_html__( 'Auto Expand All Sub Menus', 'responsive-menu' ),
1912 + 'id' => 'rmp-menu-auto-expand-all-submenus',
1913 + 'class' => 'rmp-menu-auto-expand-all-submenus',
1914 + 'name' => 'menu[auto_expand_all_submenus]',
1915 + 'is_checked' => is_rmp_option_checked( 'on', $options, 'auto_expand_all_submenus' ),
1916 +
1917 + )
1918 + );
1919 +
1920 + $control_manager->add_switcher_control(
1921 + array(
1922 + 'label' => esc_html__( 'Auto Expand Current Sub Menus', 'responsive-menu' ),
1923 + 'id' => 'rmp-menu-auto-expand-current-submenus',
1924 + 'class' => 'rmp-menu-auto-expand-current-submenus',
1925 + 'name' => 'menu[auto_expand_current_submenus]',
1926 + 'is_checked' => is_rmp_option_checked( 'on', $options, 'auto_expand_current_submenus' ),
1927 +
1928 + )
1929 + );
1930 +
1931 + $control_manager->add_switcher_control(
1932 + array(
1933 + 'label' => esc_html__( 'Expand Sub items on Parent Item Click', 'responsive-menu' ),
1934 + 'id' => 'rmp-menu-menu-item-click-to-trigger-submenu',
1935 + 'class' => 'rmp-menu-menu-item-click-to-trigger-submenu',
1936 + 'name' => 'menu[menu_item_click_to_trigger_submenu]',
1937 + 'is_checked' => is_rmp_option_checked( 'on', $options, 'menu_item_click_to_trigger_submenu' ),
1938 +
1939 + )
1940 + );
1941 +
1942 +
1943 + $ui_manager->end_accordion_item();
1944 + ?>
1682 1945 </ul>
1683 1946 </div>
1684 1947
1685 1948 <div id="tab-toggle-button" class="rmp-accordions" aria-label="Toggle Button">
@@ -1684,836 +1947,1028 @@
1684 1947
1685 1948 <div id="tab-toggle-button" class="rmp-accordions" aria-label="Toggle Button">
1686 1949 <ul class="rmp-accordion-container">
1687 1950 <?php
1688 - //Toggle Box
1951 + // Toggle Box
1689 1952
1690 - echo $ui_manager->start_accordion_item( [
1691 - 'item_header' => [
1692 - 'item_title' => __('Button Style','responsive-menu-pro'),
1693 - ]
1694 - ] );
1695 -
1696 - echo $ui_manager->start_group_controls();
1953 + $ui_manager->start_accordion_item(
1954 + array(
1955 + 'item_header' => array(
1956 + 'item_title' => esc_html__( 'Button Style', 'responsive-menu' ),
1957 + ),
1958 + )
1959 + );
1697 1960
1698 - echo $control_manager->add_text_input_control( [
1699 - 'label' => __('Container Width','responsive-menu-pro'),
1700 - 'type' => 'number',
1701 - 'id' => 'rmp-menu-button-width',
1702 - 'name' => 'menu[button_width]',
1703 - 'class' => 'no-updates',
1704 - 'value' => rmp_get_value($options,'button_width'),
1961 + $ui_manager->start_group_controls();
1705 1962
1706 - 'has_unit' => [
1707 - 'unit_type' => 'all',
1708 - 'id' => 'rmp-menu-button-width-unit',
1709 - 'name' => 'menu[button_width_unit]',
1710 - 'default' => 'px',
1711 - 'classes' => 'is-unit no-updates',
1712 - 'value' => rmp_get_value($options,'button_width_unit'),
1713 - ],
1714 - ] );
1715 -
1716 - echo $control_manager->add_text_input_control( [
1717 - 'label' => __('Container Height','responsive-menu-pro'),
1718 - 'type' => 'number',
1719 - 'id' => 'rmp-menu-button-height',
1720 - 'name' => 'menu[button_height]',
1721 - 'class' => 'no-updates',
1722 - 'value' => rmp_get_value($options,'button_height'),
1723 -
1724 - 'has_unit' => [
1725 - 'unit_type' => 'all',
1726 - 'id' => 'rmp-menu-button-height-unit',
1727 - 'default' => 'px',
1728 - 'name' => 'menu[button_height_unit]',
1729 - 'classes' => 'is-unit no-updates',
1730 - 'value' => rmp_get_value($options,'button_height_unit'),
1731 - ],
1732 - ] );
1963 + $control_manager->add_text_input_control(
1964 + array(
1965 + 'label' => esc_html__( 'Container Width', 'responsive-menu' ),
1966 + 'type' => 'number',
1967 + 'id' => 'rmp-menu-button-width',
1968 + 'name' => 'menu[button_width]',
1969 + 'class' => 'no-updates',
1970 + 'value' => rmp_get_value( $options, 'button_width' ),
1733 1971
1734 - echo $ui_manager->end_group_controls();
1972 + 'has_unit' => array(
1973 + 'unit_type' => 'all',
1974 + 'id' => 'rmp-menu-button-width-unit',
1975 + 'name' => 'menu[button_width_unit]',
1976 + 'default' => 'px',
1977 + 'classes' => 'is-unit no-updates',
1978 + 'value' => rmp_get_value( $options, 'button_width_unit' ),
1979 + ),
1980 + )
1981 + );
1735 1982
1736 - echo $ui_manager->accordion_divider();
1983 + $control_manager->add_text_input_control(
1984 + array(
1985 + 'label' => esc_html__( 'Container Height', 'responsive-menu' ),
1986 + 'type' => 'number',
1987 + 'id' => 'rmp-menu-button-height',
1988 + 'name' => 'menu[button_height]',
1989 + 'class' => 'no-updates',
1990 + 'value' => rmp_get_value( $options, 'button_height' ),
1737 1991
1992 + 'has_unit' => array(
1993 + 'unit_type' => 'all',
1994 + 'id' => 'rmp-menu-button-height-unit',
1995 + 'default' => 'px',
1996 + 'name' => 'menu[button_height_unit]',
1997 + 'classes' => 'is-unit no-updates',
1998 + 'value' => rmp_get_value( $options, 'button_height_unit' ),
1999 + ),
2000 + )
2001 + );
1738 2002
1739 - echo $ui_manager->start_group_controls();
1740 - echo $control_manager->add_color_control( [
1741 - 'label' => __('Background Color','responsive-menu-pro'),
1742 - 'id' => 'rmp-menu-button-background-colour',
1743 - 'tool_tip' => [
1744 - 'text' => __('Set the background colour of the button container.','responsive-menu-pro')
1745 - ],
1746 - 'name' => 'menu[button_background_colour]',
1747 - 'value' => rmp_get_value($options,'button_background_colour'),
1748 -
1749 - ] );
2003 + $ui_manager->end_group_controls();
1750 2004
1751 - echo $control_manager->add_color_control( [
1752 - 'label' => __('Background Hover','responsive-menu-pro'),
1753 - 'id' => 'rmp-menu-button-background-colour-hover',
1754 - 'name' => 'menu[button_background_colour_hover]',
1755 - 'value' => rmp_get_value($options,'button_background_colour_hover'),
1756 -
1757 - ] );
2005 + $ui_manager->accordion_divider();
1758 2006
1759 - echo $ui_manager->end_group_controls();
1760 2007
1761 - echo $control_manager->add_color_control( [
1762 - 'label' => __('Active Color','responsive-menu-pro'),
1763 - 'id' => 'rmp-menu-button-background-colour-active',
1764 - 'name' => 'menu[button_background_colour_active]',
1765 - 'value' => rmp_get_value($options,'button_background_colour_active'),
1766 -
1767 - ] );
2008 + $ui_manager->start_group_controls();
2009 + $control_manager->add_color_control(
2010 + array(
2011 + 'label' => esc_html__( 'Background Color', 'responsive-menu' ),
2012 + 'id' => 'rmp-menu-button-background-colour',
2013 + 'tool_tip' => array(
2014 + 'text' => esc_html__( 'Set the background colour of the button container.', 'responsive-menu' ),
2015 + ),
2016 + 'name' => 'menu[button_background_colour]',
2017 + 'value' => rmp_get_value( $options, 'button_background_colour' ),
1768 2018
1769 - echo $control_manager->add_switcher_control( [
1770 - 'label' => __('Transparent Background','responsive-menu-pro'),
1771 - 'id' => 'rmp-menu-button-transparent-background',
1772 - 'class' => 'rmp-menu-button-transparent-background',
1773 - 'tool_tip' => [
1774 - 'text' => __('Set the button container to a transparent background.','responsive-menu-pro')
1775 - ],
1776 - 'name' => 'menu[button_transparent_background]',
1777 - 'is_checked' => is_rmp_option_checked('on', $options,'button_transparent_background'),
1778 -
1779 - ] );
2019 + )
2020 + );
1780 2021
1781 - echo $ui_manager->end_accordion_item();
2022 + $control_manager->add_color_control(
2023 + array(
2024 + 'label' => esc_html__( 'Background Hover', 'responsive-menu' ),
2025 + 'id' => 'rmp-menu-button-background-colour-hover',
2026 + 'name' => 'menu[button_background_colour_hover]',
2027 + 'value' => rmp_get_value( $options, 'button_background_colour_hover' ),
1782 2028
1783 - //Toggle Positioning
1784 - echo $ui_manager->start_accordion_item( [
1785 - 'item_header' => [
1786 - 'item_title' => __('Button Position','responsive-menu-pro'),
1787 - ]
1788 - ] );
2029 + )
2030 + );
1789 2031
1790 - echo $ui_manager->start_group_controls();
2032 + $ui_manager->end_group_controls();
1791 2033
1792 - echo $control_manager->add_select_control( [
1793 - 'label' => __('Side','responsive-menu-pro'),
1794 - 'id' => 'rmp-menu-button-left-or-right',
1795 - 'class' => 'rmp-menu-button-left-or-right no-updates',
1796 - 'tool_tip' => [
1797 - 'text' => __('Specify which side of the page you want the button to be displayed on.','responsive-menu-pro'),
1798 - ],
1799 - 'name' => 'menu[button_left_or_right]',
1800 - 'options' => array( 'right' => 'Right' , 'left' => 'Left' ),
1801 - 'value' => rmp_get_value($options,'button_left_or_right')
1802 - ] );
2034 + $ui_manager->start_group_controls();
2035 + $control_manager->add_color_control(
2036 + array(
2037 + 'label' => esc_html__( 'Active Color', 'responsive-menu' ),
2038 + 'id' => 'rmp-menu-button-background-colour-active',
2039 + 'name' => 'menu[button_background_colour_active]',
2040 + 'value' => rmp_get_value( $options, 'button_background_colour_active' ),
2041 + )
2042 + );
1803 2043
2044 + $control_manager->add_text_input_control(
2045 + array(
2046 + 'label' => esc_html__( 'Border Radius', 'responsive-menu' ),
2047 + 'type' => 'number',
2048 + 'class' => 'no-updates',
2049 + 'id' => 'rmp-menu-toggle-border-radius',
2050 + 'name' => 'menu[toggle_button_border_radius]',
2051 + 'value' => rmp_get_value( $options, 'toggle_button_border_radius' ),
2052 + 'has_unit' => array(
2053 + 'unit_type' => 'px',
2054 + ),
2055 + )
2056 + );
2057 + $ui_manager->end_group_controls();
1804 2058
1805 - echo $control_manager->add_select_control( [
1806 - 'label' => __('Position','responsive-menu-pro'),
1807 - 'id' => 'rmp-menu-button-position-type',
1808 - 'class' => 'no-updates',
1809 - 'tool_tip' => [
1810 - 'text' => __('Specify how you want the button to stick to your page.','responsive-menu-pro')
1811 - ],
1812 - 'name' => 'menu[button_position_type]',
1813 - 'options' => array( 'fixed' => 'Fixed' , 'absolute' => 'Absolute', 'relative' => 'Relative' ),
1814 - 'value' => rmp_get_value($options,'button_position_type')
1815 - ] );
1816 - echo $ui_manager->end_group_controls();
2059 + $control_manager->add_switcher_control(
2060 + array(
2061 + 'label' => esc_html__( 'Transparent Background', 'responsive-menu' ),
2062 + 'id' => 'rmp-menu-button-transparent-background',
2063 + 'class' => 'rmp-menu-button-transparent-background',
2064 + 'tool_tip' => array(
2065 + 'text' => esc_html__( 'Set the button container to a transparent background.', 'responsive-menu' ),
2066 + ),
2067 + 'name' => 'menu[button_transparent_background]',
2068 + 'is_checked' => is_rmp_option_checked( 'on', $options, 'button_transparent_background' ),
1817 2069
1818 - echo $ui_manager->start_group_controls();
1819 - echo $control_manager->add_text_input_control( [
1820 - 'label' => __('Distance from Side','responsive-menu-pro'),
1821 - 'type' => 'number',
1822 - 'class' => 'no-updates',
1823 - 'id' => 'rmp-menu-button-distance-from-side',
1824 - 'name' => 'menu[button_distance_from_side]',
1825 - 'value' => rmp_get_value($options,'button_distance_from_side'),
1826 - 'tool_tip' => [
1827 - 'text' => __('Specify how far across from the side you want the button to display and it\'s unit.','responsive-menu-pro')
1828 - ],
1829 - 'has_unit' => [
1830 - 'unit_type' => 'all',
1831 - 'id' => 'rmp-menu-button-distance-from-side-unit',
1832 - 'name' => 'menu[button_distance_from_side_unit]',
1833 - 'classes' => 'is-unit',
1834 - 'default' => '%',
1835 - 'value' => rmp_get_value($options,'button_distance_from_side_unit')
1836 - ]
1837 - ] );
2070 + )
2071 + );
1838 2072
1839 - echo $control_manager->add_text_input_control( [
1840 - 'label' => __('Distance from Top','responsive-menu-pro'),
1841 - 'type' => 'number',
1842 - 'id' => 'rmp-menu-button-top',
1843 - 'name' => 'menu[button_top]',
1844 - 'value' => rmp_get_value($options,'button_top'),
1845 - 'class' => 'no-updates',
1846 - 'tool_tip' => [
1847 - 'text' => __('Specify how far from the top you want the button to display and it\'s unit.','responsive-menu-pro')
1848 - ],
1849 - 'has_unit' => [
1850 - 'unit_type' => 'all',
1851 - 'id' => 'rmp-menu-button-top-unit',
1852 - 'name' => 'menu[button_top_unit]',
1853 - 'classes' => 'is-unit',
1854 - 'default' => 'px',
1855 - 'value' => rmp_get_value($options,'button_top_unit')
1856 - ],
1857 - ] );
2073 + $ui_manager->end_accordion_item();
1858 2074
1859 - echo $ui_manager->end_group_controls();
2075 + // Toggle Positioning
2076 + $ui_manager->start_accordion_item(
2077 + array(
2078 + 'item_header' => array(
2079 + 'item_title' => esc_html__( 'Button Position', 'responsive-menu' ),
2080 + ),
2081 + )
2082 + );
1860 2083
1861 - echo $control_manager->add_switcher_control( [
1862 - 'label' => __('Push Button with Menu','responsive-menu-pro'),
1863 - 'id' => 'rmp-menu-button-push-animation',
1864 - 'tool_tip' => [
1865 - 'text' => __('The toggle button will slide along with menu container.','responsive-menu-pro'),
1866 - ],
1867 - 'name' => 'menu[button_push_with_animation]',
1868 - 'is_checked' => is_rmp_option_checked('on', $options,'button_push_with_animation'),
1869 -
1870 - ] );
2084 + $ui_manager->start_group_controls();
1871 2085
2086 + $control_manager->add_select_control(
2087 + array(
2088 + 'label' => esc_html__( 'Side', 'responsive-menu' ),
2089 + 'id' => 'rmp-menu-button-left-or-right',
2090 + 'class' => 'rmp-menu-button-left-or-right no-updates',
2091 + 'tool_tip' => array(
2092 + 'text' => esc_html__( 'Specify which side of the page you want the button to be displayed on.', 'responsive-menu' ),
2093 + ),
2094 + 'name' => 'menu[button_left_or_right]',
2095 + 'options' => array(
2096 + 'right' => 'Right',
2097 + 'left' => 'Left',
2098 + ),
2099 + 'value' => rmp_get_value( $options, 'button_left_or_right' ),
2100 + )
2101 + );
1872 2102
1873 - echo $ui_manager->end_accordion_item();
1874 2103
1875 - //Toggle Type
1876 - echo $ui_manager->start_accordion_item( [
1877 - 'item_header' => [
1878 - 'item_title' => __('Button Type','responsive-menu-pro'),
1879 - ],
1880 - 'feature_type' => 'semi-pro',
1881 - ] );
2104 + $control_manager->add_select_control(
2105 + array(
2106 + 'label' => esc_html__( 'Position', 'responsive-menu' ),
2107 + 'id' => 'rmp-menu-button-position-type',
2108 + 'class' => 'no-updates',
2109 + 'tool_tip' => array(
2110 + 'text' => esc_html__( 'Specify how you want the button to stick to your page.', 'responsive-menu' ),
2111 + ),
2112 + 'name' => 'menu[button_position_type]',
2113 + 'options' => array(
2114 + 'fixed' => 'Fixed',
2115 + 'absolute' => 'Absolute',
2116 + 'relative' => 'Relative',
2117 + 'inside-element' => 'Custom Selector',
2118 + ),
2119 + 'value' => rmp_get_value( $options, 'button_position_type' ),
2120 + )
2121 + );
2122 + $ui_manager->end_group_controls();
1882 2123
1883 - echo $ui_manager->start_tabs_controls_panel(
1884 - [ 'tab_classes' => 'rmp-tab-content',
2124 + $control_manager->add_text_input_control(
2125 + array(
2126 + 'label' => esc_html__( 'Element selector', 'responsive-menu' ),
2127 + 'id' => 'rmp-menu-hamburger-selector',
2128 + 'type' => 'text',
2129 + 'group_classes' => 'full-size rmp-menu-hamburger-selector-div',
2130 + 'class' => '',
2131 + 'placeholder' => esc_html__( 'e.g. #header, .header', 'responsive-menu' ),
2132 + 'name' => 'menu[hamburger_position_selector]',
2133 + 'value' => rmp_get_value( $options, 'hamburger_position_selector' ),
2134 + 'tool_tip' => array(
2135 + 'text' => esc_html__( 'Show hamburger inside element.', 'responsive-menu' ),
2136 + ),
2137 + )
2138 + );
2139 +
2140 + $ui_manager->start_group_controls();
2141 + $control_manager->add_text_input_control(
2142 + array(
2143 + 'label' => esc_html__( 'Distance from Side', 'responsive-menu' ),
2144 + 'type' => 'number',
2145 + 'class' => 'no-updates',
2146 + 'id' => 'rmp-menu-button-distance-from-side',
2147 + 'name' => 'menu[button_distance_from_side]',
2148 + 'value' => rmp_get_value( $options, 'button_distance_from_side' ),
2149 + 'tool_tip' => array(
2150 + 'text' => esc_html__( 'Specify how far across from the side you want the button to display and it\'s unit.', 'responsive-menu' ),
2151 + ),
2152 + 'has_unit' => array(
2153 + 'unit_type' => 'all',
2154 + 'id' => 'rmp-menu-button-distance-from-side-unit',
2155 + 'name' => 'menu[button_distance_from_side_unit]',
2156 + 'classes' => 'is-unit no-updates',
2157 + 'default' => '%',
2158 + 'value' => rmp_get_value( $options, 'button_distance_from_side_unit' ),
2159 + ),
2160 + )
2161 + );
2162 +
2163 + $control_manager->add_text_input_control(
2164 + array(
2165 + 'label' => esc_html__( 'Distance from Top', 'responsive-menu' ),
2166 + 'type' => 'number',
2167 + 'id' => 'rmp-menu-button-top',
2168 + 'name' => 'menu[button_top]',
2169 + 'value' => rmp_get_value( $options, 'button_top' ),
2170 + 'class' => 'no-updates',
2171 + 'tool_tip' => array(
2172 + 'text' => esc_html__( 'Specify how far from the top you want the button to display and it\'s unit.', 'responsive-menu' ),
2173 + ),
2174 + 'has_unit' => array(
2175 + 'unit_type' => 'all',
2176 + 'id' => 'rmp-menu-button-top-unit',
2177 + 'name' => 'menu[button_top_unit]',
2178 + 'classes' => 'is-unit no-updates',
2179 + 'default' => 'px',
2180 + 'value' => rmp_get_value( $options, 'button_top_unit' ),
2181 + ),
2182 + )
2183 + );
2184 +
2185 + $ui_manager->end_group_controls();
2186 +
2187 + $control_manager->add_switcher_control(
2188 + array(
2189 + 'label' => esc_html__( 'Push Button with Menu', 'responsive-menu' ),
2190 + 'id' => 'rmp-menu-button-push-animation',
2191 + 'tool_tip' => array(
2192 + 'text' => esc_html__( 'The toggle button will slide along with menu container.', 'responsive-menu' ),
2193 + ),
2194 + 'name' => 'menu[button_push_with_animation]',
2195 + 'is_checked' => is_rmp_option_checked( 'on', $options, 'button_push_with_animation' ),
2196 +
2197 + )
2198 + );
2199 +
2200 +
2201 + $ui_manager->end_accordion_item();
2202 +
2203 + // Toggle Type
2204 + $ui_manager->start_accordion_item(
2205 + array(
2206 + 'item_header' => array(
2207 + 'item_title' => esc_html__( 'Button Type', 'responsive-menu' ),
2208 + ),
2209 + 'feature_type' => 'semi-pro',
2210 + )
2211 + );
2212 +
2213 + $ui_manager->start_tabs_controls_panel(
2214 + array(
2215 + 'tab_classes' => 'rmp-tab-content',
1885 2216 'tab_items' =>
1886 - [
1887 - 0 => [
2217 + array(
2218 + 0 => array(
1888 2219 'item_class' => 'nav-tab-active',
1889 2220 'item_target' => 'hamburger-type-line',
1890 - 'item_text' => __('Hamburger','responsive-menu-pro')
1891 - ],
1892 - 1 => [
2221 + 'item_text' => esc_html__( 'Hamburger', 'responsive-menu' ),
2222 + ),
2223 + 1 => array(
1893 2224 'item_class' => '',
1894 2225 'item_target' => 'hamburger-type-icon',
1895 - 'item_text' => __('Icon','responsive-menu-pro')
1896 - ],
1897 - 2 => [
2226 + 'item_text' => esc_html__( 'Icon', 'responsive-menu' ),
2227 + ),
2228 + 2 => array(
1898 2229 'item_class' => '',
1899 2230 'item_target' => 'hamburger-type-image',
1900 - 'item_text' => __('Image','responsive-menu-pro')
1901 - ],
1902 - ]
1903 - ]
2231 + 'item_text' => esc_html__( 'Image', 'responsive-menu' ),
2232 + ),
2233 + ),
2234 + )
1904 2235 );
1905 -
1906 - echo $ui_manager->start_tab_item(
1907 - [
2236 +
2237 + $ui_manager->start_tab_item(
2238 + array(
1908 2239 'item_id' => 'hamburger-type-line',
1909 2240 'item_class' => 'title-contents',
1910 - ]
2241 + )
1911 2242 );
1912 2243
1913 - echo $ui_manager->start_group_controls();
1914 - echo $control_manager->add_select_control( [
1915 - 'label' => __('Animation','responsive-menu-pro'),
1916 - 'id' => 'rmp-menu-button-click-animation',
1917 - 'class' => 'no-updates',
1918 - 'name' => 'menu[button_click_animation]',
1919 - 'options' => rmp_hamburger_type_animation_options(),
1920 - 'value' => rmp_get_value($options,'button_click_animation')
1921 - ] );
2244 + $ui_manager->start_group_controls();
2245 + $control_manager->add_select_control(
2246 + array(
2247 + 'label' => esc_html__( 'Animation', 'responsive-menu' ),
2248 + 'id' => 'rmp-menu-button-click-animation',
2249 + 'class' => 'no-updates',
2250 + 'name' => 'menu[button_click_animation]',
2251 + 'options' => rmp_hamburger_type_animation_options(),
2252 + 'value' => rmp_get_value( $options, 'button_click_animation' ),
2253 + )
2254 + );
1922 2255
1923 2256
1924 - echo $control_manager->add_text_input_control( [
1925 - 'label' => __('Line Spacing','responsive-menu-pro'),
1926 - 'type' => 'number',
1927 - 'id' => 'rmp-menu-button-line-margin',
1928 - 'name' => 'menu[button_line_margin]',
1929 - 'value' => rmp_get_value($options,'button_line_margin'),
1930 -
1931 - 'tool_tip' => [
1932 - 'text' => __('Set the margin between each individual button line and it\'s unit','responsive-menu-pro')
1933 - ],
1934 - 'has_unit' => [
1935 - 'unit_type' => 'all',
1936 - 'id' => 'rmp-menu-button-line-margin-unit',
1937 - 'name' => 'menu[button_line_margin_unit]',
1938 - 'classes' => 'is-unit',
1939 - 'default' => 'px',
1940 - 'value' => rmp_get_value($options,'button_line_margin_unit')
1941 - ],
1942 - ] );
1943 - echo $ui_manager->end_group_controls();
2257 + $control_manager->add_text_input_control(
2258 + array(
2259 + 'label' => esc_html__( 'Line Spacing', 'responsive-menu' ),
2260 + 'type' => 'number',
2261 + 'id' => 'rmp-menu-button-line-margin',
2262 + 'name' => 'menu[button_line_margin]',
2263 + 'value' => rmp_get_value( $options, 'button_line_margin' ),
1944 2264
1945 - echo $ui_manager->start_group_controls();
1946 - echo $control_manager->add_text_input_control( [
1947 - 'label' => __('Line Width','responsive-menu-pro'),
1948 - 'type' => 'number',
1949 - 'class' => 'no-updates',
1950 - 'id' => 'rmp-menu-button-line-width',
1951 - 'name' => 'menu[button_line_width]',
1952 - 'value' => rmp_get_value($options,'button_line_width'),
1953 -
1954 - 'tool_tip' => [
1955 - 'text' => __('Set the width of each individual button line and it\'s unit','responsive-menu-pro')
1956 - ],
1957 - 'has_unit' => [
1958 - 'unit_type' => 'all',
1959 - 'id' => 'rmp-menu-button-line-width-unit',
1960 - 'name' => 'menu[button_line_width_unit]',
1961 - 'classes' => 'is-unit',
1962 - 'default' => 'px',
1963 - 'value' => rmp_get_value($options,'button_line_width_unit')
1964 - ]
1965 - ] );
2265 + 'tool_tip' => array(
2266 + 'text' => esc_html__( 'Set the margin between each individual button line and it\'s unit', 'responsive-menu' ),
2267 + ),
2268 + 'has_unit' => array(
2269 + 'unit_type' => 'all',
2270 + 'id' => 'rmp-menu-button-line-margin-unit',
2271 + 'name' => 'menu[button_line_margin_unit]',
2272 + 'classes' => 'is-unit',
2273 + 'default' => 'px',
2274 + 'value' => rmp_get_value( $options, 'button_line_margin_unit' ),
2275 + ),
2276 + )
2277 + );
2278 + $ui_manager->end_group_controls();
1966 2279
1967 - echo $control_manager->add_text_input_control( [
1968 - 'label' => __('Line Height','responsive-menu-pro'),
1969 - 'type' => 'number',
1970 - 'class' => 'no-updates',
1971 - 'id' => 'rmp-menu-button-line-height',
1972 - 'name' => 'menu[button_line_height]',
1973 - 'value' => rmp_get_value($options,'button_line_height'),
1974 -
1975 - 'tool_tip' => [
1976 - 'text' => __('Set the height of each individual button line and it\'s unit','responsive-menu-pro')
1977 - ],
1978 - 'has_unit' => [
1979 - 'unit_type' => 'all',
1980 - 'id' => 'rmp-menu-button-line-height-unit',
1981 - 'name' => 'menu[button_line_height_unit]',
1982 - 'classes' => 'is-unit',
1983 - 'default' => 'px',
1984 - 'value' => rmp_get_value($options,'button_line_height_unit')
1985 - ]
1986 - ] );
2280 + $ui_manager->start_group_controls();
2281 + $control_manager->add_text_input_control(
2282 + array(
2283 + 'label' => esc_html__( 'Line Width', 'responsive-menu' ),
2284 + 'type' => 'number',
2285 + 'class' => 'no-updates',
2286 + 'id' => 'rmp-menu-button-line-width',
2287 + 'name' => 'menu[button_line_width]',
2288 + 'value' => rmp_get_value( $options, 'button_line_width' ),
2289 + 'tool_tip' => array(
2290 + 'text' => esc_html__( 'Set the width of each individual button line and it\'s unit', 'responsive-menu' ),
2291 + ),
2292 + 'has_unit' => array(
2293 + 'unit_type' => 'all',
2294 + 'id' => 'rmp-menu-button-line-width-unit',
2295 + 'name' => 'menu[button_line_width_unit]',
2296 + 'classes' => 'is-unit no-updates',
2297 + 'default' => 'px',
2298 + 'value' => rmp_get_value( $options, 'button_line_width_unit' ),
2299 + ),
2300 + )
2301 + );
1987 2302
1988 - echo $ui_manager->end_group_controls();
2303 + $control_manager->add_text_input_control(
2304 + array(
2305 + 'label' => esc_html__( 'Line Height', 'responsive-menu' ),
2306 + 'type' => 'number',
2307 + 'class' => 'no-updates',
2308 + 'id' => 'rmp-menu-button-line-height',
2309 + 'name' => 'menu[button_line_height]',
2310 + 'value' => rmp_get_value( $options, 'button_line_height' ),
1989 2311
1990 - echo $ui_manager->start_group_controls();
1991 - echo $control_manager->add_color_control( [
1992 - 'label' => __('Line Color','responsive-menu-pro'),
1993 - 'id' => 'rmp-menu-button-line-colour',
1994 - 'name' => 'menu[button_line_colour]',
1995 - 'value' => rmp_get_value($options,'button_line_colour'),
1996 -
1997 - ] );
2312 + 'tool_tip' => array(
2313 + 'text' => esc_html__( 'Set the height of each individual button line and it\'s unit', 'responsive-menu' ),
2314 + ),
2315 + 'has_unit' => array(
2316 + 'unit_type' => 'all',
2317 + 'id' => 'rmp-menu-button-line-height-unit',
2318 + 'name' => 'menu[button_line_height_unit]',
2319 + 'classes' => 'is-unit',
2320 + 'default' => 'px',
2321 + 'value' => rmp_get_value( $options, 'button_line_height_unit' ),
2322 + ),
2323 + )
2324 + );
1998 2325
1999 - echo $control_manager->add_color_control( [
2000 - 'label' => __('Line Hover','responsive-menu-pro'),
2001 - 'id' => 'rmp-menu-button-line-colour-hover',
2002 - 'name' => 'menu[button_line_colour_hover]',
2003 - 'value' => rmp_get_value($options,'button_line_colour_hover'),
2004 -
2005 - ] );
2006 - echo $ui_manager->end_group_controls();
2326 + $ui_manager->end_group_controls();
2007 2327
2328 + $ui_manager->start_group_controls();
2329 + $control_manager->add_color_control(
2330 + array(
2331 + 'label' => esc_html__( 'Icon Color', 'responsive-menu' ),
2332 + 'id' => 'rmp-menu-button-line-colour',
2333 + 'name' => 'menu[button_line_colour]',
2334 + 'value' => rmp_get_value( $options, 'button_line_colour' ),
2008 2335
2009 - echo $control_manager->add_color_control( [
2010 - 'label' => __('Line Active','responsive-menu-pro'),
2011 - 'id' => 'rmp-menu-button-line-colour-active',
2012 - 'name' => 'menu[button_line_colour_active]',
2013 - 'value' => rmp_get_value($options,'button_line_colour_active'),
2014 -
2015 - ] );
2336 + )
2337 + );
2016 2338
2017 - echo $ui_manager->end_tab_item();
2339 + $control_manager->add_color_control(
2340 + array(
2341 + 'label' => esc_html__( 'Icon Hover', 'responsive-menu' ),
2342 + 'id' => 'rmp-menu-button-line-colour-hover',
2343 + 'name' => 'menu[button_line_colour_hover]',
2344 + 'value' => rmp_get_value( $options, 'button_line_colour_hover' ),
2018 2345
2346 + )
2347 + );
2348 + $ui_manager->end_group_controls();
2019 2349
2020 - echo $ui_manager->start_tab_item(
2021 - [
2350 +
2351 + $control_manager->add_color_control(
2352 + array(
2353 + 'label' => esc_html__( 'Icon Active', 'responsive-menu' ),
2354 + 'id' => 'rmp-menu-button-line-colour-active',
2355 + 'name' => 'menu[button_line_colour_active]',
2356 + 'value' => rmp_get_value( $options, 'button_line_colour_active' ),
2357 +
2358 + )
2359 + );
2360 +
2361 + $ui_manager->end_tab_item();
2362 +
2363 +
2364 + $ui_manager->start_tab_item(
2365 + array(
2022 2366 'item_id' => 'hamburger-type-icon',
2023 2367 'item_class' => 'title-contents',
2024 - ]
2368 + )
2025 2369 );
2026 2370
2027 - echo $control_manager->add_icon_picker_control( [
2028 - 'label' => __('Font Icon','responsive-menu-pro'),
2029 - 'id' => 'rmp-menu-button-font-icon',
2030 - 'class' => 'no-updates',
2031 - 'group_classes' => 'full-size',
2032 - 'picker_class' => 'rmp-menu-font-icon-picker-button',
2033 - 'picker_id' => "rmp-menu-button-font-icon-selector",
2034 - 'name' => 'menu[button_font_icon]',
2035 - 'tool_tip'=> [
2036 - 'text' => __( 'Use a custom font icon instead of standard hamburger lines', 'responsive-menu-pro' )
2037 - ],
2038 - 'value' => rmp_get_value($options,'button_font_icon'),
2039 -
2040 - ] );
2371 + $control_manager->add_icon_picker_control(
2372 + array(
2373 + 'label' => esc_html__( 'Font Icon', 'responsive-menu' ),
2374 + 'id' => 'rmp-menu-button-font-icon',
2375 + 'class' => 'no-updates',
2376 + 'group_classes' => 'full-size',
2377 + 'picker_class' => 'rmp-menu-font-icon-picker-button',
2378 + 'picker_id' => 'rmp-menu-button-font-icon-selector',
2379 + 'name' => 'menu[button_font_icon]',
2380 + 'tool_tip' => array(
2381 + 'text' => esc_html__( 'Use a custom font icon instead of standard hamburger lines', 'responsive-menu' ),
2382 + ),
2383 + 'value' => rmp_get_value( $options, 'button_font_icon' ),
2041 2384
2042 - echo $control_manager->add_icon_picker_control( [
2043 - 'label' => __('Active Font Icon','responsive-menu-pro'),
2044 - 'id' => 'rmp-menu-button-font-icon-when-clicked',
2045 - 'group_classes' => 'full-size',
2046 - 'picker_class' => 'rmp-menu-font-icon-picker-button',
2047 - 'picker_id' => "rmp-menu-button-font-icon-when-clicked-selector",
2048 - 'name' => 'menu[button_font_icon_when_clicked]',
2049 - 'value' => rmp_get_value($options,'button_font_icon_when_clicked'),
2050 - ] );
2385 + )
2386 + );
2051 2387
2388 + $control_manager->add_icon_picker_control(
2389 + array(
2390 + 'label' => esc_html__( 'Active Font Icon', 'responsive-menu' ),
2391 + 'id' => 'rmp-menu-button-font-icon-when-clicked',
2392 + 'group_classes' => 'full-size',
2393 + 'picker_class' => 'rmp-menu-font-icon-picker-button',
2394 + 'picker_id' => 'rmp-menu-button-font-icon-when-clicked-selector',
2395 + 'name' => 'menu[button_font_icon_when_clicked]',
2396 + 'value' => rmp_get_value( $options, 'button_font_icon_when_clicked' ),
2397 + )
2398 + );
2052 2399
2053 - echo $ui_manager->end_tab_item();
2054 2400
2055 - echo $ui_manager->start_tab_item(
2056 - [
2401 + $ui_manager->end_tab_item();
2402 +
2403 + $ui_manager->start_tab_item(
2404 + array(
2057 2405 'item_id' => 'hamburger-type-image',
2058 2406 'item_class' => 'title-contents',
2059 - ]
2407 + )
2060 2408 );
2061 2409
2062 - echo $control_manager->add_image_control( [
2063 - 'label' => __('Image','responsive-menu-pro'),
2064 - 'group_classes' => 'full-size',
2065 - 'id' => 'rmp-menu-button-image',
2066 - 'picker_class' => 'rmp-menu-button-image-selector',
2067 - 'picker_id' => "rmp-menu-button-image-selector",
2068 - 'name' => 'menu[button_image]',
2069 - 'tool_tip'=> [
2070 - 'text' => __( 'Use a custom image instead of standard hamburger lines.', 'responsive-menu-pro' )
2071 - ],
2072 - 'value' => rmp_get_value($options,'button_image'),
2073 - ] );
2410 + $control_manager->add_image_control(
2411 + array(
2412 + 'label' => esc_html__( 'Image', 'responsive-menu' ),
2413 + 'group_classes' => 'full-size',
2414 + 'id' => 'rmp-menu-button-image',
2415 + 'picker_class' => 'rmp-menu-button-image-selector',
2416 + 'picker_id' => 'rmp-menu-button-image-selector',
2417 + 'name' => 'menu[button_image]',
2418 + 'tool_tip' => array(
2419 + 'text' => esc_html__( 'Use a custom image instead of standard hamburger lines.', 'responsive-menu' ),
2420 + ),
2421 + 'value' => rmp_get_value( $options, 'button_image' ),
2422 + )
2423 + );
2074 2424
2075 - echo $control_manager->add_image_control( [
2076 - 'label' => __('Active Image','responsive-menu-pro'),
2077 - 'group_classes' => 'full-size',
2078 - 'id' => 'rmp-menu-button-image-when-clicked',
2079 - 'picker_class' => 'rmp-menu-button-image-when-clicked-selector',
2080 - 'picker_id' => "rmp-menu-button-image-when-clicked-selector",
2081 - 'name' => 'menu[button_image_when_clicked]',
2082 - 'value' => rmp_get_value($options,'button_image_when_clicked'),
2083 - ] );
2425 + $control_manager->add_image_control(
2426 + array(
2427 + 'label' => esc_html__( 'Active Image', 'responsive-menu' ),
2428 + 'group_classes' => 'full-size',
2429 + 'id' => 'rmp-menu-button-image-when-clicked',
2430 + 'picker_class' => 'rmp-menu-button-image-when-clicked-selector',
2431 + 'picker_id' => 'rmp-menu-button-image-when-clicked-selector',
2432 + 'name' => 'menu[button_image_when_clicked]',
2433 + 'value' => rmp_get_value( $options, 'button_image_when_clicked' ),
2434 + )
2435 + );
2084 2436
2085 - echo $ui_manager->end_tab_item();
2437 + $ui_manager->end_tab_item();
2086 2438
2087 - echo $ui_manager->end_accordion_item();
2439 + $ui_manager->end_accordion_item();
2088 2440
2089 - //Toggle Title
2090 - echo $ui_manager->start_accordion_item( [
2091 - 'item_header' => [
2092 - 'item_title' => __('Button Text','responsive-menu-pro'),
2093 - ]
2094 - ] );
2441 + // Toggle Title
2442 + $ui_manager->start_accordion_item(
2443 + array(
2444 + 'item_header' => array(
2445 + 'item_title' => esc_html__( 'Button Text', 'responsive-menu' ),
2446 + ),
2447 + )
2448 + );
2095 2449
2096 - echo $ui_manager->start_group_controls();
2450 + $ui_manager->start_group_controls();
2097 2451
2098 - echo $control_manager->add_text_input_control( [
2099 - 'label' => __('Text','responsive-menu-pro'),
2100 - 'id' => 'rmp-menu-button-title',
2101 - 'type' => 'text',
2102 - 'class' => 'on-updates',
2103 - 'placeholder' => __('Enter text','responsive-menu-pro'),
2104 - 'name' => 'menu[button_title]',
2105 - 'value' => rmp_get_value($options,'button_title'),
2106 - 'tool_tip'=> [
2107 - 'text' => __( 'Add text along with hamburger icon/image when button is in active state.', 'responsive-menu-pro' )
2108 - ]
2109 - ] );
2452 + $control_manager->add_text_input_control(
2453 + array(
2454 + 'label' => esc_html__( 'Text', 'responsive-menu' ),
2455 + 'id' => 'rmp-menu-button-title',
2456 + 'type' => 'text',
2457 + 'class' => 'no-updates',
2458 + 'placeholder' => esc_html__( 'Enter text', 'responsive-menu' ),
2459 + 'name' => 'menu[button_title]',
2460 + 'value' => rmp_get_value( $options, 'button_title' ),
2461 + 'tool_tip' => array(
2462 + 'text' => esc_html__( 'Add text along with hamburger icon/image when button is in active state.', 'responsive-menu' ),
2463 + ),
2464 + )
2465 + );
2110 2466
2111 - echo $control_manager->add_text_input_control( [
2112 - 'label' => __('Active Text','responsive-menu-pro'),
2113 - 'id' => 'rmp-menu-button-title-open',
2114 - 'name' => 'menu[button_title_open]',
2115 - 'class' => 'on-updates',
2116 - 'placeholder' => __('Enter text','responsive-menu-pro'),
2117 - 'type' => 'text',
2118 - 'value' => rmp_get_value($options,'button_title_open'),
2467 + $control_manager->add_text_input_control(
2468 + array(
2469 + 'label' => esc_html__( 'Active Text', 'responsive-menu' ),
2470 + 'id' => 'rmp-menu-button-title-open',
2471 + 'name' => 'menu[button_title_open]',
2472 + 'class' => 'no-updates',
2473 + 'placeholder' => esc_html__( 'Enter text', 'responsive-menu' ),
2474 + 'type' => 'text',
2475 + 'value' => rmp_get_value( $options, 'button_title_open' ),
2119 2476
2120 - ] );
2477 + )
2478 + );
2121 2479
2122 - echo $ui_manager->end_group_controls();
2480 + $ui_manager->end_group_controls();
2123 2481
2124 - echo $ui_manager->start_group_controls();
2125 - echo $control_manager->add_select_control( [
2126 - 'label' => __('Text Position','responsive-menu-pro'),
2127 - 'id' => 'rmp-menu-button-title-position',
2128 - 'class' => 'on-updates',
2129 - 'class' => 'rmp-menu-button-title-position',
2130 - 'name' => 'menu[button_title_position]',
2131 - 'options' => array( 'top' => 'Top' , 'left' => 'Left', 'bottom' => 'Bottom', 'right'=>'Right' ),
2132 - 'value' => rmp_get_value($options,'button_title_position')
2133 - ] );
2482 + $ui_manager->start_group_controls();
2483 + $control_manager->add_select_control(
2484 + array(
2485 + 'label' => esc_html__( 'Text Position', 'responsive-menu' ),
2486 + 'id' => 'rmp-menu-button-title-position',
2487 + 'class' => 'no-updates',
2488 + 'class' => 'rmp-menu-button-title-position',
2489 + 'name' => 'menu[button_title_position]',
2490 + 'options' => array(
2491 + 'top' => 'Top',
2492 + 'left' => 'Left',
2493 + 'bottom' => 'Bottom',
2494 + 'right' => 'Right',
2495 + ),
2496 + 'value' => rmp_get_value( $options, 'button_title_position' ),
2497 + )
2498 + );
2134 2499
2135 - echo $control_manager->add_text_input_control( [
2136 - 'label' => __('Font Family','responsive-menu-pro'),
2137 - 'id' => 'rmp-menu-button-font',
2138 - 'class' => 'no-updates',
2139 - 'name' => 'menu[button_font]',
2140 - 'placeholder' => __('Enter font','responsive-menu-pro'),
2141 - 'type' => 'text',
2142 - 'value' => rmp_get_value($options,'button_font'),
2143 - ] );
2144 - echo $ui_manager->end_group_controls();
2500 + $control_manager->add_text_input_control(
2501 + array(
2502 + 'label' => esc_html__( 'Font Family', 'responsive-menu' ),
2503 + 'id' => 'rmp-menu-button-font',
2504 + 'class' => 'no-updates',
2505 + 'name' => 'menu[button_font]',
2506 + 'placeholder' => esc_html__( 'Enter font', 'responsive-menu' ),
2507 + 'type' => 'text',
2508 + 'value' => rmp_get_value( $options, 'button_font' ),
2509 + )
2510 + );
2511 + $ui_manager->end_group_controls();
2145 2512
2146 - echo $ui_manager->start_group_controls();
2147 - echo $control_manager->add_text_input_control( [
2148 - 'label' => __('Font Size','responsive-menu-pro'),
2149 - 'type' => 'number',
2150 - 'class' => 'on-updates',
2151 - 'id' => 'rmp-menu-button-font-size',
2152 - 'name' => 'menu[button_font_size]',
2153 - 'value' => rmp_get_value($options,'button_font_size'),
2154 - 'class' => 'no-updates',
2155 - 'has_unit' => [
2156 - 'unit_type' => 'all',
2157 - 'id' => 'rmp-menu-button-font-size-unit',
2158 - 'name' => 'menu[button_font_size_unit]',
2159 - 'classes' => 'is-unit no-updates',
2160 - 'default' => 'px',
2161 - 'value' => rmp_get_value($options,'button_font_size_unit'),
2162 - ],
2163 - ] );
2513 + $ui_manager->start_group_controls();
2514 + $control_manager->add_text_input_control(
2515 + array(
2516 + 'label' => esc_html__( 'Font Size', 'responsive-menu' ),
2517 + 'type' => 'number',
2518 + 'class' => 'no-updates',
2519 + 'id' => 'rmp-menu-button-font-size',
2520 + 'name' => 'menu[button_font_size]',
2521 + 'value' => rmp_get_value( $options, 'button_font_size' ),
2522 + 'class' => 'no-updates',
2523 + 'has_unit' => array(
2524 + 'unit_type' => 'all',
2525 + 'id' => 'rmp-menu-button-font-size-unit',
2526 + 'name' => 'menu[button_font_size_unit]',
2527 + 'classes' => 'is-unit no-updates',
2528 + 'default' => 'px',
2529 + 'value' => rmp_get_value( $options, 'button_font_size_unit' ),
2530 + ),
2531 + )
2532 + );
2164 2533
2165 - echo $control_manager->add_text_input_control( [
2166 - 'label' => __('Line Height','responsive-menu-pro'),
2167 - 'type' => 'number',
2168 - 'class' => 'on-updates',
2169 - 'id' => 'rmp-menu-button-title-line-height',
2170 - 'name' => 'menu[button_title_line_height]',
2171 - 'value' => rmp_get_value($options,'button_title_line_height'),
2172 -
2173 - 'has_unit' => [
2174 - 'unit_type' => 'all',
2175 - 'id' => 'rmp-menu-button-title-line-height-unit',
2176 - 'name' => 'menu[button_title_line_height_unit]',
2177 - 'classes' => 'is-unit no-updates',
2178 - 'default' => 'px',
2179 - 'value' => rmp_get_value($options,'button_title_line_height_unit'),
2180 - ],
2181 - ] );
2534 + $control_manager->add_text_input_control(
2535 + array(
2536 + 'label' => esc_html__( 'Line Height', 'responsive-menu' ),
2537 + 'type' => 'number',
2538 + 'class' => 'no-updates',
2539 + 'id' => 'rmp-menu-button-title-line-height',
2540 + 'name' => 'menu[button_title_line_height]',
2541 + 'value' => rmp_get_value( $options, 'button_title_line_height' ),
2182 2542
2183 - echo $ui_manager->end_group_controls();
2543 + 'has_unit' => array(
2544 + 'unit_type' => 'all',
2545 + 'id' => 'rmp-menu-button-title-line-height-unit',
2546 + 'name' => 'menu[button_title_line_height_unit]',
2547 + 'classes' => 'is-unit no-updates',
2548 + 'default' => 'px',
2549 + 'value' => rmp_get_value( $options, 'button_title_line_height_unit' ),
2550 + ),
2551 + )
2552 + );
2184 2553
2185 - echo $control_manager->add_color_control( [
2186 - 'label' => __('Text Color','responsive-menu-pro'),
2187 - 'id' => 'rmp-menu-button-text-colour',
2188 - 'name' => 'menu[button_text_colour]',
2189 - 'value' => rmp_get_value($options,'button_text_colour'),
2190 -
2191 - ] );
2554 + $ui_manager->end_group_controls();
2192 2555
2193 - echo $ui_manager->end_accordion_item();
2556 + $control_manager->add_color_control(
2557 + array(
2558 + 'label' => esc_html__( 'Text Color', 'responsive-menu' ),
2559 + 'id' => 'rmp-menu-button-text-colour',
2560 + 'name' => 'menu[button_text_colour]',
2561 + 'value' => rmp_get_value( $options, 'button_text_colour' ),
2194 2562
2195 - //Toggle behaviour
2196 - echo $ui_manager->start_accordion_item( [
2197 - 'item_header' => [
2198 - 'item_title' => __('Button Behaviour','responsive-menu-pro'),
2199 - ],
2200 - 'feature_type' => 'semi-pro'
2201 - ] );
2563 + )
2564 + );
2202 2565
2203 - echo $control_manager->add_switcher_control( [
2204 - 'label' => __('Toggle menu on click','responsive-menu-pro'),
2205 - 'id' => 'rmp-menu-button-trigger-type-click',
2206 - 'class' => 'rmp-menu-button-trigger-type',
2207 - 'name' => 'menu[button_trigger_type_click]',
2208 - 'feature_type' => 'pro',
2209 - 'is_checked' => 'checked',
2210 - ] );
2566 + $ui_manager->end_accordion_item();
2211 2567
2212 - echo $control_manager->add_switcher_control( [
2213 - 'label' => __('Toggle menu on hover','responsive-menu-pro'),
2214 - 'id' => 'rmp-menu-button-trigger-type-hover',
2215 - 'class' => 'rmp-menu-button-trigger-type',
2216 - 'name' => 'menu[button_trigger_type_hover]',
2217 - 'feature_type' => 'pro',
2218 - 'is_checked' => is_rmp_option_checked('on', $options,'button_trigger_type_hover'),
2219 - ] );
2568 + // Toggle behaviour
2569 + $ui_manager->start_accordion_item(
2570 + array(
2571 + 'item_header' => array(
2572 + 'item_title' => esc_html__( 'Button Behaviour', 'responsive-menu' ),
2573 + ),
2574 + 'feature_type' => 'semi-pro',
2575 + )
2576 + );
2220 2577
2221 - echo $control_manager->add_text_input_control( [
2222 - 'label' => __('Custom Toggle Selector','responsive-menu-pro'),
2223 - 'type' => 'text',
2224 - 'group_classes' => 'full-size',
2225 - 'id' => 'rmp-menu-button-click-trigger',
2226 - 'name' => 'menu[button_click_trigger]',
2227 - 'value' => rmp_get_value($options,'button_click_trigger'),
2228 - 'tool_tip' => [
2229 - 'text' => __( 'If you don\'t want to use the button that comes with the menu, you can specify your own container trigger here. Any CSS selector is accepted.', 'responsive-menu-pro' ),
2230 - ]
2231 - ] );
2578 + $control_manager->add_switcher_control(
2579 + array(
2580 + 'label' => esc_html__( 'Toggle menu on click', 'responsive-menu' ),
2581 + 'id' => 'rmp-menu-button-trigger-type-click',
2582 + 'class' => 'rmp-menu-button-trigger-type',
2583 + 'name' => 'menu[button_trigger_type_click]',
2584 + 'feature_type' => 'pro',
2585 + 'is_checked' => 'checked',
2586 + )
2587 + );
2232 2588
2233 - echo $ui_manager->end_accordion_item();
2234 - ?>
2589 + $control_manager->add_switcher_control(
2590 + array(
2591 + 'label' => esc_html__( 'Toggle menu on hover', 'responsive-menu' ),
2592 + 'id' => 'rmp-menu-button-trigger-type-hover',
2593 + 'class' => 'rmp-menu-button-trigger-type',
2594 + 'name' => 'menu[button_trigger_type_hover]',
2595 + 'feature_type' => 'pro',
2596 + 'is_checked' => is_rmp_option_checked( 'on', $options, 'button_trigger_type_hover' ),
2597 + )
2598 + );
2599 +
2600 + $control_manager->add_text_input_control(
2601 + array(
2602 + 'label' => esc_html__( 'Custom Toggle Selector', 'responsive-menu' ),
2603 + 'type' => 'text',
2604 + 'group_classes' => 'full-size',
2605 + 'id' => 'rmp-menu-button-click-trigger',
2606 + 'name' => 'menu[button_click_trigger]',
2607 + 'value' => rmp_get_value( $options, 'button_click_trigger' ),
2608 + 'tool_tip' => array(
2609 + 'text' => esc_html__( 'If you don\'t want to use the button that comes with the menu, you can specify your own container trigger here. Any CSS selector is accepted.', 'responsive-menu' ),
2610 + ),
2611 + )
2612 + );
2613 +
2614 + $ui_manager->end_accordion_item();
2615 + ?>
2235 2616 </ul>
2236 2617 </div>
2237 2618
2238 2619 <div id="tab-container" class="rmp-accordions" aria-label="Container">
2239 2620 <div class="rmp-order-item rmp-order-item-description rmp-ignore-accordion">
2240 - <?php echo __('Drag the container items up and down to re-order their appearance on the front end.','responsive-menu-pro'); ?>
2621 + <?php echo esc_html__( 'Drag the container items up and down to re-order their appearance on the front end.', 'responsive-menu' ); ?>
2241 2622 </div>
2242 2623 <ul class="rmp-accordion-container" id="rmp-menu-ordering-items">
2243 -
2624 +
2244 2625 <?php
2245 2626
2246 - if ( ! empty( $options['items_order'] ) ) {
2247 - foreach( $options['items_order'] as $key => $value ) {
2248 - if ( 'menu' === $key ) {
2249 - include_once RMP_PLUGIN_PATH_V4 . '/templates/menu-elements/menu.php';
2250 - } elseif( 'title' === $key ) {
2251 - include_once RMP_PLUGIN_PATH_V4 . '/templates/menu-elements/title.php';
2252 - } elseif( 'search' === $key ) {
2253 - include_once RMP_PLUGIN_PATH_V4 . '/templates/menu-elements/search.php';
2254 - } else {
2255 - include_once RMP_PLUGIN_PATH_V4 . '/templates/menu-elements/additional-content.php';
2256 - }
2627 + if ( ! empty( $options['items_order'] ) ) {
2628 + foreach ( $options['items_order'] as $key => $value ) {
2629 + if ( 'menu' === $key ) {
2630 + include_once RMP_PLUGIN_PATH_V4 . '/templates/menu-elements/menu.php';
2631 + } elseif ( 'title' === $key ) {
2632 + include_once RMP_PLUGIN_PATH_V4 . '/templates/menu-elements/title.php';
2633 + } elseif ( 'social-icons' === $key ) {
2634 + include_once RMP_PLUGIN_PATH_V4 . '/templates/menu-elements/social-icons.php';
2635 + } elseif ( 'search' === $key ) {
2636 + include_once RMP_PLUGIN_PATH_V4 . '/templates/menu-elements/search.php';
2637 + } else {
2638 + include_once RMP_PLUGIN_PATH_V4 . '/templates/menu-elements/additional-content.php';
2257 2639 }
2258 2640 }
2641 + }
2259 2642
2260 - echo $ui_manager->start_accordion_item( [
2261 - 'item_header' => [
2262 - 'item_title' => __('Appearance','responsive-menu-pro'),
2263 - ],
2264 - 'feature_type' => 'semi-pro',
2265 - ] );
2643 + $ui_manager->start_accordion_item(
2644 + array(
2645 + 'item_header' => array(
2646 + 'item_title' => esc_html__( 'Appearance', 'responsive-menu' ),
2647 + ),
2648 + 'feature_type' => 'semi-pro',
2649 + )
2650 + );
2266 2651
2267 - echo $control_manager->add_text_input_control( [
2268 - 'label' => __('Width','responsive-menu-pro'),
2269 - 'type' => 'number',
2270 - 'id' => 'rmp-menu-container-width',
2271 - 'class' => 'no-updates',
2272 - 'name' => 'menu[menu_width]',
2273 - 'value' => rmp_get_value($options,'menu_width'),
2274 - 'group_classes' => 'full-size',
2275 - 'placeholder' => __('Enter value','responsive-menu-pro'),
2276 - 'has_unit' => [
2277 - 'unit_type' => 'all',
2278 - 'id' => 'rmp-menu-container-width-unit',
2279 - 'name' => 'menu[menu_width_unit]',
2280 - 'default' => '%',
2281 - 'classes' => 'is-unit no-updates',
2282 - 'value' => rmp_get_value($options,'menu_width_unit'),
2283 - ]
2284 - ] );
2652 + $control_manager->add_text_input_control(
2653 + array(
2654 + 'label' => esc_html__( 'Width', 'responsive-menu' ),
2655 + 'type' => 'number',
2656 + 'id' => 'rmp-menu-container-width',
2657 + 'class' => 'no-updates',
2658 + 'name' => 'menu[menu_width]',
2659 + 'value' => rmp_get_value( $options, 'menu_width' ),
2660 + 'multi_device' => true,
2661 + 'group_classes' => 'full-size',
2662 + 'placeholder' => esc_html__( 'Enter value', 'responsive-menu' ),
2663 + 'has_unit' => array(
2664 + 'unit_type' => 'all',
2665 + 'id' => 'rmp-menu-container-width-unit',
2666 + 'name' => 'menu[menu_width_unit]',
2667 + 'default' => '%',
2668 + 'classes' => 'is-unit no-updates',
2669 + 'value' => rmp_get_value( $options, 'menu_width_unit' ),
2670 + 'multi_device' => true,
2671 + ),
2672 + )
2673 + );
2285 2674
2286 - echo $ui_manager->start_group_controls();
2675 + $ui_manager->start_group_controls();
2287 2676
2288 - echo $control_manager->add_text_input_control( [
2289 - 'label' => __('Maximum Width','responsive-menu-pro'),
2290 - 'type' => 'number',
2291 - 'class' => 'no-updates',
2292 - 'id' => 'rmp-menu-container-max-width',
2293 - 'name' => 'menu[menu_maximum_width]',
2294 - 'value' => rmp_get_value($options,'menu_maximum_width'),
2295 - 'placeholder' => __('Enter value','responsive-menu-pro'),
2296 - 'has_unit' => [
2297 - 'unit_type' => 'all',
2298 - 'id' => 'rmp-menu-container-max-width-unit',
2299 - 'name' => 'menu[menu_maximum_width_unit]',
2300 - 'classes' => 'is-unit',
2301 - 'default' => 'px',
2302 - 'value' => rmp_get_value($options,'menu_maximum_width_unit'),
2303 - ]
2304 - ] );
2677 + $control_manager->add_text_input_control(
2678 + array(
2679 + 'label' => esc_html__( 'Maximum Width', 'responsive-menu' ),
2680 + 'type' => 'number',
2681 + 'class' => 'no-updates',
2682 + 'id' => 'rmp-menu-container-max-width',
2683 + 'name' => 'menu[menu_maximum_width]',
2684 + 'value' => rmp_get_value( $options, 'menu_maximum_width' ),
2685 + 'placeholder' => esc_html__( 'Enter value', 'responsive-menu' ),
2686 + 'has_unit' => array(
2687 + 'unit_type' => 'all',
2688 + 'id' => 'rmp-menu-container-max-width-unit',
2689 + 'name' => 'menu[menu_maximum_width_unit]',
2690 + 'classes' => 'is-unit no-updates',
2691 + 'default' => 'px',
2692 + 'value' => rmp_get_value( $options, 'menu_maximum_width_unit' ),
2693 + ),
2694 + )
2695 + );
2305 2696
2306 - echo $control_manager->add_text_input_control( [
2307 - 'label' => __('Minimum Width','responsive-menu-pro'),
2308 - 'type' => 'number',
2309 - 'class' => 'no-updates',
2310 - 'id' => 'rmp-menu-container-min-width',
2311 - 'name' => 'menu[menu_minimum_width]',
2312 - 'value' => rmp_get_value($options,'menu_minimum_width'),
2313 - 'placeholder' => __('Enter value','responsive-menu-pro'),
2314 - 'has_unit' => [
2315 - 'unit_type' => 'all',
2316 - 'id' => 'rmp-menu-container-min-width-unit',
2317 - 'name' => 'menu[menu_minimum_width_unit]',
2318 - 'classes' => 'is-unit',
2319 - 'default' => 'px',
2320 - 'value' => rmp_get_value($options,'menu_minimum_width_unit'),
2321 - ]
2322 - ] );
2697 + $control_manager->add_text_input_control(
2698 + array(
2699 + 'label' => esc_html__( 'Minimum Width', 'responsive-menu' ),
2700 + 'type' => 'number',
2701 + 'class' => 'no-updates',
2702 + 'id' => 'rmp-menu-container-min-width',
2703 + 'name' => 'menu[menu_minimum_width]',
2704 + 'value' => rmp_get_value( $options, 'menu_minimum_width' ),
2705 + 'placeholder' => esc_html__( 'Enter value', 'responsive-menu' ),
2706 + 'has_unit' => array(
2707 + 'unit_type' => 'all',
2708 + 'id' => 'rmp-menu-container-min-width-unit',
2709 + 'name' => 'menu[menu_minimum_width_unit]',
2710 + 'classes' => 'is-unit no-updates',
2711 + 'default' => 'px',
2712 + 'value' => rmp_get_value( $options, 'menu_minimum_width_unit' ),
2713 + ),
2714 + )
2715 + );
2323 2716
2324 - echo $ui_manager->end_group_controls();
2717 + $ui_manager->end_group_controls();
2325 2718
2326 - echo $control_manager->add_switcher_control( [
2327 - 'label' => __('Auto Height','responsive-menu-pro'),
2328 - 'id' => 'rmp-menu-container-height',
2329 - 'class' => 'rmp-menu-container-height',
2330 - 'tool_tip' => [
2331 - 'text' => __( 'Limit container height upto last container element','responsive-menu-pro'),
2332 - ],
2333 - 'feature_type' => 'pro',
2334 - 'name' => 'menu_auto_height',
2335 - 'is_checked' => ''
2336 - ] );
2719 + $control_manager->add_switcher_control(
2720 + array(
2721 + 'label' => esc_html__( 'Auto Height', 'responsive-menu' ),
2722 + 'id' => 'rmp-menu-container-height',
2723 + 'class' => 'rmp-menu-container-height',
2724 + 'tool_tip' => array(
2725 + 'text' => esc_html__( 'Limit container height upto last container element', 'responsive-menu' ),
2726 + ),
2727 + 'feature_type' => 'pro',
2728 + 'name' => 'menu_auto_height',
2729 + 'is_checked' => '',
2730 + )
2731 + );
2337 2732
2338 - echo $control_manager->add_group_text_control( [
2339 - 'label' => __('Padding','responsive-menu-pro'),
2340 - 'type' => 'text',
2341 - 'class' => 'rmp-menu-container-padding',
2342 - 'name' => 'menu[menu_container_padding]',
2343 - 'input_options' => [ 'top', 'right', 'bottom', 'left' ],
2344 - 'value_options' => ! empty( $options['menu_container_padding'] ) ? $options['menu_container_padding'] : ''
2345 - ] );
2733 + $control_manager->add_group_text_control(
2734 + array(
2735 + 'label' => esc_html__( 'Padding', 'responsive-menu' ),
2736 + 'type' => 'text',
2737 + 'class' => 'rmp-menu-container-padding',
2738 + 'name' => 'menu[menu_container_padding]',
2739 + 'input_options' => array( 'top', 'right', 'bottom', 'left' ),
2740 + 'value_options' => ! empty( $options['menu_container_padding'] ) ? $options['menu_container_padding'] : '',
2741 + )
2742 + );
2346 2743
2347 - echo $ui_manager->accordion_divider();
2744 + $ui_manager->accordion_divider();
2348 2745
2349 - echo $control_manager->add_color_control( [
2350 - 'label' => __('Container Background','responsive-menu-pro'),
2351 - 'id' => 'rmp-container-background-colour',
2352 - 'name' => 'menu[menu_container_background_colour]',
2353 - 'value' => rmp_get_value($options,'menu_container_background_colour'),
2354 - ] );
2746 + $control_manager->add_color_control(
2747 + array(
2748 + 'label' => esc_html__( 'Container Background', 'responsive-menu' ),
2749 + 'id' => 'rmp-container-background-colour',
2750 + 'name' => 'menu[menu_container_background_colour]',
2751 + 'value' => rmp_get_value( $options, 'menu_container_background_colour' ),
2752 + )
2753 + );
2355 2754
2356 - echo $control_manager->add_image_control( [
2357 - 'label' => __('Background Image','responsive-menu-pro'),
2358 - 'group_classes' => 'full-size',
2359 - 'id' => 'rmp-menu-background-image',
2360 - 'picker_class' => 'rmp-menu-background-image-selector',
2361 - 'picker_id' => "rmp-menu-background-image-selector",
2362 - 'name' => 'menu[menu_background_image]',
2363 - 'value' => rmp_get_value($options,'menu_background_image'),
2364 -
2365 - ] );
2755 + $control_manager->add_shortcut_link(
2756 + array(
2757 + 'label' => 'Change Menu Background',
2758 + 'target' => 'tab-menu-styling',
2759 + 'accordion_id' => 'ui-id-36',
2760 + )
2761 + );
2366 2762
2367 - echo $ui_manager->accordion_divider();
2763 + $control_manager->add_shortcut_link(
2764 + array(
2765 + 'label' => 'Style Menu Items',
2766 + 'target' => 'tab-menu-styling',
2767 + 'accordion_id' => 'ui-id-40',
2768 + 'sub_accordion_id' => 'ui-id-52',
2769 + )
2770 + );
2368 2771
2369 - echo $control_manager->add_sub_heading(
2370 - ['text' => __('Animation','responsive-menu-pro') ]
2772 + $control_manager->add_image_control(
2773 + array(
2774 + 'label' => esc_html__( 'Background Image', 'responsive-menu' ),
2775 + 'group_classes' => 'full-size',
2776 + 'id' => 'rmp-menu-background-image',
2777 + 'picker_class' => 'rmp-menu-background-image-selector',
2778 + 'picker_id' => 'rmp-menu-background-image-selector',
2779 + 'name' => 'menu[menu_background_image]',
2780 + 'value' => rmp_get_value( $options, 'menu_background_image' ),
2781 +
2782 + )
2371 2783 );
2372 2784
2373 - echo $ui_manager->start_group_controls();
2374 - echo $control_manager->add_select_control( [
2375 - 'label' => __('Direction','responsive-menu-pro'),
2376 - 'id' => 'rmp-menu-appear-from',
2377 - 'tool_tip' => [
2378 - 'text' => __('Set the viewport side for container entry.','responsive-menu-pro'),
2379 - ],
2380 - 'name' => 'menu[menu_appear_from]',
2381 - 'options' => [ 'left' => 'Left' , 'right' => 'Right', 'top' => 'Top', 'bottom' => 'Bottom' ],
2382 - 'value' => rmp_get_value($options,'menu_appear_from')
2383 - ] );
2785 + $ui_manager->accordion_divider();
2384 2786
2385 - echo $control_manager->add_select_control( [
2386 - 'label' => __('Type','responsive-menu-pro'),
2387 - 'id' => 'rmp-animation-type',
2388 - 'name' => 'menu[animation_type]',
2389 - 'options' => [ 'slide' => 'Slide' , 'push' => 'Push', 'fade' => 'Fade (PRO)' ],
2390 - 'value' => rmp_get_value($options,'animation_type')
2391 - ] );
2787 + $control_manager->add_sub_heading(
2788 + array( 'text' => esc_html__( 'Animation', 'responsive-menu' ) )
2789 + );
2392 2790
2791 + $ui_manager->start_group_controls();
2393 2792
2394 - echo $ui_manager->end_group_controls();
2793 + $control_manager->add_select_control(
2794 + array(
2795 + 'label' => esc_html__( 'Type', 'responsive-menu' ),
2796 + 'id' => 'rmp-animation-type',
2797 + 'name' => 'menu[animation_type]',
2798 + 'options' => array(
2799 + 'slide' => 'Slide',
2800 + 'push' => 'Push',
2801 + 'fade' => 'Fade',
2802 + ),
2803 + 'value' => rmp_get_value( $options, 'animation_type' ),
2804 + )
2805 + );
2395 2806
2396 - echo $control_manager->add_text_input_control( [
2397 - 'label' => __('Transition delay','responsive-menu-pro'),
2398 - 'type' => 'text',
2399 - 'id' => 'rmp-menu-animation-speed',
2400 - 'name' => 'menu[animation_speed]',
2401 - 'value' => rmp_get_value($options,'animation_speed'),
2402 - 'tool_tip' => [
2403 - 'text' => __('Control the speed of animation for container entry and exit.','responsive-menu-pro')
2404 - ],
2405 - 'has_unit' => [
2406 - 'unit_type' => 's',
2407 - ],
2408 - ] );
2807 + $control_manager->add_select_control(
2808 + array(
2809 + 'label' => esc_html__( 'Direction', 'responsive-menu' ),
2810 + 'id' => 'rmp-menu-appear-from',
2811 + 'tool_tip' => array(
2812 + 'text' => esc_html__( 'Set the viewport side for container entry.', 'responsive-menu' ),
2813 + ),
2814 + 'name' => 'menu[menu_appear_from]',
2815 + 'options' => array(
2816 + 'left' => 'Left',
2817 + 'right' => 'Right',
2818 + 'top' => 'Top',
2819 + 'bottom' => 'Bottom',
2820 + ),
2821 + 'value' => rmp_get_value( $options, 'menu_appear_from' ),
2822 + )
2823 + );
2409 2824
2410 - echo $control_manager->add_text_input_control( [
2411 - 'label' => __('Push Wrapper','responsive-menu-pro'),
2412 - 'group_classes' => 'full-size',
2413 - 'type' => 'text',
2414 - 'tool_tip' => [
2415 - 'text' => __('Mention the CSS selector of the main element which should be pushed when using push animations.','responsive-menu-pro')
2416 - ],
2417 - 'placeholder' => __('CSS Selector','responsive-menu-pro'),
2418 - 'id' => 'rmp-page-wrapper',
2419 - 'name' => 'menu[page_wrapper]',
2420 - 'value' => rmp_get_value($options,'page_wrapper')
2421 - ] );
2825 + $ui_manager->end_group_controls();
2422 2826
2423 - echo $ui_manager->end_accordion_item();
2827 + $control_manager->add_text_input_control(
2828 + array(
2829 + 'label' => esc_html__( 'Transition delay', 'responsive-menu' ),
2830 + 'type' => 'text',
2831 + 'id' => 'rmp-menu-animation-speed',
2832 + 'name' => 'menu[animation_speed]',
2833 + 'value' => rmp_get_value( $options, 'animation_speed' ),
2834 + 'tool_tip' => array(
2835 + 'text' => esc_html__( 'Control the speed of animation for container entry and exit.', 'responsive-menu' ),
2836 + ),
2837 + 'has_unit' => array(
2838 + 'unit_type' => 's',
2839 + ),
2840 + )
2841 + );
2424 2842
2425 - echo $ui_manager->start_accordion_item( [
2426 - 'item_header' => [
2427 - 'item_title' => __('Behaviour','responsive-menu-pro'),
2428 - ],
2429 - 'feature_type' => 'semi-pro',
2430 - ] );
2843 + $control_manager->add_text_input_control(
2844 + array(
2845 + 'label' => esc_html__( 'Push Wrapper', 'responsive-menu' ),
2846 + 'group_classes' => 'full-size',
2847 + 'type' => 'text',
2848 + 'tool_tip' => array(
2849 + 'text' => esc_html__( 'Mention the CSS selector of the main element which should be pushed when using push animations.', 'responsive-menu' ),
2850 + ),
2851 + 'placeholder' => esc_html__( 'CSS Selector', 'responsive-menu' ),
2852 + 'id' => 'rmp-page-wrapper',
2853 + 'name' => 'menu[page_wrapper]',
2854 + 'value' => rmp_get_value( $options, 'page_wrapper' ),
2855 + )
2856 + );
2431 2857
2432 - echo $control_manager->add_sub_heading(
2433 - ['text' => __('Hide Menu On','responsive-menu-pro') ]
2858 + $ui_manager->end_accordion_item();
2859 +
2860 + $ui_manager->start_accordion_item(
2861 + array(
2862 + 'item_header' => array(
2863 + 'item_title' => esc_html__( 'Behaviour', 'responsive-menu' ),
2864 + ),
2865 + 'feature_type' => 'semi-pro',
2866 + )
2434 2867 );
2435 2868
2436 - echo $control_manager->add_switcher_control( [
2437 - 'label' => __('Page Clicks','responsive-menu-pro'),
2438 - 'id' => 'rmp-menu-close-on-page-click',
2439 - 'name' => 'menu[menu_close_on_body_click]',
2440 - 'is_checked' => is_rmp_option_checked('on', $options,'menu_close_on_body_click'),
2441 - ] );
2869 + $control_manager->add_sub_heading(
2870 + array( 'text' => esc_html__( 'Hide Menu On', 'responsive-menu' ) )
2871 + );
2442 2872
2443 - echo $control_manager->add_switcher_control( [
2444 - 'label' => __('Link Clicks','responsive-menu-pro'),
2445 - 'id' => 'rmp-menu-close-on-link-click',
2446 - 'name' => 'menu[menu_close_on_link_click]',
2447 - 'is_checked' => is_rmp_option_checked('on', $options,'menu_close_on_link_click'),
2448 - ] );
2873 + $control_manager->add_switcher_control(
2874 + array(
2875 + 'label' => esc_html__( 'Page Clicks', 'responsive-menu' ),
2876 + 'id' => 'rmp-menu-close-on-page-click',
2877 + 'name' => 'menu[menu_close_on_body_click]',
2878 + 'is_checked' => is_rmp_option_checked( 'on', $options, 'menu_close_on_body_click' ),
2879 + )
2880 + );
2449 2881
2450 - echo $control_manager->add_switcher_control( [
2451 - 'label' => __('Page Scroll','responsive-menu-pro'),
2452 - 'id' => 'rmp-menu-close-on-page-scroll',
2453 - 'name' => 'menu_close_on_scroll',
2454 - 'feature_type' => 'pro',
2455 - 'is_checked' => ''
2456 - ] );
2882 + $control_manager->add_switcher_control(
2883 + array(
2884 + 'label' => esc_html__( 'Link Clicks', 'responsive-menu' ),
2885 + 'id' => 'rmp-menu-close-on-link-click',
2886 + 'name' => 'menu[menu_close_on_link_click]',
2887 + 'is_checked' => is_rmp_option_checked( 'on', $options, 'menu_close_on_link_click' ),
2888 + )
2889 + );
2457 2890
2458 - echo $ui_manager->accordion_divider();
2891 + $control_manager->add_switcher_control(
2892 + array(
2893 + 'label' => esc_html__( 'Page Scroll', 'responsive-menu' ),
2894 + 'id' => 'rmp-menu-close-on-page-scroll',
2895 + 'name' => 'menu_close_on_scroll',
2896 + 'feature_type' => 'pro',
2897 + 'is_checked' => '',
2898 + )
2899 + );
2459 2900
2460 - echo $control_manager->add_switcher_control( [
2461 - 'label' => __('Enable Touch Gestures','responsive-menu-pro'),
2462 - 'id' => 'rmp-menu-touch-gestures',
2463 - 'tool_tip' => [
2464 - 'text' => __('This will enable you to drag or swipe to close the container on touch devices.','responsive-menu-pro'),
2465 - ],
2466 - 'feature_type' => 'pro',
2467 - 'name' => 'enable_touch_gestures',
2468 - 'is_checked' => '',
2469 - ] );
2901 + $ui_manager->accordion_divider();
2470 2902
2471 - echo $ui_manager->accordion_divider();
2903 + $control_manager->add_switcher_control(
2904 + array(
2905 + 'label' => esc_html__( 'Enable Touch Gestures', 'responsive-menu' ),
2906 + 'id' => 'rmp-menu-touch-gestures',
2907 + 'tool_tip' => array(
2908 + 'text' => esc_html__( 'This will enable you to drag or swipe to close the container on touch devices.', 'responsive-menu' ),
2909 + ),
2910 + 'feature_type' => 'pro',
2911 + 'name' => 'enable_touch_gestures',
2912 + 'is_checked' => '',
2913 + )
2914 + );
2472 2915
2473 - echo $control_manager->add_sub_heading(
2474 - [
2475 - 'text' => __('Keyboard Controls','responsive-menu-pro'),
2476 - 'tool_tip' => [
2477 - 'text' => __( 'Select keystrokes to control the menu via keyboard.','responsive-menu-pro'),
2478 - ]
2479 - ]
2916 + $ui_manager->accordion_divider();
2917 +
2918 + $control_manager->add_sub_heading(
2919 + array(
2920 + 'text' => esc_html__( 'Keyboard Controls', 'responsive-menu' ),
2921 + 'tool_tip' => array(
2922 + 'text' => esc_html__( 'Select keystrokes to control the menu via keyboard.', 'responsive-menu' ),
2923 + ),
2924 + )
2480 2925 );
2481 2926
2482 - $keys = rmp_get_menu_open_close_keys();
2927 + $keys = rmp_get_menu_open_close_keys();
2483 2928
2484 - echo $control_manager->add_select_control( [
2485 - 'label' => __('Hide Menu','responsive-menu-pro'),
2486 - 'id' => 'rmp-keyboard-shortcut-close-menu',
2487 - 'class' => 'rmp-keyboard-shortcut-close-menu',
2488 - 'group_classes' => 'full-size',
2489 - 'multiple' => true,
2490 - 'name' => 'keyboard_shortcut_open_menu[]',
2491 - 'options' => $keys,
2492 - 'value' => [ 0 => '27', 1 => 40 ],
2493 - 'feature_type' => 'pro'
2494 - ] );
2929 + $control_manager->add_select_control(
2930 + array(
2931 + 'label' => esc_html__( 'Hide Menu', 'responsive-menu' ),
2932 + 'id' => 'rmp-keyboard-shortcut-close-menu',
2933 + 'class' => 'rmp-keyboard-shortcut-close-menu',
2934 + 'group_classes' => 'full-size',
2935 + 'multiple' => true,
2936 + 'name' => 'keyboard_shortcut_open_menu[]',
2937 + 'options' => $keys,
2938 + 'value' => array(
2939 + 0 => '27',
2940 + 1 => 40,
2941 + ),
2942 + 'feature_type' => 'pro',
2943 + )
2944 + );
2495 2945
2496 - echo $control_manager->add_select_control( [
2497 - 'label' => __('Show Menu ','responsive-menu-pro'),
2498 - 'id' => 'rmp-keyboard-shortcut-open-menu',
2499 - 'class' => 'rmp-keyboard-shortcut-open-menu',
2500 - 'group_classes' => 'full-size',
2501 - 'multiple' => true,
2502 - 'name' => 'keyboard_shortcut_open_menu[]',
2503 - 'value' => [ 0 => '13', 1 => 38 ],
2504 - 'options' => $keys,
2505 - 'feature_type' => 'pro',
2506 - ] );
2946 + $control_manager->add_select_control(
2947 + array(
2948 + 'label' => esc_html__( 'Show Menu ', 'responsive-menu' ),
2949 + 'id' => 'rmp-keyboard-shortcut-open-menu',
2950 + 'class' => 'rmp-keyboard-shortcut-open-menu',
2951 + 'group_classes' => 'full-size',
2952 + 'multiple' => true,
2953 + 'name' => 'keyboard_shortcut_open_menu[]',
2954 + 'value' => array(
2955 + 0 => '13',
2956 + 1 => 38,
2957 + ),
2958 + 'options' => $keys,
2959 + 'feature_type' => 'pro',
2960 + )
2961 + );
2507 2962
2508 - echo $ui_manager->end_accordion_item();
2509 - ?>
2963 + $ui_manager->end_accordion_item();
2964 + ?>
2510 2965 </ul>
2511 2966 </div>
2512 2967 </div>
2513 2968 <?php
2514 2969 // RMP Customize-Footer
2515 - echo $editor->footer_section();
2970 + $editor->footer_section();
2516 2971 ?>
2517 2972 </form>
2518 2973
2519 2974 <main id="rmp-editor-preview" class="rmp-editor-preview-main">
@@ -2518,18 +2973,18 @@
2518 2973
2519 2974 <main id="rmp-editor-preview" class="rmp-editor-preview-main">
2520 2975 <div id="rmp-preview-wrapper" class="rmp-preview-wrapper">
2521 2976 <div id="rmp-preview-iframe-loader">
2522 - <img src="https://demo.responsive.menu/wp-content/themes/demo-main/static/imgs/giphy.webp" alt="loading" />
2977 + <img src="<?php echo esc_url( RMP_PLUGIN_URL_V4 . '/assets/images/giphy.webp' ); ?>" alt="loading" />
2523 2978 </div>
2524 - <iframe id="rmp-preview-iframe" src="<?php echo esc_url( get_site_url() ); ?>"></iframe>
2979 + <iframe id="rmp-preview-iframe" src="<?php echo esc_url( get_site_url() . '?rmp_preview_mode=true' ); ?>"></iframe>
2525 2980 </div>
2526 2981 </main>
2527 2982
2528 - <?php echo $editor->sidebar_drawer(); ?>
2983 + <?php $editor->sidebar_drawer(); ?>
2529 2984 </div>
2530 2985 <?php
2531 - include_once RMP_PLUGIN_PATH_V4 . '/templates/rmp-wizards.php';
2986 + require_once RMP_PLUGIN_PATH_V4 . '/templates/rmp-wizards.php';
2532 2987 do_action( 'admin_print_footer_scripts' );
2533 2988 ?>
2534 2989
2535 2990 <div id="rmp-required-footer">
@@ -2534,6 +2989,13 @@
2534 2989
2535 2990 <div id="rmp-required-footer">
2536 2991 <?php wp_footer(); ?>
2537 2992 </div>
2993 +
2994 + <!-- Page loader -->
2995 + <div class="rmp-page-loader">
2996 + <img class="rmp-loader-image large" src="<?php echo esc_url( RMP_PLUGIN_URL_V4 . '/assets/images/rmp-logo.png' ); ?>"/>
2997 + <h3 class="rmp-loader-message"><?php esc_html_e( 'Just a moment, the theme is applying...', 'responsive-menu' ); ?> </h3>
2998 + </div>
2999 +
2538 3000 </body>
2539 3001 </html>