| 1 |
<?php |
| 2 |
/** |
| 3 |
* This is menu editor page where we can customize the menu with |
| 4 |
* all dynamic option and also the preview. |
| 5 |
* |
| 6 |
* @since 4.0.0 |
| 7 |
* |
| 8 |
* @package responsive_menu_pro |
| 9 |
*/ |
| 10 |
|
| 11 |
if ( ! defined( 'ABSPATH' ) ) { |
| 12 |
exit; |
| 13 |
} |
| 14 |
|
| 15 |
if ( empty( $_GET['editor'] ) && 'rmp_menu' == $_GET['editor'] ) { |
| 16 |
exit; |
| 17 |
} |
| 18 |
|
| 19 |
global $wp_version; |
| 20 |
use RMP\Features\Inc\Option_Manager; |
| 21 |
use RMP\Features\Inc\Control_Manager; |
| 22 |
use RMP\Features\Inc\UI_Manager; |
| 23 |
use RMP\Features\Inc\Theme_Manager; |
| 24 |
use RMP\Features\Inc\Editor; |
| 25 |
|
| 26 |
$body_classes = array( |
| 27 |
'rmp-editor-active', |
| 28 |
'wp-version-' . str_replace( '.', '-', $wp_version ), |
| 29 |
'rmp-version-' . str_replace( '.', '-', RMP_PLUGIN_VERSION ), |
| 30 |
); |
| 31 |
|
| 32 |
$body_classes = array_merge( get_body_class(), $body_classes ); |
| 33 |
if ( is_rtl() ) { |
| 34 |
$body_classes[] = 'rtl'; |
| 35 |
} |
| 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 |
|
| 43 |
$option_manager = Option_Manager::get_instance(); |
| 44 |
$control_manager = Control_Manager::get_instance(); |
| 45 |
$ui_manager = UI_Manager::get_instance(); |
| 46 |
$theme_manager = Theme_Manager::get_instance(); |
| 47 |
$editor = Editor::get_instance(); |
| 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(); |
| 57 |
?> |
| 58 |
<!DOCTYPE html> |
| 59 |
<html <?php language_attributes(); ?>> |
| 60 |
<head> |
| 61 |
<meta charset="utf-8" /> |
| 62 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 63 |
<title><?php echo esc_html__( 'rmp-menu-editor', 'responsive-menu' ) . ' | ' . esc_html( get_the_title() ); ?></title> |
| 64 |
</head> |
| 65 |
<body class="wp-admin wp-core-ui js post-php post-type-rmp_menu <?php echo esc_attr( implode( ' ', $body_classes ) ); ?>"> |
| 66 |
<div id="rmp-editor-wrapper" class="rmp-editor-overlay expanded rmp-preview-mobile"> |
| 67 |
<form method="post" enctype="multipart/form-data" id="rmp-editor-form" class="rmp-editor-sidebar"> |
| 68 |
<input type="hidden" name="rmp_device_mode" id="rmp_device_mode" value="mobile"/> |
| 69 |
<input type="hidden" id="menu_id" name="menu_id" value="<?php echo esc_attr( get_the_ID() ); ?>"/> |
| 70 |
<?php |
| 71 |
$editor->header_section( $options['menu_name'] ); |
| 72 |
?> |
| 73 |
|
| 74 |
<div id="rmp-editor-main"> |
| 75 |
<div id="rmp-editor-nav" class="rmp-editor-controls-nav" role="navigation" aria-label="<?php echo esc_attr( $options['menu_name'] ); ?>"> |
| 76 |
<ul id="rmp-editor-pane" class="rmp-editor-pane-parent"> |
| 77 |
<li id="rmp-tab-item-mobile-menu" class="rmp-tab-item" aria-owns="tab-mobile-menu"> |
| 78 |
<span class="rmp-tab-item-icon"> |
| 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 |
?> |
| 85 |
</span> |
| 86 |
<h3 class="rmp-tab-item-title"><?php esc_html_e( 'Mobile Menu', 'responsive-menu' ); ?></h3> |
| 87 |
</li> |
| 88 |
|
| 89 |
<li id="rmp-tab-item-desktop-menu" class="rmp-tab-item" aria-owns="tab-desktop-menu"> |
| 90 |
<span class="rmp-tab-item-icon"> |
| 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 |
?> |
| 97 |
</span> |
| 98 |
<h3 class="rmp-tab-item-title"> |
| 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> |
| 101 |
</h3> |
| 102 |
</li> |
| 103 |
|
| 104 |
<li id="rmp-tab-item-dropdowns" class="rmp-tab-item" aria-owns="tab-menu-styling"> |
| 105 |
<span class="rmp-tab-item-icon"> |
| 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 |
?> |
| 112 |
</span> |
| 113 |
<h3 class="rmp-tab-item-title"><?php esc_html_e( 'Menu Styling', 'responsive-menu' ); ?></h3> |
| 114 |
</li> |
| 115 |
|
| 116 |
<li id="rmp-tab-item-header-bar" class="rmp-tab-item" aria-owns="tab-header-bar"> |
| 117 |
<span class="rmp-tab-item-icon"> |
| 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 |
?> |
| 124 |
</span> |
| 125 |
<h3 class="rmp-tab-item-title"> |
| 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> |
| 128 |
</h3> |
| 129 |
</li> |
| 130 |
|
| 131 |
<li id="rmp-tab-item-themes" class="rmp-tab-item" aria-owns="tab-themes"> |
| 132 |
<span class="rmp-tab-item-icon"> |
| 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 |
?> |
| 139 |
</span> |
| 140 |
<h3 class="rmp-tab-item-title"><?php esc_html_e( 'Themes', 'responsive-menu' ); ?></h3> |
| 141 |
</li> |
| 142 |
|
| 143 |
<li id="rmp-tab-item-settings" class="rmp-tab-item" aria-owns="tab-settings"> |
| 144 |
<span class="rmp-tab-item-icon"> |
| 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 |
?> |
| 151 |
</span> |
| 152 |
<h3 class="rmp-tab-item-title"><?php esc_html_e( 'Settings', 'responsive-menu' ); ?></h3> |
| 153 |
</li> |
| 154 |
</ul> |
| 155 |
</div> |
| 156 |
|
| 157 |
<div id="tab-themes" class="rmp-accordions" aria-label="Themes"> |
| 158 |
<ul class="rmp-accordion-container" id="rmp-theme-items"> |
| 159 |
<?php |
| 160 |
$ui_manager->start_accordion_item( |
| 161 |
array( |
| 162 |
'item_header' => array( |
| 163 |
'item_title' => esc_html__( 'Theme Details', 'responsive-menu' ), |
| 164 |
), |
| 165 |
) |
| 166 |
); |
| 167 |
|
| 168 |
$theme_name = 'Default'; |
| 169 |
if ( ! empty( $options['menu_theme'] ) ) { |
| 170 |
$theme_name = $options['menu_theme']; |
| 171 |
} |
| 172 |
|
| 173 |
$control_manager->add_hidden_control( |
| 174 |
array( |
| 175 |
'value' => $theme_name, |
| 176 |
'name' => 'menu[menu_theme]', |
| 177 |
) |
| 178 |
); |
| 179 |
|
| 180 |
$theme_type = 'default'; |
| 181 |
if ( ! empty( $options['theme_type'] ) ) { |
| 182 |
$theme_type = $options['theme_type']; |
| 183 |
} |
| 184 |
|
| 185 |
$control_manager->add_hidden_control( |
| 186 |
array( |
| 187 |
'value' => $theme_type, |
| 188 |
'name' => 'menu[theme_type]', |
| 189 |
) |
| 190 |
); |
| 191 |
|
| 192 |
$control_manager->add_sub_heading( |
| 193 |
array( 'text' => 'Theme Name - ' . $theme_name ) |
| 194 |
); |
| 195 |
|
| 196 |
$theme_manager->get_theme_thumbnail( $theme_name, $theme_type ); |
| 197 |
|
| 198 |
|
| 199 |
$control_manager->add_button_control( |
| 200 |
array( |
| 201 |
'label' => esc_html__( 'Change Theme', 'responsive-menu' ), |
| 202 |
'id' => 'rmp-change-theme-action', |
| 203 |
'group_classes' => 'full-size', |
| 204 |
'class' => 'rmp-theme-change-button', |
| 205 |
) |
| 206 |
); |
| 207 |
$ui_manager->accordion_divider(); |
| 208 |
|
| 209 |
$control_manager->add_button_control( |
| 210 |
array( |
| 211 |
'label' => esc_html__( 'Save As Theme', 'responsive-menu' ), |
| 212 |
'id' => 'rmp-theme-save-action', |
| 213 |
'group_classes' => 'full-size', |
| 214 |
'class' => 'rmp-theme-save-button', |
| 215 |
) |
| 216 |
); |
| 217 |
|
| 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 |
?> |
| 232 |
</ul> |
| 233 |
</div> |
| 234 |
|
| 235 |
<div id="tab-header-bar" class="rmp-accordions" aria-label="Header Bar"> |
| 236 |
<?php |
| 237 |
$control_manager->upgrade_notice(); |
| 238 |
?> |
| 239 |
</div> |
| 240 |
|
| 241 |
<div id="tab-advanced-settings" class="rmp-accordions" aria-label="Advanced"> |
| 242 |
<ul class="rmp-accordion-container"> |
| 243 |
<?php |
| 244 |
|
| 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 |
); |
| 253 |
|
| 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(); |
| 270 |
|
| 271 |
$ui_manager->start_accordion_item( |
| 272 |
array( |
| 273 |
'item_header' => array( |
| 274 |
'item_title' => esc_html__( 'Animation Speeds', 'responsive-menu' ), |
| 275 |
), |
| 276 |
) |
| 277 |
); |
| 278 |
|
| 279 |
$ui_manager->start_group_controls(); |
| 280 |
|
| 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' ), |
| 288 |
|
| 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 |
); |
| 297 |
|
| 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' ), |
| 305 |
|
| 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 |
); |
| 314 |
|
| 315 |
$ui_manager->end_group_controls(); |
| 316 |
|
| 317 |
|
| 318 |
$ui_manager->end_accordion_item(); |
| 319 |
|
| 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 |
?> |
| 408 |
</ul> |
| 409 |
</div> |
| 410 |
|
| 411 |
<div id="tab-desktop-menu" class="rmp-accordions" aria-label="Desktop Menu"> |
| 412 |
<?php |
| 413 |
$control_manager->upgrade_notice(); |
| 414 |
?> |
| 415 |
</div> |
| 416 |
|
| 417 |
<div id="tab-mobile-menu" class="rmp-accordions" aria-label="Mobile Menu"> |
| 418 |
<ul class="rmp-editor-pane-parent"> |
| 419 |
<?php |
| 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 |
); |
| 430 |
|
| 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 |
?> |
| 442 |
</ul> |
| 443 |
</div> |
| 444 |
|
| 445 |
<div id="tab-settings" class="rmp-accordions" aria-label="Settings"> |
| 446 |
<ul class="rmp-editor-pane-parent"> |
| 447 |
<?php |
| 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 |
); |
| 458 |
|
| 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 |
); |
| 469 |
|
| 470 |
?> |
| 471 |
</ul> |
| 472 |
</div> |
| 473 |
|
| 474 |
<div id="tab-general-settings" class="rmp-accordions" aria-label="General Settings"> |
| 475 |
<ul class="rmp-accordion-container"> |
| 476 |
<?php |
| 477 |
|
| 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 |
); |
| 486 |
|
| 487 |
$ui_manager->start_group_controls(); |
| 488 |
|
| 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 |
) |
| 497 |
); |
| 498 |
|
| 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; |
| 508 |
} |
| 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(); |
| 522 |
|
| 523 |
$ui_manager->accordion_divider(); |
| 524 |
|
| 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 |
); |
| 536 |
|
| 537 |
$ui_manager->accordion_divider(); |
| 538 |
$control_manager->add_device_visibility_control( $options ); |
| 539 |
|
| 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 |
); |
| 555 |
|
| 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 |
); |
| 570 |
|
| 571 |
$ui_manager->end_accordion_item(); |
| 572 |
?> |
| 573 |
</ul> |
| 574 |
</div> |
| 575 |
|
| 576 |
<div id="tab-menu-styling" class="rmp-accordions" aria-label="Menu Styling"> |
| 577 |
<ul class="rmp-accordion-container"> |
| 578 |
<?php |
| 579 |
|
| 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 |
) |
| 614 |
); |
| 615 |
|
| 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 |
) |
| 633 |
); |
| 634 |
|
| 635 |
$ui_manager->end_group_controls(); |
| 636 |
|
| 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 |
) |
| 646 |
); |
| 647 |
|
| 648 |
$ui_manager->end_accordion_item(); |
| 649 |
|
| 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(); |
| 663 |
|
| 664 |
$ui_manager->start_accordion_item( |
| 665 |
array( |
| 666 |
'item_header' => array( |
| 667 |
'item_title' => esc_html__( 'Item Styling', 'responsive-menu' ), |
| 668 |
), |
| 669 |
) |
| 670 |
); |
| 671 |
|
| 672 |
$ui_manager->start_tabs_controls_panel( |
| 673 |
array( |
| 674 |
'tab_classes' => 'rmp-tab-content', |
| 675 |
'tab_items' => |
| 676 |
array( |
| 677 |
0 => array( |
| 678 |
'item_class' => 'nav-tab-active', |
| 679 |
'item_target' => 'top-level-item-styling', |
| 680 |
'item_text' => esc_html__( 'Top Level', 'responsive-menu' ), |
| 681 |
), |
| 682 |
1 => array( |
| 683 |
'item_class' => '', |
| 684 |
'item_target' => 'sub-level-item-styling', |
| 685 |
'item_text' => esc_html__( 'Sub Menu', 'responsive-menu' ), |
| 686 |
), |
| 687 |
), |
| 688 |
) |
| 689 |
); |
| 690 |
|
| 691 |
$ui_manager->start_tab_item( |
| 692 |
array( |
| 693 |
'item_id' => 'top-level-item-styling', |
| 694 |
'item_class' => 'title-contents', |
| 695 |
) |
| 696 |
); |
| 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' ), |
| 803 |
'multi_device' => true, |
| 804 |
) |
| 805 |
); |
| 806 |
|
| 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' ), |
| 876 |
'multi_device' => true, |
| 877 |
) |
| 878 |
); |
| 879 |
|
| 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' ), |
| 886 |
|
| 887 |
'multi_device' => true, |
| 888 |
) |
| 889 |
); |
| 890 |
|
| 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 |
|
| 928 |
'multi_device' => true, |
| 929 |
|
| 930 |
) |
| 931 |
); |
| 932 |
|
| 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' ), |
| 939 |
|
| 940 |
'multi_device' => true, |
| 941 |
) |
| 942 |
); |
| 943 |
|
| 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' ), |
| 950 |
|
| 951 |
) |
| 952 |
); |
| 953 |
|
| 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' ), |
| 960 |
|
| 961 |
) |
| 962 |
); |
| 963 |
$ui_manager->end_accordion_item(); |
| 964 |
|
| 965 |
$ui_manager->start_accordion_item( |
| 966 |
array( |
| 967 |
'item_header' => array( |
| 968 |
'item_title' => esc_html__( 'Border', 'responsive-menu' ), |
| 969 |
), |
| 970 |
) |
| 971 |
); |
| 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 |
); |
| 994 |
|
| 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' ), |
| 1002 |
|
| 1003 |
) |
| 1004 |
); |
| 1005 |
|
| 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' ), |
| 1012 |
|
| 1013 |
) |
| 1014 |
); |
| 1015 |
$ui_manager->end_group_controls(); |
| 1016 |
|
| 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' ), |
| 1024 |
|
| 1025 |
) |
| 1026 |
); |
| 1027 |
|
| 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' ), |
| 1037 |
|
| 1038 |
) |
| 1039 |
); |
| 1040 |
$ui_manager->end_group_controls(); |
| 1041 |
|
| 1042 |
$ui_manager->end_accordion_item(); |
| 1043 |
|
| 1044 |
$ui_manager->end_sub_accordion(); |
| 1045 |
$ui_manager->end_tab_item(); |
| 1046 |
|
| 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 |
); |
| 1074 |
|
| 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 |
); |
| 1096 |
|
| 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 |
); |
| 1120 |
|
| 1121 |
|
| 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' ), |
| 1130 |
|
| 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 |
); |
| 1141 |
|
| 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' ), |
| 1149 |
|
| 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 |
); |
| 1160 |
|
| 1161 |
$ui_manager->end_group_controls(); |
| 1162 |
|
| 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' ), |
| 1171 |
|
| 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 |
); |
| 1182 |
|
| 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' ), |
| 1190 |
|
| 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(); |
| 1202 |
|
| 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' ), |
| 1217 |
'multi_device' => true, |
| 1218 |
) |
| 1219 |
); |
| 1220 |
|
| 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' ), |
| 1227 |
|
| 1228 |
'multi_device' => true, |
| 1229 |
) |
| 1230 |
); |
| 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' ), |
| 1239 |
|
| 1240 |
) |
| 1241 |
); |
| 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' ), |
| 1249 |
|
| 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 |
); |
| 1282 |
|
| 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' ), |
| 1290 |
|
| 1291 |
) |
| 1292 |
); |
| 1293 |
|
| 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' ), |
| 1300 |
|
| 1301 |
) |
| 1302 |
); |
| 1303 |
$ui_manager->end_group_controls(); |
| 1304 |
|
| 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 |
); |
| 1314 |
|
| 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' ), |
| 1324 |
|
| 1325 |
) |
| 1326 |
); |
| 1327 |
$ui_manager->end_group_controls(); |
| 1328 |
|
| 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 |
); |
| 1357 |
|
| 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 |
); |
| 1369 |
|
| 1370 |
$ui_manager->start_group_controls(); |
| 1371 |
|
| 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 |
); |
| 1382 |
|
| 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 |
); |
| 1396 |
|
| 1397 |
$ui_manager->end_group_controls(); |
| 1398 |
|
| 1399 |
|
| 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 |
); |
| 1409 |
|
| 1410 |
|
| 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, |
| 1426 |
|
| 1427 |
) |
| 1428 |
); |
| 1429 |
|
| 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 |
); |
| 1439 |
|
| 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 |
); |
| 1449 |
|
| 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(); |
| 1459 |
|
| 1460 |
$ui_manager->end_accordion_item(); |
| 1461 |
$ui_manager->end_sub_accordion(); |
| 1462 |
|
| 1463 |
$ui_manager->end_tab_item(); |
| 1464 |
|
| 1465 |
$ui_manager->end_tabs_controls_panel(); |
| 1466 |
|
| 1467 |
$ui_manager->end_accordion_item(); |
| 1468 |
|
| 1469 |
|
| 1470 |
$ui_manager->start_accordion_item( |
| 1471 |
array( |
| 1472 |
'item_header' => array( |
| 1473 |
'item_title' => esc_html__( 'Trigger Icon', 'responsive-menu' ), |
| 1474 |
), |
| 1475 |
) |
| 1476 |
); |
| 1477 |
|
| 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 |
); |
| 1501 |
|
| 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 |
); |
| 1519 |
|
| 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(); |
| 1532 |
|
| 1533 |
$ui_manager->start_tab_item( |
| 1534 |
array( |
| 1535 |
'item_id' => 'menu-item-arrow-icon', |
| 1536 |
'item_class' => 'title-contents', |
| 1537 |
) |
| 1538 |
); |
| 1539 |
|
| 1540 |
|
| 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' ), |
| 1551 |
|
| 1552 |
) |
| 1553 |
); |
| 1554 |
|
| 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' ), |
| 1564 |
|
| 1565 |
) |
| 1566 |
); |
| 1567 |
|
| 1568 |
$ui_manager->end_tab_item(); |
| 1569 |
|
| 1570 |
|
| 1571 |
$ui_manager->start_tab_item( |
| 1572 |
array( |
| 1573 |
'item_id' => 'menu-item-arrow-image', |
| 1574 |
'item_class' => 'title-style', |
| 1575 |
) |
| 1576 |
); |
| 1577 |
|
| 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' ), |
| 1587 |
|
| 1588 |
) |
| 1589 |
); |
| 1590 |
|
| 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' ), |
| 1600 |
|
| 1601 |
) |
| 1602 |
); |
| 1603 |
$ui_manager->end_tab_item(); |
| 1604 |
|
| 1605 |
$ui_manager->end_tabs_controls_panel(); |
| 1606 |
|
| 1607 |
$ui_manager->accordion_divider(); |
| 1608 |
|
| 1609 |
$ui_manager->start_group_controls(); |
| 1610 |
|
| 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 |
); |
| 1632 |
|
| 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 |
); |
| 1654 |
|
| 1655 |
$ui_manager->end_group_controls(); |
| 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 |
); |
| 1670 |
|
| 1671 |
$ui_manager->start_sub_accordion(); |
| 1672 |
|
| 1673 |
$ui_manager->start_accordion_item( |
| 1674 |
array( |
| 1675 |
'item_header' => array( |
| 1676 |
'item_title' => esc_html__( 'Text Color', 'responsive-menu' ), |
| 1677 |
), |
| 1678 |
) |
| 1679 |
); |
| 1680 |
|
| 1681 |
$ui_manager->start_group_controls(); |
| 1682 |
|
| 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' ), |
| 1689 |
|
| 1690 |
) |
| 1691 |
); |
| 1692 |
|
| 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' ), |
| 1699 |
|
| 1700 |
) |
| 1701 |
); |
| 1702 |
|
| 1703 |
$ui_manager->end_group_controls(); |
| 1704 |
|
| 1705 |
$ui_manager->start_group_controls(); |
| 1706 |
|
| 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 |
?> |
| 1945 |
</ul> |
| 1946 |
</div> |
| 1947 |
|
| 1948 |
<div id="tab-toggle-button" class="rmp-accordions" aria-label="Toggle Button"> |
| 1949 |
<ul class="rmp-accordion-container"> |
| 1950 |
<?php |
| 1951 |
// Toggle Box |
| 1952 |
|
| 1953 |
$ui_manager->start_accordion_item( |
| 1954 |
array( |
| 1955 |
'item_header' => array( |
| 1956 |
'item_title' => esc_html__( 'Button Style', 'responsive-menu' ), |
| 1957 |
), |
| 1958 |
) |
| 1959 |
); |
| 1960 |
|
| 1961 |
$ui_manager->start_group_controls(); |
| 1962 |
|
| 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' ), |
| 1971 |
|
| 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 |
); |
| 1982 |
|
| 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' ), |
| 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 |
); |
| 2002 |
|
| 2003 |
$ui_manager->end_group_controls(); |
| 2004 |
|
| 2005 |
$ui_manager->accordion_divider(); |
| 2006 |
|
| 2007 |
|
| 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' ), |
| 2018 |
|
| 2019 |
) |
| 2020 |
); |
| 2021 |
|
| 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' ), |
| 2028 |
|
| 2029 |
) |
| 2030 |
); |
| 2031 |
|
| 2032 |
$ui_manager->end_group_controls(); |
| 2033 |
|
| 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 |
); |
| 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(); |
| 2058 |
|
| 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' ), |
| 2069 |
|
| 2070 |
) |
| 2071 |
); |
| 2072 |
|
| 2073 |
$ui_manager->end_accordion_item(); |
| 2074 |
|
| 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 |
); |
| 2083 |
|
| 2084 |
$ui_manager->start_group_controls(); |
| 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 |
); |
| 2102 |
|
| 2103 |
|
| 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(); |
| 2123 |
|
| 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', |
| 2216 |
'tab_items' => |
| 2217 |
array( |
| 2218 |
0 => array( |
| 2219 |
'item_class' => 'nav-tab-active', |
| 2220 |
'item_target' => 'hamburger-type-line', |
| 2221 |
'item_text' => esc_html__( 'Hamburger', 'responsive-menu' ), |
| 2222 |
), |
| 2223 |
1 => array( |
| 2224 |
'item_class' => '', |
| 2225 |
'item_target' => 'hamburger-type-icon', |
| 2226 |
'item_text' => esc_html__( 'Icon', 'responsive-menu' ), |
| 2227 |
), |
| 2228 |
2 => array( |
| 2229 |
'item_class' => '', |
| 2230 |
'item_target' => 'hamburger-type-image', |
| 2231 |
'item_text' => esc_html__( 'Image', 'responsive-menu' ), |
| 2232 |
), |
| 2233 |
), |
| 2234 |
) |
| 2235 |
); |
| 2236 |
|
| 2237 |
$ui_manager->start_tab_item( |
| 2238 |
array( |
| 2239 |
'item_id' => 'hamburger-type-line', |
| 2240 |
'item_class' => 'title-contents', |
| 2241 |
) |
| 2242 |
); |
| 2243 |
|
| 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 |
); |
| 2255 |
|
| 2256 |
|
| 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' ), |
| 2264 |
|
| 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(); |
| 2279 |
|
| 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 |
); |
| 2302 |
|
| 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' ), |
| 2311 |
|
| 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 |
); |
| 2325 |
|
| 2326 |
$ui_manager->end_group_controls(); |
| 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' ), |
| 2335 |
|
| 2336 |
) |
| 2337 |
); |
| 2338 |
|
| 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' ), |
| 2345 |
|
| 2346 |
) |
| 2347 |
); |
| 2348 |
$ui_manager->end_group_controls(); |
| 2349 |
|
| 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( |
| 2366 |
'item_id' => 'hamburger-type-icon', |
| 2367 |
'item_class' => 'title-contents', |
| 2368 |
) |
| 2369 |
); |
| 2370 |
|
| 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' ), |
| 2384 |
|
| 2385 |
) |
| 2386 |
); |
| 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 |
); |
| 2399 |
|
| 2400 |
|
| 2401 |
$ui_manager->end_tab_item(); |
| 2402 |
|
| 2403 |
$ui_manager->start_tab_item( |
| 2404 |
array( |
| 2405 |
'item_id' => 'hamburger-type-image', |
| 2406 |
'item_class' => 'title-contents', |
| 2407 |
) |
| 2408 |
); |
| 2409 |
|
| 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 |
); |
| 2424 |
|
| 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 |
); |
| 2436 |
|
| 2437 |
$ui_manager->end_tab_item(); |
| 2438 |
|
| 2439 |
$ui_manager->end_accordion_item(); |
| 2440 |
|
| 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 |
); |
| 2449 |
|
| 2450 |
$ui_manager->start_group_controls(); |
| 2451 |
|
| 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 |
); |
| 2466 |
|
| 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' ), |
| 2476 |
|
| 2477 |
) |
| 2478 |
); |
| 2479 |
|
| 2480 |
$ui_manager->end_group_controls(); |
| 2481 |
|
| 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 |
); |
| 2499 |
|
| 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(); |
| 2512 |
|
| 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 |
); |
| 2533 |
|
| 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' ), |
| 2542 |
|
| 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 |
); |
| 2553 |
|
| 2554 |
$ui_manager->end_group_controls(); |
| 2555 |
|
| 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' ), |
| 2562 |
|
| 2563 |
) |
| 2564 |
); |
| 2565 |
|
| 2566 |
$ui_manager->end_accordion_item(); |
| 2567 |
|
| 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 |
); |
| 2577 |
|
| 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 |
); |
| 2588 |
|
| 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 |
?> |
| 2616 |
</ul> |
| 2617 |
</div> |
| 2618 |
|
| 2619 |
<div id="tab-container" class="rmp-accordions" aria-label="Container"> |
| 2620 |
<div class="rmp-order-item rmp-order-item-description rmp-ignore-accordion"> |
| 2621 |
<?php echo esc_html__( 'Drag the container items up and down to re-order their appearance on the front end.', 'responsive-menu' ); ?> |
| 2622 |
</div> |
| 2623 |
<ul class="rmp-accordion-container" id="rmp-menu-ordering-items"> |
| 2624 |
|
| 2625 |
<?php |
| 2626 |
|
| 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'; |
| 2639 |
} |
| 2640 |
} |
| 2641 |
} |
| 2642 |
|
| 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 |
); |
| 2651 |
|
| 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 |
); |
| 2674 |
|
| 2675 |
$ui_manager->start_group_controls(); |
| 2676 |
|
| 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 |
); |
| 2696 |
|
| 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 |
); |
| 2716 |
|
| 2717 |
$ui_manager->end_group_controls(); |
| 2718 |
|
| 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 |
); |
| 2732 |
|
| 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 |
); |
| 2743 |
|
| 2744 |
$ui_manager->accordion_divider(); |
| 2745 |
|
| 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 |
); |
| 2754 |
|
| 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 |
); |
| 2762 |
|
| 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 |
); |
| 2771 |
|
| 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 |
) |
| 2783 |
); |
| 2784 |
|
| 2785 |
$ui_manager->accordion_divider(); |
| 2786 |
|
| 2787 |
$control_manager->add_sub_heading( |
| 2788 |
array( 'text' => esc_html__( 'Animation', 'responsive-menu' ) ) |
| 2789 |
); |
| 2790 |
|
| 2791 |
$ui_manager->start_group_controls(); |
| 2792 |
|
| 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 |
); |
| 2806 |
|
| 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 |
); |
| 2824 |
|
| 2825 |
$ui_manager->end_group_controls(); |
| 2826 |
|
| 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 |
); |
| 2842 |
|
| 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 |
); |
| 2857 |
|
| 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 |
) |
| 2867 |
); |
| 2868 |
|
| 2869 |
$control_manager->add_sub_heading( |
| 2870 |
array( 'text' => esc_html__( 'Hide Menu On', 'responsive-menu' ) ) |
| 2871 |
); |
| 2872 |
|
| 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 |
); |
| 2881 |
|
| 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 |
); |
| 2890 |
|
| 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 |
); |
| 2900 |
|
| 2901 |
$ui_manager->accordion_divider(); |
| 2902 |
|
| 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 |
); |
| 2915 |
|
| 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 |
) |
| 2925 |
); |
| 2926 |
|
| 2927 |
$keys = rmp_get_menu_open_close_keys(); |
| 2928 |
|
| 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 |
); |
| 2945 |
|
| 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 |
); |
| 2962 |
|
| 2963 |
$ui_manager->end_accordion_item(); |
| 2964 |
?> |
| 2965 |
</ul> |
| 2966 |
</div> |
| 2967 |
</div> |
| 2968 |
<?php |
| 2969 |
// RMP Customize-Footer |
| 2970 |
$editor->footer_section(); |
| 2971 |
?> |
| 2972 |
</form> |
| 2973 |
|
| 2974 |
<main id="rmp-editor-preview" class="rmp-editor-preview-main"> |
| 2975 |
<div id="rmp-preview-wrapper" class="rmp-preview-wrapper"> |
| 2976 |
<div id="rmp-preview-iframe-loader"> |
| 2977 |
<img src="<?php echo esc_url( RMP_PLUGIN_URL_V4 . '/assets/images/giphy.webp' ); ?>" alt="loading" /> |
| 2978 |
</div> |
| 2979 |
<iframe id="rmp-preview-iframe" src="<?php echo esc_url( get_site_url() . '?rmp_preview_mode=true' ); ?>"></iframe> |
| 2980 |
</div> |
| 2981 |
</main> |
| 2982 |
|
| 2983 |
<?php $editor->sidebar_drawer(); ?> |
| 2984 |
</div> |
| 2985 |
<?php |
| 2986 |
require_once RMP_PLUGIN_PATH_V4 . '/templates/rmp-wizards.php'; |
| 2987 |
do_action( 'admin_print_footer_scripts' ); |
| 2988 |
?> |
| 2989 |
|
| 2990 |
<div id="rmp-required-footer"> |
| 2991 |
<?php wp_footer(); ?> |
| 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 |
|
| 3000 |
</body> |
| 3001 |
</html> |
| 3002 |
|