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