PluginProbe
Booking Calendar / 11.7
Booking Calendar v11.7
11.9 11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 All 205 releases
booking / includes / ui_settings / parts / ui__nav_vert.php

ui__nav_vert.php in Booking Calendar 11.7, at includes/ui_settings/parts/ui__nav_vert.php

1,064 lines 42.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Admin Panel UI - Parts
4 *
5 * @version 1.2
6 * @package Any
7 * @category Page Structure in Admin Panel
8 * @author wpdevelop
9 *
10 * @web-site https://wpbookingcalendar.com/
11 * @email [email protected]
12 *
13 * @modified 2025-02-15
14 */
15
16 if ( ! defined( 'ABSPATH' ) ) {
17 exit; // Exit, if accessed directly.
18 }
19
20 function wpbc_ui__get_root_menu_arr() {
21
22 $icn = '<i style="margin: 0;margin-left: auto;" class="wpbc_ui_el__vert_nav_icon menu_icon icon-1x wpbc-bi-chevron-right arrow-right-short"></i>';
23
24 $pages_arr = array(
25 'wpbc' => array(
26 'type' => 'menu',
27 'title' => __( 'Bookings', 'booking' ),
28 'font_icon' => 'wpbc-bi-collection',
29 ),
30 'wpbc-divider-1' => array(
31 'type' => 'divider',
32 ),
33 );
34
35 $pages_arr['wpbc-resources'] = array(
36 'type' => 'menu',
37 'title' => __( 'Resources', 'booking' ),
38 'font_icon' => 'wpbc-bi-list',
39 );
40
41
42 $pages_arr['wpbc-availability'] = array(
43 'type' => 'menu',
44 'title' => __( 'Availability', 'booking' ),
45 'font_icon' => 'wpbc-bi-calendar-week',
46 );
47
48 if ( class_exists('wpdev_bk_biz_m') ) {
49 $pages_arr['wpbc-prices'] = array(
50 'type' => 'menu',
51 'title' => __( 'Prices', 'booking' ),
52 'font_icon' => 'wpbc-bi-cash-stack',
53 );
54 }
55
56
57 $pages_arr['wpbc-divider-2'] = array(
58 'type' => 'divider',
59 );
60 $pages_arr['wpbc-settings'] = array(
61 'type' => 'menu',
62 'title' => __( 'Settings', 'booking' ),
63 'font_icon' => 'wpbc_icn_settings',
64 );
65
66 return $pages_arr;
67 }
68
69 /**
70 * Show Left Vaertical Navigation Bar
71 *
72 * @param array $args - parameters.
73 *
74 * @return void
75 */
76 function wpbc_ui__left_vertical_nav( $args =array() ) {
77
78 $defaults = array(
79 'attr' => array(),
80 );
81 $params = wp_parse_args( $args, $defaults );
82
83 // Ability to click on panel, only if there 'min' class - panel minimized!
84 echo '<div class="wpbc_ui_el__vert_left_bar__wrapper" onclick="javascript:if (( jQuery( this ).parent(\'.wpbc_settings_page_wrapper\').hasClass(\'min\') ) && ( ! wpbc_admin_ui__is_in_mobile_screen_size())) { wpbc_admin_ui__sidebar_left__do_max( true ); }" >';
85
86 // FixIn: 10.12.1.7.
87 wpbc_ui__vert_left_bar__side_button__do_compact();
88 wpbc_ui__vert_left_bar__side_button__do_max();
89
90 $active_page_arr = array(
91 'active_page' => $args['active_page'], // wpbc-settings.
92 'active_tab' => $args ['active_tab'], // calendar_appearance.
93 'active_subtab' => $args['active_subtab'], // calendar_appearance_skin.
94 );
95
96 // Available Main Menu - slug => titles.
97 $root_menu_arr = wpbc_ui__get_root_menu_arr();
98
99 if ( function_exists( 'wpbc_booking_modes_resolve_root_navigation' ) ) {
100 $root_menu_arr = wpbc_booking_modes_resolve_root_navigation( $root_menu_arr, $args['page_nav_tabs'] );
101 }
102
103 // A mode may display an existing controller route below a different presentation group.
104 foreach ( $args['page_nav_tabs'] as $presentation_page_slug => $presentation_tabs ) {
105 if ( ! is_array( $presentation_tabs ) ) {
106 continue;
107 }
108
109 foreach ( $presentation_tabs as $presentation_tab ) {
110 if ( is_array( $presentation_tab ) && ! empty( $presentation_tab['is_active'] ) ) {
111 $active_page_arr['active_page'] = $presentation_page_slug;
112 break 2;
113 }
114 }
115 }
116
117 echo ' <div class="wpbc_ui_el__vert_left_bar__content">';
118
119 $is_show_all_menus = true;
120
121 if ( ! $is_show_all_menus ) {
122 wpbc_ui__vert_left_bar__section__root_menu( $root_menu_arr );
123 } else {
124
125 // wpbc_ui_el__divider_horizontal();
126 echo '<div class="wpbc_ui_el__row100 wpbc_ui_el__expand_colapse_btns">';
127 wpbc_ui__vert_left_bar__do_min();
128 //wpbc_ui__vert_left_bar__do_compact();
129 //wpbc_ui__vert_left_bar__do_max();
130 echo '</div>';
131
132 echo ' <div class="wpbc_ui_el__vert_left_bar__root_sections_container" role="tablist">';
133 }
134
135 // Loop to show all main sections in vertical menu.
136 foreach ( $root_menu_arr as $main_page_slug => $root_menu_options_arr ) {
137
138 if ( 'menu' !== $root_menu_options_arr['type'] ) {
139 continue;
140 }
141
142 $page_title = $root_menu_options_arr['title'];
143 $is_expanded = ( $main_page_slug === $active_page_arr['active_page'] );
144
145 if ( $is_show_all_menus ) {
146 echo ' <div class="section_expanded wpbc_ui_el__vert_left_bar__root_section_element root_section_element_' . esc_attr( $main_page_slug ) . ' ' . ( ( $is_expanded ) ? 'section_expanded' : '' ) . '">';
147
148 $mode_font_icon = isset( $root_menu_options_arr['mode_font_icon'] ) ? $root_menu_options_arr['mode_font_icon'] : '';
149 wpbc_ui__vert_menu__show_root_section_header( $main_page_slug, $page_title, $mode_font_icon );
150 }
151
152 echo ' <div class="wpbc_ui_el__vert_left_bar__section wpbc_ui_el__vert_left_bar__section_' .
153 esc_attr( $main_page_slug ) .
154 ( ( ( $main_page_slug !== $active_page_arr['active_page'] ) && ( ! $is_show_all_menus ) ) ? ' wpbc_ui__hide ' : '' ) .
155 // ( ( ( ! $is_expanded ) && ( $is_show_all_menus ) ) ? ' wpbc_ui__hide ' : '' ) .
156 '">';
157
158 // Show only active page settings list.
159 if ( $main_page_slug !== $active_page_arr['active_page'] ) {
160 //continue;
161 }
162 $page_item_arr = $args['page_nav_tabs'][ $main_page_slug ];
163
164 if ( ! $is_show_all_menus ) {
165 // Section Header.
166 echo '<div class="wpbc_ui_el__row100 wpbc_ui_el__expand_colapse_btns">';
167
168 wpbc_ui__vert_menu__show_section_header_go_back( $page_title );
169 wpbc_ui__vert_left_bar__do_compact();
170 wpbc_ui__vert_left_bar__do_max();
171 echo '</div>';
172 wpbc_ui_el__divider_horizontal();
173 }
174
175 foreach ( $page_item_arr as $main_menu_slug => $menu_item_arr ) {
176 $folder_style = ( ! empty( $menu_item_arr['folder_style'] ) ) ? esc_attr( $menu_item_arr['folder_style'] ) : '';
177
178 $folder_css = '';
179 if ( ( ! empty( $menu_item_arr['subtabs'] ) ) && ( ! empty( $menu_item_arr['is_active'] ) ) ) {
180 $folder_css .= ' expanded';
181 }
182
183 echo '<div class="wpbc_ui_el__level__folder ' . esc_attr( $folder_css ) . '" style="' . esc_attr( $folder_style ) . '">';
184
185
186 if ( empty( $menu_item_arr['type'] ) ) {
187 $menu_item_arr['type'] = 'main';
188 }
189
190 switch ( $menu_item_arr['type'] ) {
191
192 case 'separator':
193 wpbc_ui_el__divider_horizontal();
194 break;
195
196 case 'html':
197 wpbc_ui__vert_menu__item_html( $main_menu_slug, $menu_item_arr );
198 break;
199
200 default:
201 wpbc_ui__vert_menu__item_main( $main_menu_slug, $menu_item_arr );
202 }
203
204
205 foreach ( $menu_item_arr['subtabs'] as $main_submenu_slug => $submenu_item_arr ) {
206
207 if ( empty( $submenu_item_arr['type'] ) ) {
208 $submenu_item_arr['type'] = 'subtab';
209 }
210
211 switch ( $submenu_item_arr['type'] ) {
212
213 case 'subtab':
214 wpbc_ui__vert_menu__item_sub( $main_submenu_slug, $submenu_item_arr );
215 break;
216
217 case 'separator':
218 wpbc_ui__vert_menu__item_separtor( $main_submenu_slug, $submenu_item_arr );
219 break;
220
221 case 'html':
222 wpbc_ui__vert_menu__item_html( $main_submenu_slug, $submenu_item_arr );
223 break;
224
225 default:
226 }
227 }
228 echo '</div><!-- wpbc_ui_el__level__folder -->';
229 }
230
231 if ( $is_show_all_menus ) {
232 echo ' </div><!-- wpbc_ui_el__vert_left_bar__root_section_element -->';
233 }
234 echo ' </div><!-- wpbc_ui_el__vert_left_bar__section -->';
235 } // Loop to show all main sections in vertical menu.
236
237
238 if ( $is_show_all_menus ) {
239 echo ' </div><!-- wpbc_ui_el__vert_left_bar__root_sections_container -->';
240 }
241
242
243 $is_show_up = wpbc_is_show_up();
244 // Show upgrade icon only for the Free version here.
245 $is_show_up = ( $is_show_up && ( ! class_exists( 'wpdev_bk_personal' ) ) );
246 if ( $is_show_up ) {
247 ?><div class="wpbc_ui_el__vert_left_bar__footer_compensator"></div><?php
248 }
249
250 echo ' </div><!-- wpbc_ui_el__vert_left_bar__content -->';
251 if ( $is_show_up ) {
252 $url = wpbc_up_link();
253 ?>
254 <div class="wpbc_ui_el__vert_left_bar__footer_section">
255 <a class="wpbc_ui_el_upgrade_button wpbc_button_light wpbc_button_green" href="<?php echo esc_url( $url ); ?>">
256 <span class="hide_in_compact_mode"><?php esc_html_e( 'Upgrade to Pro', 'booking' ); ?></span>
257 <span class="hide_in_max_mode"><?php esc_html_e( 'Pro', 'booking' ); ?></span>
258 </a>
259 </div>
260 <?php
261 }
262 echo '</div><!-- wpbc_ui_el__vert_left_bar__wrapper -->';
263
264 wpbc_start_element_scrollable__with_simplebar( '.wpbc_ui_el__vert_left_bar__content' );
265 }
266
267 /**
268 * Set Scrolable Element with Simplebar js library.
269 *
270 * @param string $jq_element - e.g. '.wpbc_ui_el__vert_left_bar__content'
271 * @param string $options - e.g. 'autoHide: false, scrollbarMinSize: 10' - options for the Simplebar. See more: https://www.npmjs.com/package/simplebar#1-documentation
272 *
273 * @return void
274 */
275 function wpbc_start_element_scrollable__with_simplebar( $jq_element, $options = 'autoHide: false' ) {
276
277 // FixIn: 10.12.2.3.
278
279 // Initial example: new SimpleBar( jQuery( '.wpbc_ui_el__vert_left_bar__content' )[0], { autoHide: false } );.
280 ?>
281 <script type="text/javascript">
282 (function() { var a = setInterval( function() { if ( ( 'undefined' === typeof jQuery ) || ! window.jQuery ) { return; } clearInterval( a ); jQuery( document ).ready( function () {
283 jQuery( '.wpbc_ui_el__vert_left_bar__section' ).css( { "animation-duration": "1ms" } ); // Set animation of showing left siebar from left to right imediate to prevent flipping.
284 if ( 'undefined' !== typeof SimpleBar ) {
285 var simplebar_element = jQuery( '<?php echo esc_attr( $jq_element ); ?>' )[0];
286 if ( simplebar_element ) {
287 var simplebar_instance = new SimpleBar( simplebar_element, { <?php echo esc_attr( $options ); ?> } );
288 if ( 'function' === typeof wpbc_admin_ui__sidebar_left__scroll_to_active_item ) {
289 wpbc_admin_ui__sidebar_left__scroll_to_active_item( simplebar_instance );
290 }
291 }
292 }
293 var wait_timer = setTimeout( function (){
294 jQuery( '.wpbc_ui_el__vert_left_bar__section' ).css( { "animation-duration": "200ms" } ); // Set animation to normal value.
295 }, 300 );
296 } ); }, 400 ); })();
297 </script>
298 <?php
299 }
300
301 /* == Toggles in Left menu ========================================================================================= */
302
303 /**
304 * Show element - "Open / Hide Left Vertical Navigation" panel
305 *
306 * @return void
307 */
308 function wpbc_ui__vert_left_bar__do_toggle() {
309
310 $el_arr = array();
311 $el_arr['font_icon'] = 'wpbc-bi-layout-sidebar-inset'; // 'wpbc_icn_menu';
312 $el_arr['container_style'] = 'padding:0 8px;';
313 $el_arr['container_class'] = 'wpbc_ui__top_nav__btn_show_left_vertical_nav';
314 $el_arr['onclick'] = "if ( jQuery( '.wpbc_page_wrapper_left_max' ).length ) {";
315 // $el_arr['onclick'] = "if ( jQuery( '.wpbc_ui_el__vert_left_bar__content' ).is( ':visible' ) ) {";
316 // $el_arr['onclick'] .= ' wpbc_admin_ui__sidebar_left__do_min( true ); ';
317 $el_arr['onclick'] .= ' wpbc_admin_ui__sidebar_left__do_compact( true ); ';
318 $el_arr['onclick'] .= '} else {';
319 $el_arr['onclick'] .= ' wpbc_admin_ui__sidebar_left__do_max( true ); ';
320 $el_arr['onclick'] .= '}';
321 $el_arr['hint'] = array(
322 'title' => __( 'Toggle side menu', 'booking' ),
323 'position' => 'right',
324 );
325 wpbc_ui_el__a( $el_arr );
326 }
327
328 /**
329 * Show element - "Max - Vertical Navigation" panel
330 *
331 * @return void
332 */
333 function wpbc_ui__vert_left_bar__do_max() {
334
335 $el_arr = array();
336 $el_arr['container_style'] = '';
337 $el_arr['container_class'] = 'wpbc_ui__top_nav__btn_open_left_vertical_nav wpbc_ui__hide hide_in_compact_mode0';
338 $el_arr['onclick'] = ' wpbc_admin_ui__sidebar_left__do_max( true ); ';
339 $el_arr['font_icon'] = 'wpbc-bi-box-arrow-right';
340 $el_arr['hint'] = array(
341 'title' => __( 'Open side menu', 'booking' ),
342 'position' => 'top',
343 );
344 wpbc_ui_el__a( $el_arr );
345 }
346
347 /**
348 * Show element - "Compact - Vertical Navigation" panel
349 *
350 * @return void
351 */
352 function wpbc_ui__vert_left_bar__do_compact() {
353
354 $el_arr = array();
355 $el_arr['container_style'] = '';
356 $el_arr['container_class'] = 'wpbc_ui__top_nav__btn_hide_left_vertical_nav';
357 $el_arr['onclick'] = ' wpbc_admin_ui__sidebar_left__do_compact( true ); ';
358 $el_arr['font_icon'] = 'wpbc-bi-box-arrow-left';
359 $el_arr['hint'] = array(
360 'title' => __( 'Set side menu compact', 'booking' ),
361 'position' => 'top',
362 );
363 wpbc_ui_el__a( $el_arr );
364 }
365
366 /**
367 * Show element - "X - Close (none)" panel
368 *
369 * @return void
370 */
371 function wpbc_ui__vert_left_bar__do_none() {
372
373 $el_arr = array();
374 $el_arr['container_style'] = '';
375 $el_arr['container_class'] = 'wpbc_ui__top_nav__btn_hide_left_vertical_nav';
376 $el_arr['onclick'] = ' wpbc_admin_ui__sidebar_left__do_hide(); ';
377 $el_arr['font_icon'] = 'wpbc_icn_close';
378 $el_arr['hint'] = array(
379 'title' => __( 'Close side menu', 'booking' ),
380 'position' => 'bottom',
381 );
382 wpbc_ui_el__a( $el_arr );
383 }
384
385 /**
386 * Show element - "_ - Min" panel
387 *
388 * @return void
389 */
390 function wpbc_ui__vert_left_bar__do_min() {
391
392 $el_arr = array();
393 $el_arr['container_style'] = '';
394 $el_arr['container_class'] = '';// 'wpbc_ui__top_nav__btn_hide_left_vertical_nav';
395 // User Save Preferences of other pages (saved collapsed left menu).
396 // $el_arr['onclick'] = 'event.stopPropagation(); wpbc_admin_ui__sidebar_left__do_min( true ); ';
397 // Do NOT - Save User Preferences of other pages (not save collapsed left menu).
398 $el_arr['onclick'] = 'event.stopPropagation(); wpbc_admin_ui__sidebar_left__do_min(); ';
399 $el_arr['font_icon'] = 'wpbc_icn_close'; //'wpbc_icn_minimize';
400 $el_arr['hint'] = array(
401 'title' => __( 'Hide', 'booking' ),
402 'position' => 'right',
403 );
404 wpbc_ui_el__a( $el_arr );
405 }
406
407 /* == Elements in Left menu ========================================================================================= */
408
409 /**
410 * Show Section Header - e.g. ' SETTINGS '
411 *
412 * @param string $page_title - title to show.
413 *
414 * @return void
415 */
416 function wpbc_ui__vert_menu__show_section_header_go_back( $page_title ) {
417
418 // FixIn: 10.12.1.7.
419 ?>
420 <a onclick="javascript:wpbc_admin_ui__sidebar_left__show_section('main_menus');" href="javascript:void(0)"
421 class="wpbc_ui_el__go_back wpbc_ui_el hide_in_compact_mode" >
422 <i class="menu_icon icon-1x wpbc_icn_navigate_before"></i>
423 <?php
424 wpbc_ui__vert_menu__show_section_header( __( 'Go back', 'booking' ) );
425 ?>
426 </a>
427 <?php
428 }
429
430 /**
431 * Left Sidebar.
432 *
433 * @param array $pages_arr
434 *
435 * @return void
436 */
437 function wpbc_ui__vert_left_bar__section__root_menu( $pages_arr ) {
438
439 ?>
440 <div class="wpbc_ui_el__vert_left_bar__section wpbc_ui_el__vert_left_bar__section_main_menus wpbc_ui__hide">
441 <?php
442
443 // Section Header.
444 echo '<div class="wpbc_ui_el__row100 wpbc_ui_el__expand_colapse_btns">';
445 // wpbc_ui__vert_menu__show_section_header( __( 'Main menu', 'booking' ) );
446 wpbc_ui__vert_left_bar__do_compact();
447 wpbc_ui__vert_left_bar__do_max();
448 echo '</div>';
449 wpbc_ui_el__divider_horizontal();
450
451 foreach ( $pages_arr as $page_slug => $main_page_options_arr ) {
452
453 switch ( $main_page_options_arr['type'] ) {
454
455 case 'divider':
456 wpbc_ui_el__divider_horizontal();
457 break;
458
459 case 'menu':
460 default:
461 $page_title = $main_page_options_arr['title'];
462
463 echo '<div class="wpbc_ui_el__vert_nav_item wpbc_ui_el__vert_nav_item_root wpbc_ui_el__vert_nav_item__' . esc_attr( $page_slug ) . '">';
464 if ( ! empty( $main_page_options_arr['url'] ) ) {
465 echo ' <a href="' . esc_url( $main_page_options_arr['url'] ) . '" class="wpbc_ui_el__vert_nav_item__a wpbc_ui_el__vert_nav_item__single">';
466 } else {
467 echo ' <a onclick="wpbc_admin_ui__sidebar_left__show_section(\'' . esc_attr( $page_slug ) . '\');" href="javascript:void(0)" class="wpbc_ui_el__vert_nav_item__a wpbc_ui_el__vert_nav_item__single">';
468 }
469
470 echo ' <i class="wpbc_ui_el__vert_nav_icon menu_icon icon-1x ' . esc_attr( $main_page_options_arr['font_icon'] ) . '"></i>';
471 echo ' <span class="wpbc_ui_el__vert_nav_title hide_in_compact_mode">' . esc_html( $page_title ) . '</span>';
472 if ( empty( $main_page_options_arr['url'] ) ) {
473 echo ' <i class="wpbc_ui_el__vert_nav_icon wpbc_ui_el__vert_nav_icon_arrow menu_icon icon-1x wpbc-bi-chevron-right"></i>';
474 }
475 echo ' </a>';
476 echo '</div>';
477 }
478 }
479 ?>
480 </div>
481 <?php
482 }
483
484
485 /**
486 * Show Root Header
487 *
488 * @param string $main_page_slug Slug of the submenu section.
489 * @param string $page_title Section title.
490 * @param string $font_icon Optional sanitized font-icon CSS classes supplied by the selected mode.
491 *
492 * @return void
493 */
494 function wpbc_ui__vert_menu__show_root_section_header( $main_page_slug, $page_title, $font_icon = '' ) {
495
496 $css_section = '.root_section_element_' . $main_page_slug;
497
498 // Section Header.
499 ?><a class="wpbc_ui_el__row100 wpbc_ui_el__root_section_header_a"
500 href="javascript:void(0)"
501 <?php /**/ ?>
502 onclick="javascript:var is_has_class = jQuery( '<?php echo esc_attr( $css_section ); ?>' ).hasClass('section_expanded'); <?php
503 /* ?> jQuery( '.wpbc_ui_el__vert_left_bar__root_section_element' ).removeClass('section_expanded'); <?php */
504 ?>if (is_has_class) { jQuery( '<?php echo esc_attr( $css_section ); ?>' ).removeClass('section_expanded'); } else {jQuery( '<?php echo esc_attr( $css_section ); ?>' ).addClass('section_expanded');}"
505 <?php /**/ ?>
506 >
507 <i class="wpbc_ui_el__vert_menu_root_section_icon menu_icon icon-1x wpbc-bi-chevron-right"></i><?php
508
509 if ( '' !== $font_icon ) {
510 ?><i class="wpbc_ui_el__vert_menu_root_section_font_icon menu_icon icon-1x <?php echo esc_attr( $font_icon ); ?>" aria-hidden="true"></i><?php
511 }
512
513 wpbc_ui__vert_menu__show_section_header( $page_title );
514
515 ?></a><?php
516 }
517
518
519 /**
520 * Show Section Header - e.g. ' SETTINGS '
521 *
522 * @param string $page_title - title to show.
523 *
524 * @return void
525 */
526 function wpbc_ui__vert_menu__show_section_header( $page_title ) {
527
528 echo '<h2 class="wpbc_ui_el__section_header hide_in_compact_mode">' . wp_kses_post( $page_title ) . '</h2>';
529 }
530
531 /**
532 * Show main menu item.
533 *
534 * @param string $menu_slug - 'calendar_appearance'.
535 * @param array $menu_item_arr - [ [title] => Skin
536 * [page_title] => Calendar General Settings 3
537 * [hint] => Calendar General Settings 2
538 * [link] =>
539 * [position] =>
540 * [css_classes] =>
541 * [icon] =>
542 * [font_icon] => wpbc-bi-calendar2-range
543 * [default] =>
544 * [disabled] =>
545 * [hided] =>
546 * [is_active] => 1
547 * [url] => http://beta/wp-admin/admin.php?page=wpbc-settings&#038;tab=calendar_appearance
548 * [subtabs] => [....]
549 * ]
550 *
551 * @return void
552 */
553 function wpbc_ui__vert_menu__item_main( $menu_slug, $menu_item_arr ) {
554
555 $defaults = array(
556 'title' => '',
557 'page_title' => '',
558 'hint' => '',
559 'link' => '',
560 'position' => '',
561 'css_classes' => '',
562 'icon' => '',
563 'font_icon' => '',
564 'default' => false,
565 'disabled' => false,
566 'hided' => false,
567 'is_active' => 0,
568 'url' => '',
569 'subtabs' => array(),
570 );
571 $menu_item_arr = wp_parse_args( $menu_item_arr, $defaults );
572
573 // CSS Classes.
574 $menu_css_arr = array();
575 $menu_css_arr[] = 'wpbc_ui_el__vert_nav_item';
576 $menu_css_arr[] = 'wpbc_ui_el__vert_nav_item__' . esc_attr( $menu_slug );
577
578 if ( ( empty( $menu_item_arr['subtabs'] ) ) && ( ! empty( $menu_item_arr['is_active'] ) ) ) {
579 $menu_css_arr[] = 'active';
580 }
581 if ( isset( $menu_item_arr['css_classes'] ) ) {
582 $menu_css_arr[] = $menu_item_arr['css_classes'];
583 }
584 $menu_css_str = implode( ' ', $menu_css_arr );
585
586 // Styles.
587 $menu_style_str = ( isset( $menu_item_arr['style'] ) ) ? $menu_item_arr['style'] : '';
588
589
590 ?><div class="<?php echo esc_attr( $menu_css_str ); ?>" style="<?php echo esc_attr( $menu_style_str ); ?>">
591 <?php
592 if ( ! empty( $menu_item_arr['subtabs'] ) ) {
593 // Folder Item - expand / colapse. Previously: here was : wpbc_admin_ui__sidebar_left__do_max();
594 ?>
595 <a href="javascript:void(0)"
596 onclick="javascript: if( ! jQuery( this ).parents('.wpbc_ui_el__level__folder').hasClass('expanded') ) { jQuery( '.wpbc_ui_el__level__folder' ).removeClass('expanded');jQuery( this ).parents('.wpbc_ui_el__level__folder').addClass('expanded'); } else {jQuery( '.wpbc_ui_el__level__folder' ).removeClass('expanded');} "
597 class="wpbc_ui_el__vert_nav_item__a wpbc_ui_el__vert_nav_item__folder">
598 <?php if ( ! empty( $menu_item_arr['font_icon'] ) ) { ?>
599 <?php // Show icon in max mode, without right tooltip, thanks to '.hide_in_compact_mode'. // FixIn: 10.11.5.8. ?>
600 <i class="wpbc_ui_el__vert_nav_icon hide_in_compact_mode menu_icon icon-1x <?php echo esc_attr( $menu_item_arr['font_icon'] ); ?>"
601 title="<?php echo ( ! empty( $menu_item_arr['hint'] ) ) ? esc_attr( wp_strip_all_tags( $menu_item_arr['hint'] ) ) : esc_attr( wp_strip_all_tags( $menu_item_arr['title'] ) ); ?>"
602 ></i>
603 <?php // Show icon in compact mode, with right tooltip, thanks to '.hide_in_max_mode'. // FixIn: 10.11.5.8. ?>
604 <i class="wpbc_ui_el__vert_nav_icon hide_in_max_mode tooltip_right_offset menu_icon icon-1x <?php echo esc_attr( $menu_item_arr['font_icon'] ); ?>"
605 data-original-title="<?php echo ( ! empty( $menu_item_arr['hint'] ) ) ? esc_attr( wp_strip_all_tags( $menu_item_arr['title'] ) ) . ' - ' . esc_attr( wp_strip_all_tags( $menu_item_arr['hint'] ) ) : esc_attr( wp_strip_all_tags( $menu_item_arr['title'] ) ); ?>"
606 ></i>
607 <?php } ?>
608 <span class="wpbc_ui_el__vert_nav_title hide_in_compact_mode"><?php echo wp_kses_post( $menu_item_arr['title'] ); ?></span>
609 <i class="wpbc_ui_el__vert_nav_icon_right tooltip_right menu_icon icon-1x wpbc_ui_el__vert_nav_icon_expanded hide_in_compact_mode wpbc-bi-dash-square-dotted" data-original-title="<?php echo esc_attr_e( 'Collapse', 'booking' ); ?>"></i>
610 <i class="wpbc_ui_el__vert_nav_icon_right tooltip_right menu_icon icon-1x wpbc_ui_el__vert_nav_icon_collapsed hide_in_compact_mode wpbc-bi-plus-square-dotted" data-original-title="<?php echo esc_attr_e( 'Expand', 'booking' ); ?>"></i>
611 </a>
612 <?php
613 } else {
614 // Single Item Link.
615 ?>
616 <a <?php if ( ! empty( $menu_item_arr['onclick'] ) ) { ?>
617 onclick="javascript:<?php echo $menu_item_arr['onclick']; /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ ?>"
618 href="javascript:void(0);"
619 <?php } else { ?>
620 href="<?php echo esc_url( $menu_item_arr['url'] ); ?>"
621 <?php } ?>
622 class="wpbc_ui_el__vert_nav_item__a wpbc_ui_el__vert_nav_item__single">
623 <?php if ( ! empty( $menu_item_arr['font_icon'] ) ) { ?>
624 <?php // Show icon in max mode, without right tooltip, thanks to '.hide_in_compact_mode'. // FixIn: 10.11.5.8. ?>
625 <i class="wpbc_ui_el__vert_nav_icon hide_in_compact_mode menu_icon icon-1x <?php echo esc_attr( $menu_item_arr['font_icon'] ); ?>"
626 title="<?php echo ( ! empty( $menu_item_arr['hint'] ) ) ? esc_attr( wp_strip_all_tags( $menu_item_arr['hint'] ) ) : esc_attr( wp_strip_all_tags( $menu_item_arr['title'] ) ); ?>"
627 ></i>
628 <?php // Show icon in compact mode, with right tooltip, thanks to '.hide_in_max_mode'. // FixIn: 10.11.5.8. ?>
629 <i class="wpbc_ui_el__vert_nav_icon hide_in_max_mode tooltip_right_offset menu_icon icon-1x <?php echo esc_attr( $menu_item_arr['font_icon'] ); ?>"
630 data-original-title="<?php echo ( ! empty( $menu_item_arr['hint'] ) ) ? esc_attr( wp_strip_all_tags( $menu_item_arr['title'] ) ) . ' - ' . esc_attr( wp_strip_all_tags( $menu_item_arr['hint'] ) ) : esc_attr( wp_strip_all_tags( $menu_item_arr['title'] ) ); ?>"
631 ></i>
632 <?php } ?>
633 <span class="wpbc_ui_el__vert_nav_title hide_in_compact_mode"><?php echo wp_kses_post( $menu_item_arr['title'] ); ?></span>
634 <?php
635 // Icon at Right side. Usually: 'wpbc-bi-question-circle' | 'wpbc-bi-arrow-down-short' | 'wpbc-bi-arrow-up-right-square'.
636 if ( ! empty( $menu_item_arr['font_icon_right'] ) ) { ?>
637 <i class="hide_in_compact_mode tooltip_right menu_icon icon-1x <?php echo esc_attr( $menu_item_arr['font_icon_right'] ); ?>"
638 data-original-title="<?php echo ( ! empty( $menu_item_arr['hint'] ) ) ? esc_attr( wp_strip_all_tags( $menu_item_arr['hint'] ) ) : esc_attr( wp_strip_all_tags( $menu_item_arr['title'] ) ); ?>"></i>
639 <?php
640 }
641 ?>
642 </a>
643 <?php
644 }
645 ?>
646 </div>
647 <?php
648 }
649
650 /**
651 * Sub - Single Item.
652 *
653 * @param string $menu_slug - 'calendar_appearance'.
654 * @param array $menu_item_arr - [
655 * 'type' => "subtab",
656 * title = "Skin Search Form Layout 1"
657 * page_title = "Skin Search Settings 2"
658 * hint = "Skin Search Settings 3"
659 * position = ""
660 * css_classes = ""
661 * default = true
662 * disabled = false
663 * checkbox = false
664 * content = "content"
665 * show_checked_icon = false
666 * is_use_new_settings_skin = true
667 * is_active = true
668 * url = "http://beta/wp-admin/admin.php?page=wpbc-settings&#038;tab=calendar_appearance&#038;subtab=calendar_appearance_skin"
669 * ].
670 *
671 * @return void
672 */
673 function wpbc_ui__vert_menu__item_sub( $menu_slug, $menu_item_arr ) {
674
675 // CSS Classes.
676 $menu_css_arr = array();
677 $menu_css_arr[] = 'wpbc_ui_el__vert_nav_item';
678 $menu_css_arr[] = 'wpbc_ui_el__vert_nav_item_sub';
679 // $menu_css_arr[] = 'hide_in_compact_mode';
680 $menu_css_arr[] = 'wpbc_ui_el__vert_nav_item__' . esc_attr( $menu_slug );
681 if ( ! empty( $menu_item_arr['is_active'] ) ) {
682 $menu_css_arr[] = 'active';
683 }
684 if ( isset( $menu_item_arr['css_classes'] ) ) {
685 $menu_css_arr[] = $menu_item_arr['css_classes'];
686 }
687 $menu_css_str = implode( ' ', $menu_css_arr );
688
689 // Styles.
690 $menu_style_str = ( isset( $menu_item_arr['style'] ) ) ? $menu_item_arr['style'] : '';
691
692
693 ?>
694 <div class="<?php echo esc_attr( $menu_css_str ); ?>" style="<?php echo esc_attr( $menu_style_str ); ?>">
695 <a class="wpbc_ui_el__vert_nav_item__a wpbc_ui_el__vert_nav_item__single"
696 <?php if ( ! empty( $menu_item_arr['onclick'] ) ) { ?>
697 onclick="javascript:<?php echo $menu_item_arr['onclick']; /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ ?>"
698 href="javascript:void(0);"
699 <?php } else { ?>
700 href="<?php echo esc_url( $menu_item_arr['url'] ); ?>"
701 <?php } ?>
702 >
703 <?php if ( ! empty( $menu_item_arr['font_icon'] ) ) { ?>
704 <?php // Show icon in max mode, without right tooltip, thanks to '.hide_in_compact_mode'. // FixIn: 10.11.5.8.2. ?>
705 <i class="wpbc_ui_el__vert_nav_icon hide_in_compact_mode menu_icon icon-1x <?php echo esc_attr( $menu_item_arr['font_icon'] ); ?>"
706 title="<?php echo ( ! empty( $menu_item_arr['hint'] ) ) ? esc_attr( wp_strip_all_tags( $menu_item_arr['hint'] ) ) : esc_attr( wp_strip_all_tags( $menu_item_arr['title'] ) ); ?>"
707 ></i>
708 <?php // Show icon in compact mode, with right tooltip, thanks to '.hide_in_max_mode'. // FixIn: 10.11.5.8.2. ?>
709 <i class="wpbc_ui_el__vert_nav_icon hide_in_max_mode tooltip_right_offset menu_icon icon-1x <?php echo esc_attr( $menu_item_arr['font_icon'] ); ?>"
710 data-original-title="<?php echo ( ! empty( $menu_item_arr['hint'] ) ) ? esc_attr( wp_strip_all_tags( $menu_item_arr['title'] ) ) . ' - ' . esc_attr( wp_strip_all_tags( $menu_item_arr['hint'] ) ) : esc_attr( wp_strip_all_tags( $menu_item_arr['title'] ) ); ?>"
711 ></i>
712 <?php } ?>
713 <span class="wpbc_ui_el__vert_nav_title hide_in_compact_mode"><?php echo wp_kses_post( $menu_item_arr['title'] ); ?></span>
714 <?php
715
716
717 // Show Togles for "Emails" and "Payment gateways", maybe for some other pages.
718 if (
719 ( ! empty( $menu_item_arr['show_checked_icon'] ) ) &&
720 ( ! empty( $menu_item_arr['checked_data'] ) )
721 ) {
722 $is_checked_data = get_bk_option( $menu_item_arr['checked_data'] );
723 if (
724 ( ( ! empty( $is_checked_data ) ) && ( isset( $is_checked_data['enabled'] ) ) && ( 'On' === $is_checked_data['enabled'] ) ) ||
725 ( ( ! empty( $is_checked_data ) ) && ( 'On' === $is_checked_data ) )
726 ) {
727 echo '<i class="wpbc_ui_el__vert_nav_icon_right menu_icon icon-1x wpbc-bi-toggle2-on" style="margin-left: auto;margin-top: 3px;color: var( --wpbc_admin-theme-color, #036aab );"></i>';
728 } else {
729 echo '<i class="wpbc_ui_el__vert_nav_icon_right menu_icon icon-1x wpbc-bi-toggle2-off" style="margin-left: auto;margin-top: 3px;"></i>';
730 }
731 }
732
733 // Icon at Right side. Usually: 'wpbc-bi-question-circle' | 'wpbc-bi-arrow-down-short' | 'wpbc-bi-arrow-up-right-square'.
734 if ( ! empty( $menu_item_arr['font_icon_right'] ) ) { ?>
735 <i class="hide_in_compact_mode tooltip_right menu_icon icon-1x <?php echo esc_attr( $menu_item_arr['font_icon_right'] ); ?>"
736 data-original-title="<?php echo ( ! empty( $menu_item_arr['hint'] ) ) ? esc_attr( wp_strip_all_tags( $menu_item_arr['hint'] ) ) : esc_attr( wp_strip_all_tags( $menu_item_arr['title'] ) ); ?>"></i>
737 <?php
738 }
739 ?>
740 </a>
741 </div>
742 <?php
743 }
744
745 /**
746 * Show horizontal divider.
747 *
748 * @param string $menu_slug - 'calendar_appearance'.
749 * @param array $menu_item_arr - [
750 * 'type' => "separator",
751 * 'is_active' => false,
752 * 'url' => "http://beta/wp-admin/admin.php?page=wpbc-settings&#038;tab=calendar_appearance&#038;subtab=calendar_appearance_skin_sep"
753 * ].
754 *
755 * @return void
756 */
757 function wpbc_ui__vert_menu__item_separtor( $menu_slug, $menu_item_arr ) {
758
759 $args = array( 'container_class' => 'wpbc_ui_el__vert_nav_item_sub' );
760 wpbc_ui_el__divider_horizontal( $args );
761 }
762
763 /**
764 * HTML
765 *
766 * @param string $menu_slug - 'calendar_appearance'.
767 * @param array $menu_item_arr - [
768 * 'type' = "htnl"
769 * 'html' = "Form Fields"
770 * ].
771 *
772 * @return void
773 */
774 function wpbc_ui__vert_menu__item_html( $menu_slug, $menu_item_arr ) {
775 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
776 echo $menu_item_arr['html'];
777 }
778
779 // FixIn: 10.12.1.7.
780 /**
781 * Show element - "Compact - Vertical Navigation" panel
782 *
783 * @return void
784 */
785 function wpbc_ui__vert_left_bar__side_button__do_compact() {
786
787 ?>
788 <button type="button" class="wpbc_ui__left_sidebar__side_button wpbc_ui__top_nav__btn_hide_left_vertical_nav"
789 <?php /* Save user preferences ?>
790 onclick="event.stopPropagation(); wpbc_admin_ui__sidebar_left__do_min( true ); return false;"
791 <?php /**/ ?>
792 <?php /* Not Save user preferences - collpased left menu */ ?>
793 onclick="event.stopPropagation(); wpbc_admin_ui__sidebar_left__do_min(); return false;"
794 title="<?php esc_attr_e( 'Minimize side menu', 'booking' ); ?>">
795 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
796 <path fill="#6B6B6B" d="M16.5 22a1.003 1.003 0 0 1-.71-.29l-9-9a1 1 0 0 1 0-1.42l9-9a1.004 1.004 0 1 1 1.42 1.42L8.91 12l8.3 8.29A.999.999 0 0 1 16.5 22Z"></path>
797 </svg>
798 </button>
799 <?php
800 }
801
802 /**
803 * Show element - "Max - Vertical Navigation" panel
804 *
805 * @return void
806 */
807 function wpbc_ui__vert_left_bar__side_button__do_max() {
808 ?>
809 <button type="button" class="wpbc_ui__left_sidebar__side_button wpbc_ui__hide wpbc_ui__top_nav__btn_open_left_vertical_nav"
810 onclick="event.stopPropagation(); wpbc_admin_ui__sidebar_left__do_max( true ); return false;" title="<?php esc_attr_e( 'Open side menu', 'booking' ); ?>">
811 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
812 <path fill="#6B6B6B" d="M16.5 22a1.003 1.003 0 0 1-.71-.29l-9-9a1 1 0 0 1 0-1.42l9-9a1.004 1.004 0 1 1 1.42 1.42L8.91 12l8.3 8.29A.999.999 0 0 1 16.5 22Z"></path>
813 </svg>
814 </button>
815 <script type="text/javascript">
816 <?php echo wpbc_jq_ready_start(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
817 if (wpbc_admin_ui__is_in_this_screen_size(789)){
818 jQuery( '.wpbc_ui__left_sidebar__side_button' ).toggleClass( 'wpbc_ui__hide' );
819 }
820 <?php echo wpbc_jq_ready_end(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
821 </script>
822 <?php
823 }
824
825
826 /* == Right Sidebar ================================================================================================= */
827 /**
828 * Show Compact Right Vertical SideBar
829 *
830 * @param array $args - parameters.
831 *
832 * @return void
833 */
834 function wpbc_ui__right_vertical_sidebar_compact( $args =array() ) {
835
836 $defaults = array(
837 'attr' => array(),
838 );
839 $params = wp_parse_args( $args, $defaults );
840
841 $active_page_arr = array(
842 'active_page' => $args['active_page'], // wpbc-settings.
843 'active_tab' => $args ['active_tab'], // calendar_appearance.
844 'active_subtab' => $args['active_subtab'], // calendar_appearance_skin.
845 );
846
847 // Ability to click on panel, only if there 'min' class - panel minimized!
848 echo '<div class="wpbc_ui_el__vert_right_bar__wrapper wpbc_ui_el__vert_right_bar__wrapper wpbc_ui_el__vert_right_bar_compact__wrapper" >';
849
850 echo ' <div class="wpbc_ui_el__vert_right_bar__content">';
851
852 echo ' <div class="wpbc_ui_el__vert_right_bar__root_sections_container" role="tablist">';
853
854 do_action( 'wpbc_ui__right_vertical_sidebar_compact_content', $active_page_arr );
855
856 echo ' </div><!-- wpbc_ui_el__vert_right_bar__root_sections_container -->';
857 echo ' </div><!-- wpbc_ui_el__vert_right_bar__content -->';
858 echo '</div><!-- wpbc_ui_el__vert_right_bar_compact__wrapper -->';
859
860
861 wpbc_start_element_scrollable__with_simplebar( '.wpbc_ui_el__vert_right_bar_compact__wrapper .wpbc_ui_el__vert_right_bar__content' );
862 }
863
864
865 /**
866 * Show Right Vertical SideBar
867 *
868 * @param array $args - parameters.
869 *
870 * @return void
871 */
872 function wpbc_ui__right_vertical_sidebar( $args =array() ) {
873
874 $defaults = array(
875 'attr' => array(),
876 );
877 $params = wp_parse_args( $args, $defaults );
878
879 // Ability to click on panel, only if there 'min' class - panel minimized!
880 echo '<div class="wpbc_ui_el__vert_right_bar__wrapper wpbc_ui_el__vert_right_bar__wrapper" onclick0="javascript:if (( jQuery( this ).parent(\'.wpbc_settings_page_wrapper\').hasClass(\'min\') ) && ( ! wpbc_admin_ui__is_in_mobile_screen_size())) { wpbc_admin_ui__sidebar_right__do_max(); }" >';
881
882 // FixIn: 10.12.1.7.
883 wpbc_ui__vert_right_bar__side_button__do_compact();
884 wpbc_ui__vert_right_bar__side_button__do_max();
885
886 $active_page_arr = array(
887 'active_page' => $args['active_page'], // wpbc-settings.
888 'active_tab' => $args ['active_tab'], // calendar_appearance.
889 'active_subtab' => $args['active_subtab'], // calendar_appearance_skin.
890 );
891
892 echo ' <div class="wpbc_ui_el__vert_right_bar__content">';
893
894 // wpbc_ui_el__divider_horizontal();
895 echo '<div class="wpbc_ui_el__row100 wpbc_ui_el__expand_colapse_btns">';
896 wpbc_ui__vert_right_bar__do_compact();
897 wpbc_ui__vert_right_bar__do_max();
898 echo '</div>';
899
900 echo ' <div class="wpbc_ui_el__vert_right_bar__root_sections_container" role="tablist">';
901
902 do_action( 'wpbc_ui__right_vertical_sidebar_content', $active_page_arr );
903
904 echo ' </div><!-- wpbc_ui_el__vert_right_bar__root_sections_container -->';
905 echo ' </div><!-- wpbc_ui_el__vert_right_bar__content -->';
906
907 /**
908 * Render an optional page-specific footer outside the scrollable inspector.
909 *
910 * Callbacks should render the complete footer element and use the native
911 * `wpbc_ui_el__vert_right_bar__footer_section` class for positioning.
912 *
913 * @param array $active_page_arr Active page, tab, and subtab identifiers.
914 */
915 do_action( 'wpbc_ui__right_vertical_sidebar_footer', $active_page_arr );
916
917 echo '</div><!-- wpbc_ui_el__vert_right_bar__wrapper -->';
918
919 wpbc_start_element_scrollable__with_simplebar( '.wpbc_ui_el__vert_right_bar__wrapper .wpbc_ui_el__vert_right_bar__content' );
920 }
921
922 /**
923 * Show element - "Compact - Vertical Navigation" panel
924 *
925 * @return void
926 */
927 function wpbc_ui__vert_right_bar__side_button__do_compact() {
928
929 ?>
930 <button class="wpbc_ui__right_sidebar__side_button wpbc_ui__top_nav__btn_hide_right_vertical_nav"
931 onclick="javascript:wpbc_admin_ui__sidebar_right__do_min();" title="<?php esc_attr_e( 'Set side menu compact', 'booking' ); ?>">
932 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
933 <path fill="#6B6B6B" d="M16.5 22a1.003 1.003 0 0 1-.71-.29l-9-9a1 1 0 0 1 0-1.42l9-9a1.004 1.004 0 1 1 1.42 1.42L8.91 12l8.3 8.29A.999.999 0 0 1 16.5 22Z"></path>
934 </svg>
935 </button>
936 <?php
937 }
938
939 /**
940 * Show element - "Max - Vertical Navigation" panel
941 *
942 * @return void
943 */
944 function wpbc_ui__vert_right_bar__side_button__do_max() {
945 ?>
946 <button class="wpbc_ui__right_sidebar__side_button wpbc_ui__hide wpbc_ui__top_nav__btn_open_right_vertical_nav"
947 onclick="javascript:wpbc_admin_ui__sidebar_right__do_max();" title="<?php esc_attr_e( 'Open side menu', 'booking' ); ?>">
948 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
949 <path fill="#6B6B6B" d="M16.5 22a1.003 1.003 0 0 1-.71-.29l-9-9a1 1 0 0 1 0-1.42l9-9a1.004 1.004 0 1 1 1.42 1.42L8.91 12l8.3 8.29A.999.999 0 0 1 16.5 22Z"></path>
950 </svg>
951 </button>
952 <script type="text/javascript">
953 <?php echo wpbc_jq_ready_start(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
954 if (wpbc_admin_ui__is_in_this_screen_size(789)){
955 jQuery( '.wpbc_ui__right_sidebar__side_button' ).toggleClass( 'wpbc_ui__hide' );
956 }
957 <?php echo wpbc_jq_ready_end(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
958 </script>
959 <?php
960 }
961
962 /* == Toggles in Right menu ========================================================================================= */
963
964 /**
965 * Show element - "Open / Hide Left Vertical Navigation" panel
966 *
967 * @return void
968 */
969 function wpbc_ui__vert_right_bar__do_toggle() {
970
971 $el_arr = array();
972 $el_arr['font_icon'] = 'wpbc-bi-layout-sidebar-inset-reverse';
973 $el_arr['container_style'] = 'padding:0 8px;';
974 $el_arr['container_class'] = 'wpbc_ui__top_nav__btn_show_right_vertical_nav';
975 $el_arr['onclick'] = "if ( jQuery( '.wpbc_ui_el__vert_right_bar__content' ).is( ':visible' ) ) {";
976 $el_arr['onclick'] .= ' wpbc_admin_ui__sidebar_right__do_min(); ';
977 $el_arr['onclick'] .= " jQuery( '.wpbc_ui__top_nav__btn_show_right_vertical_nav i' ).removeClass( 'wpbc-bi-layout-sidebar-reverse wpbc-bi-layout-sidebar-inset-reverse' ).addClass( 'wpbc-bi-layout-sidebar-reverse' ); ";
978 $el_arr['onclick'] .= '} else {';
979 $el_arr['onclick'] .= ' wpbc_admin_ui__sidebar_right__do_max(); ';
980 $el_arr['onclick'] .= " jQuery( '.wpbc_ui__top_nav__btn_show_right_vertical_nav i' ).removeClass( 'wpbc-bi-layout-sidebar-reverse wpbc-bi-layout-sidebar-inset-reverse' ).addClass( 'wpbc-bi-layout-sidebar-inset-reverse' ); ";
981 $el_arr['onclick'] .= '}';
982 $el_arr['hint'] = array(
983 'title' => __( 'Toggle side menu', 'booking' ),
984 'position' => 'left',
985 );
986 wpbc_ui_el__a( $el_arr );
987 }
988
989 /**
990 * Show element - "Max - Vertical Navigation" panel
991 *
992 * @return void
993 */
994 function wpbc_ui__vert_right_bar__do_max() {
995
996 $el_arr = array();
997 $el_arr['container_style'] = '';
998 $el_arr['container_class'] = 'wpbc_ui__top_nav__btn_open_right_vertical_nav wpbc_ui__hide hide_in_compact_mode0';
999 $el_arr['onclick'] = ' wpbc_admin_ui__sidebar_right__do_max(); ';
1000 $el_arr['font_icon'] = 'wpbc-bi-box-arrow-left';
1001 $el_arr['hint'] = array(
1002 'title' => __( 'Open side menu', 'booking' ),
1003 'position' => 'top',
1004 );
1005 wpbc_ui_el__a( $el_arr );
1006 }
1007
1008 /**
1009 * Show element - "Compact - Vertical Navigation" panel
1010 *
1011 * @return void
1012 */
1013 function wpbc_ui__vert_right_bar__do_compact() {
1014
1015 $el_arr = array();
1016 $el_arr['container_style'] = '';
1017 $el_arr['container_class'] = 'wpbc_ui__top_nav__btn_hide_right_vertical_nav';
1018 $el_arr['onclick'] = ' wpbc_admin_ui__sidebar_right__do_compact(); ';
1019 $el_arr['font_icon'] = 'wpbc-bi-box-arrow-right';
1020 $el_arr['hint'] = array(
1021 'title' => __( 'Set side menu compact', 'booking' ),
1022 'position' => 'top',
1023 );
1024 wpbc_ui_el__a( $el_arr );
1025 }
1026
1027 /**
1028 * Show element - "X - Close (none)" panel
1029 *
1030 * @return void
1031 */
1032 function wpbc_ui__vert_right_bar__do_none() {
1033
1034 $el_arr = array();
1035 $el_arr['container_style'] = '';
1036 $el_arr['container_class'] = 'wpbc_ui__top_nav__btn_hide_right_vertical_nav';
1037 $el_arr['onclick'] = ' wpbc_admin_ui__sidebar_right__do_hide(); ';
1038 $el_arr['font_icon'] = 'wpbc_icn_close';
1039 $el_arr['hint'] = array(
1040 'title' => __( 'Close side menu', 'booking' ),
1041 'position' => 'bottom',
1042 );
1043 wpbc_ui_el__a( $el_arr );
1044 }
1045
1046 /**
1047 * Show element - "_ - Min" panel
1048 *
1049 * @return void
1050 */
1051 function wpbc_ui__vert_right_bar__do_min() {
1052
1053 $el_arr = array();
1054 $el_arr['container_style'] = '';
1055 $el_arr['container_class'] = 'wpbc_ui__top_nav__btn_hide_right_vertical_nav';
1056 $el_arr['onclick'] = ' wpbc_admin_ui__sidebar_right__do_min(); ';
1057 $el_arr['font_icon'] = 'wpbc_icn_minimize';
1058 $el_arr['hint'] = array(
1059 'title' => __( 'Minimize side menu', 'booking' ),
1060 'position' => 'bottom',
1061 );
1062 wpbc_ui_el__a( $el_arr );
1063 }
1064