PluginProbe
Booking Calendar / 11.1
Booking Calendar v11.1
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.1, at includes/ui_settings/parts/ui__nav_vert.php

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