PluginProbe
Booking Calendar / 11.6
Booking Calendar v11.6
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 10.11 10.11.2 All 203 releases
booking / includes / ui_settings / parts / ui__nav_vert.php

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

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