PluginProbe
Booking Calendar / 11.8.4
Booking Calendar v11.8.4
11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 10.11 All 204 releases
← All changes | includes/_toolbar_ui/ui__settings_panel.php +134 -230 11.2.111.8.4 View file →
@@ -1,4 +1,4 @@
1 1 <?php /**
2 2 * @version 1.0
3 3 * @package Booking Calendar
4 4 * @category UI Elements for Settings
@@ -103,27 +103,71 @@
103 103
104 104 /**
105 105 * Top Path Line
106 106 *
107 + * @param WPBC_Page_Structure|false $page_structure_obj Page structure object.
108 + *
107 109 * @return void
108 110 */
109 -function wpbc_ui_settings__top_path() {
111 +function wpbc_ui_settings__top_path( $page_structure_obj = false ) {
110 112
113 + $items = array();
114 + $is_show_version = true;
115 +
116 + if ( is_object( $page_structure_obj ) && method_exists( $page_structure_obj, 'get_top_path_items' ) ) {
117 + $items = $page_structure_obj->get_top_path_items();
118 + }
119 +
120 + if ( is_object( $page_structure_obj ) && method_exists( $page_structure_obj, 'is_top_path_show_version' ) ) {
121 + $is_show_version = $page_structure_obj->is_top_path_show_version();
122 + }
123 +
124 + if ( empty( $items ) ) {
125 + $items = array(
126 + array(
127 + 'title' => __( 'WP Booking Calendar', 'booking' ),
128 + 'url' => function_exists( 'wpbc_get_bookings_url' ) ? wpbc_get_bookings_url() : admin_url( 'admin.php?page=wpbc' ),
129 + 'onclick' => '',
130 + 'active' => false,
131 + ),
132 + array(
133 + 'title' => __( 'Settings', 'booking' ),
134 + 'onclick' => "wpbc_ui_settings__panel__click( '#wpbc_general_settings_dashboard_tab a' ,'#wpbc_general_settings_dashboard_metabox', '" . esc_attr__( 'Dashboard', 'booking' ) . "' );",
135 + 'url' => '',
136 + 'active' => false,
137 + ),
138 + array(
139 + 'title' => __( 'Dashboard', 'booking' ),
140 + 'onclick' => "wpbc_ui_settings__panel__click( '#wpbc_general_settings_dashboard_tab a' ,'#wpbc_general_settings_dashboard_metabox', '" . esc_attr__( 'Dashboard', 'booking' ) . "' );",
141 + 'url' => '',
142 + 'active' => true,
143 + ),
144 + );
145 + }
146 +
111 147 ?>
112 148 <div class="wpbc_settings_path">
113 149 <?php /* ?><div class="wpbc_settings_path_el" style="border: 1px solid #d0d0d0;margin-right: 15px;border-radius: 50%;aspect-ratio: 1 / 1;text-align: center;display: none;"> <a><i class="menu_icon icon-1x wpbc_icn_navigate_before"></i></a></div><?php */ ?>
114 - <div class="wpbc_settings_path_el">
115 - <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_dashboard_tab a' ,'#wpbc_general_settings_dashboard_metabox', '<?php echo esc_attr__( 'Dashboard', 'booking' ); ?>' );" href="javascript:void(0);"><?php
116 - esc_html_e('Settings', 'booking');
117 - ?></a>
118 - </div>
119 - <div class="wpbc_settings_path_el"><i class="menu_icon icon-1x wpbc_icn_navigate_next"></i></div>
120 - <div class="wpbc_settings_path_el wpbc_settings_path_el_active">
121 - <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_dashboard_tab a' ,'#wpbc_general_settings_dashboard_metabox', '<?php echo esc_attr__( 'Dashboard', 'booking' ); ?>' );" href="javascript:void(0);"><?php
122 - esc_html_e('Dashboard', 'booking');
123 - ?></a>
124 - </div>
125 - <?php wpbc_ui_settings_panel__top_path__version(); ?>
150 + <?php foreach ( $items as $item_index => $item ) : ?>
151 + <?php if ( 0 < $item_index ) : ?>
152 + <div class="wpbc_settings_path_el"><i class="menu_icon icon-1x wpbc_icn_navigate_next"></i></div>
153 + <?php endif; ?>
154 + <div class="wpbc_settings_path_el<?php echo ( ! empty( $item['active'] ) ) ? ' wpbc_settings_path_el_active' : ''; ?>">
155 + <a
156 + <?php if ( ! empty( $item['onclick'] ) ) : ?>
157 + onclick="javascript:<?php echo $item['onclick']; /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ ?>"
158 + href="javascript:void(0);"
159 + <?php else : ?>
160 + href="<?php echo esc_url( ! empty( $item['url'] ) ? $item['url'] : '#' ); ?>"
161 + <?php endif; ?>
162 + ><?php echo esc_html( $item['title'] ); ?></a>
163 + </div>
164 + <?php endforeach; ?>
165 + <?php
166 + if ( $is_show_version ) {
167 + wpbc_ui_settings_panel__top_path__version();
168 + }
169 + ?>
126 170 </div>
127 171 <?php
128 172 }
129 173
@@ -319,13 +363,13 @@
319 363
320 364 $title = esc_attr__( 'Calendar Settings', 'booking' );
321 365
322 366 if ( ! empty( $params['is_use_permalink'] ) ) {
323 - $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_calendar_tab';
367 + $permalink = function_exists( 'wpbc_get_settings_calendar_url' ) ? wpbc_get_settings_calendar_url() : wpbc_get_settings_url() . '&tab=calendar_settings';
324 368 $onclick = "";
325 369 } else {
326 - $permalink = 'javascript:void(0);';
327 - $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_calendar_tab a' ,'#wpbc_general_settings_calendar_metabox', '" . $title . "' );";
370 + $permalink = function_exists( 'wpbc_get_settings_calendar_url' ) ? wpbc_get_settings_calendar_url() : wpbc_get_settings_url() . '&tab=calendar_settings';
371 + $onclick = "";
328 372 }
329 373
330 374 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__calendar">
331 375 <div class="wpbc_ui_settings__text_row">
@@ -361,14 +405,13 @@
361 405 function wpbc_ui_settings_panel__card__days_selection( $params = array() ){
362 406
363 407 $title = esc_attr__( 'Days Selection', 'booking' );
364 408 if ( ! empty( $params['is_use_permalink'] ) ) {
365 - $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_calendar_tab';
409 + $permalink = function_exists( 'wpbc_get_settings_calendar_url' ) ? wpbc_get_settings_calendar_url() : wpbc_get_settings_url() . '&tab=calendar_settings';
366 410 $onclick = "";
367 411 } else {
368 - $permalink = 'javascript:void(0);';
369 - $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_calendar_tab a' ,'#wpbc_general_settings_calendar_metabox', '" . $title . "' );";
370 - $onclick .= "wpbc_blink_element('.wpbc_tr_set_gen_booking_type_of_day_selections', 4, 350); ";
412 + $permalink = function_exists( 'wpbc_get_settings_calendar_url' ) ? wpbc_get_settings_calendar_url() : wpbc_get_settings_url() . '&tab=calendar_settings';
413 + $onclick = "";
371 414 }
372 415
373 416 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__days_selection">
374 417 <div class="wpbc_ui_settings__text_row">
@@ -387,9 +430,9 @@
387 430 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
388 431 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
389 432 echo $onclick; ?>" href="<?php
390 433 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
391 - echo $permalink; ?>"> <?php esc_html_e( 'Choose how users can select days: single day, multiple days, or a date range with minimum and maximum limits.', 'booking' ); ?>
434 + echo $permalink; ?>"> <?php esc_html_e( 'Choose how users can select a single day, separate multiple days, or an unrestricted date range with two mouse clicks.', 'booking' ); ?>
392 435 </a>
393 436 </div>
394 437 </div><?php
395 438
@@ -408,20 +451,13 @@
408 451
409 452 $title = esc_attr__( 'Changeover Days', 'booking' );
410 453
411 454 if ( class_exists( 'wpdev_bk_biz_s' ) ) {
412 - $onclick = ' onclick="';
413 - $onclick .= "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_calendar_tab a' ,'#wpbc_general_settings_calendar_metabox', '" . $title . "' );";
414 - //$onclick .= " jQuery( '#type_of_day_selections_range').prop('checked',true).trigger('change'); "; // Enable Range Days selection
415 - //$onclick .= " jQuery( '#range_selection_type_dynamic').prop('checked',true).trigger('change'); "; // Enable Range Days selection
416 - $onclick .= " wpbc_blink_element('.wpbc_tr_set_gen_booking_range_selection_time_is_active', 4, 350); ";
417 - $onclick .= " wpbc_scroll_to('.wpbc_tr_set_gen_booking_range_selection_time_is_active' ); ";
418 - $onclick .= '" ';
455 + $onclick = '';
456 + $url = ' href="' . esc_url( function_exists( 'wpbc_get_settings_calendar_url' ) ? wpbc_get_settings_calendar_url() : wpbc_get_settings_url() . '&tab=calendar_settings' ) . '" ';
419 457
420 - $url = ' href="javascript:void(0);" ';
421 -
422 458 if ( ! empty( $params['is_use_permalink'] ) ) {
423 - $url = ' href="'. esc_url( wpbc_get_settings_url() ) . '&scroll_to_section=wpbc_general_settings_calendar_tab" '; // Direct link
459 + $url = ' href="'. esc_url( function_exists( 'wpbc_get_settings_calendar_url' ) ? wpbc_get_settings_calendar_url() : wpbc_get_settings_url() . '&tab=calendar_settings' ) . '" '; // Direct link
424 460 $onclick = "";
425 461 }
426 462
427 463 } else {
@@ -466,17 +502,13 @@
466 502 */
467 503 function wpbc_ui_settings_panel__card__tooltips_in_days( $params = array() ){
468 504
469 505 $title = esc_attr__( 'Day Tooltips', 'booking' );
506 + $permalink = function_exists( 'wpbc_settings_calendar__get_section_url' )
507 + ? wpbc_settings_calendar__get_section_url( 'tooltips' )
508 + : wpbc_get_settings_url() . '&tab=calendar_settings&wpbc_calendar_section=tooltips';
509 + $onclick = "";
470 510
471 - if ( ! empty( $params['is_use_permalink'] ) ) {
472 - $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_days_tooltips_tab';
473 - $onclick = "";
474 - } else {
475 - $permalink = 'javascript:void(0);';
476 - $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_days_tooltips_tab a' ,'#wpbc_general_settings_days_tooltips_metabox', '" . $title . "' );";
477 - }
478 -
479 511 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__tooltips_in_days">
480 512 <div class="wpbc_ui_settings__text_row">
481 513 <i class="menu_icon icon-1x wpbc-bi-chat-square-dots"></i>
482 514 <h1>
@@ -507,9 +539,9 @@
507 539 * @return void
508 540 */
509 541 function wpbc_ui_settings_panel__card__general_availability( $params = array() ){
510 542
511 - $title = esc_attr__( 'General Availability', 'booking' );
543 + $title = esc_attr__( 'Schedule & Rules', 'booking' );
512 544
513 545 $permalink = function_exists( 'wpbc_get_general_availability_url' ) ? wpbc_get_general_availability_url() : admin_url( 'admin.php?page=wpbc-availability&tab=general_availability' );
514 546 $onclick = "";
515 547
@@ -545,17 +577,11 @@
545 577 */
546 578 function wpbc_ui_settings_panel__card__capacity( $params = array() ){
547 579
548 580 $title = esc_attr__( 'Booking Capacity', 'booking' );
581 + $permalink = function_exists( 'wpbc_get_resource_capacity_url' ) ? wpbc_get_resource_capacity_url() : wpbc_get_resources_url() . '&tab=capacity';
582 + $onclick = "";
549 583
550 - if ( ! empty( $params['is_use_permalink'] ) ) {
551 - $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_capacity_tab';
552 - $onclick = "";
553 - } else {
554 - $permalink = 'javascript:void(0);';
555 - $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_capacity_tab a' ,'#wpbc_general_settings_capacity_metabox,#wpbc_general_settings_capacity_upgrade_metabox', '" . $title . "' );";
556 - }
557 -
558 584 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__capacity">
559 585 <div class="wpbc_ui_settings__text_row">
560 586 <i class="menu_icon icon-1x wpbc_icn_filter_none"></i>
561 587 <h1>
@@ -592,16 +618,9 @@
592 618 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__form"><?php
593 619
594 620 wpbc_ui_settings__panel_start();
595 621
596 - if ( WPBC_Frontend_Settings::is_bfb_enabled( null ) ) {
597 - wpbc_ui_settings_panel__card__bfb( $params );
598 - } else {
599 - wpbc_ui_settings_panel__card__form_fields( $params );
600 - wpbc_ui_settings_panel__card__time_fields( $params );
601 - wpbc_ui_settings_panel__card__time_slots_options( $params );
602 - wpbc_ui_settings_panel__card__form_options( $params );
603 - }
622 + wpbc_ui_settings_panel__card__bfb( $params );
604 623
605 624 wpbc_ui_settings__panel_end();
606 625
607 626 ?></div><?php
@@ -608,54 +627,18 @@
608 627
609 628 }
610 629
611 630 /**
612 - * Show == Dashboard Card - Booking Form Fields ==
631 + * Show == Dashboard Card - Booking Form Builder ==
613 632 *
614 633 * @return void
615 634 */
616 - function wpbc_ui_settings_panel__card__form_fields( $params = array() ){
617 -
618 - $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
619 - $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=form' ) . '" ';
620 -
621 - ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__form_fields">
622 - <div class="wpbc_ui_settings__text_row">
623 - <i class="menu_icon icon-1x wpbc_icn_dashboard"></i>
624 - <h1>
625 - <a onclick="<?php
626 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
627 - echo $onclick; ?>" <?php
628 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
629 - echo $url; ?>>
630 - <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Booking Form Fields','booking'); ?></span>
631 - </a>
632 - </h1>
633 - </div>
634 - <div class="wpbc_ui_settings__text_row">
635 - <a class="wpbc_ui_settings__text_color__black" onclick="<?php
636 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
637 - echo $onclick; ?>" <?php
638 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
639 - echo $url; ?>> <?php esc_html_e( 'Add, remove, or customize fields in your booking form.', 'booking' ); ?>
640 - </a>
641 - </div>
642 - </div><?php
643 -
644 - }
645 -
646 -
647 - /**
648 - * Show == Dashboard Card - Booking Form Fields ==
649 - *
650 - * @return void
651 - */
652 635 function wpbc_ui_settings_panel__card__bfb( $params = array() ){
653 636
654 637 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
655 638 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=builder_booking_form' ) . '" ';
656 639
657 - ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__form_fields">
640 + ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__bfb">
658 641 <div class="wpbc_ui_settings__text_row">
659 642 <i class="menu_icon icon-1x wpbc_icn_dashboard"></i>
660 643 <h1>
661 644 <a onclick="<?php
@@ -678,131 +661,8 @@
678 661 </div><?php
679 662
680 663 }
681 664
682 - /**
683 - * Show == Dashboard Card - Time Fields ==
684 - *
685 - * @return void
686 - */
687 - function wpbc_ui_settings_panel__card__time_fields( $params = array() ){
688 -
689 - $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
690 - $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=form&field_type=timeslots' ) . '" ';
691 -
692 - ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__time_fields">
693 - <div class="wpbc_ui_settings__text_row">
694 - <i class="menu_icon icon-1x wpbc_icn_schedule"></i>
695 - <h1>
696 - <a onclick="<?php
697 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
698 - echo $onclick; ?>" <?php
699 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
700 - echo $url; ?>>
701 - <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Time Slot Configuration','booking'); ?></span>
702 - </a>
703 - </h1>
704 - </div>
705 - <div class="wpbc_ui_settings__text_row">
706 - <a class="wpbc_ui_settings__text_color__black" onclick="<?php
707 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
708 - echo $onclick; ?>" <?php
709 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
710 - echo $url; ?>> <?php esc_html_e( 'Enable and configure time selection fields in your booking form.', 'booking' ); ?>
711 - </a>
712 - </div>
713 - </div><?php
714 -
715 - }
716 -
717 -
718 - /**
719 - * Show == Dashboard Card - Form Options ==
720 - *
721 - * @return void
722 - */
723 - function wpbc_ui_settings_panel__card__form_options( $params = array() ){
724 -
725 - $title = esc_attr__( 'Booking Form Options', 'booking' );
726 -
727 - if ( ! empty( $params['is_use_permalink'] ) ) {
728 - $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_form_tab';
729 - $onclick = '';
730 - } else {
731 - $permalink = 'javascript:void(0);';
732 - $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_form_tab a' ,'#wpbc_general_settings_form_metabox', '" . $title . "' );";
733 - }
734 - $onclick = '';
735 - $permalink = wpbc_get_settings_url() . '&tab=form&subtab=form_options';
736 -
737 - ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__form_options">
738 - <div class="wpbc_ui_settings__text_row">
739 - <i class="menu_icon icon-1x wpbc-bi-toggle2-off"></i>
740 - <h1>
741 - <a onclick="<?php
742 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
743 - echo $onclick; ?>" href="<?php
744 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
745 - echo $permalink; ?>">
746 - <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
747 - </a>
748 - </h1>
749 - </div>
750 - <div class="wpbc_ui_settings__text_row">
751 - <a class="wpbc_ui_settings__text_color__black" onclick="<?php
752 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
753 - echo $onclick; ?>" href="<?php
754 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
755 - echo $permalink; ?>">
756 - <?php esc_html_e( 'Enable CAPTCHA, auto-fill fields, and customize the form\'s color theme.', 'booking' ); ?>
757 - </a>
758 - </div>
759 - </div><?php
760 - }
761 -
762 - /**
763 - * Show == Dashboard Card - Time Slots Options ==
764 - *
765 - * @return void
766 - */
767 - function wpbc_ui_settings_panel__card__time_slots_options( $params = array() ){
768 -
769 - $title = esc_attr__( 'Time Slot Appearance', 'booking' );
770 -
771 - if ( ! empty( $params['is_use_permalink'] ) ) {
772 - $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_time_slots_tab';
773 - $onclick = '';
774 - } else {
775 - $permalink = 'javascript:void(0);';
776 - $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_time_slots_tab a' ,'#wpbc_general_settings_time_slots_metabox', '" . $title . "' );";
777 - }
778 - $permalink = wpbc_get_settings_url() . '&tab=color_themes';
779 - $onclick = '';
780 -
781 - ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__time_slots_options">
782 - <div class="wpbc_ui_settings__text_row">
783 - <i class="menu_icon icon-1x wpbc_icn_more_time"></i>
784 - <h1>
785 - <a onclick="<?php
786 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
787 - echo $onclick; ?>" href="<?php
788 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
789 - echo $permalink; ?>">
790 - <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
791 - </a>
792 - </h1>
793 - </div>
794 - <div class="wpbc_ui_settings__text_row">
795 - <a class="wpbc_ui_settings__text_color__black" onclick="<?php
796 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
797 - echo $onclick; ?>" href="<?php
798 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
799 - echo $permalink; ?>"> <?php esc_html_e( 'Choose how time slots are shown in the form: as a dropdown list or a time picker, and set a color theme.', 'booking' ); ?>
800 - </a>
801 - </div>
802 - </div><?php
803 - }
804 -
805 665 // ---------------------------------------------------------------------------------------------------------------------
806 666
807 667 /**
808 668 * Show Settings = Booking Confirmation = Panel
@@ -2058,15 +1918,20 @@
2058 1918 </div>
2059 1919 <?php
2060 1920 }
2061 1921
2062 - function wpbc_ui_settings_panel__card__setup_wizard() {
2063 - ?>
2064 - <div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2065 - <div class="wpbc_ui_settings__center wpbc_container wpbc_container_booking_form">
2066 - <a class="wpbc_button_light button-primary wpbc_button_green tooltip_top" style="padding: 12px 24px;"
2067 - title="<?php echo esc_attr( sprintf( __('We\'ll guide you through the steps to set up WP Booking Calendar on your site.','booking'), '<strong>WP Booking Calendar</strong>' ) ); ?>"
2068 - href="<?php echo esc_url( wpbc_get_settings_url() . '&wpbc_setup_wizard=reset&_wpnonce=' . wp_create_nonce( 'wpbc_settings_url_nonce' ) ); ?>"><?php
1922 + /**
1923 + * Render the administration card that opens the Setup Wizard.
1924 + *
1925 + * @return void
1926 + */
1927 + function wpbc_ui_settings_panel__card__setup_wizard() {
1928 + ?>
1929 + <div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
1930 + <div class="wpbc_ui_settings__center">
1931 + <a class="wpbc_admin_button wpbc_admin_button--success tooltip_top"
1932 + title="<?php echo esc_attr( sprintf( __('We\'ll guide you through the steps to set up WP Booking Calendar on your site.','booking'), '<strong>WP Booking Calendar</strong>' ) ); ?>"
1933 + href="<?php echo esc_url( wpbc_get_settings_url() . '&wpbc_setup_wizard=reset&_wpnonce=' . wp_create_nonce( 'wpbc_settings_url_nonce' ) ); ?>"><?php
2069 1934 esc_html_e( 'Start Setup Wizard', 'booking' )
2070 1935 ?></a>
2071 1936 </div>
2072 1937 </div>
@@ -2072,8 +1937,42 @@
2072 1937 </div>
2073 1938 <?php
2074 1939 }
2075 1940
1941 +
1942 + /**
1943 + * Show the starter-page testing action.
1944 + *
1945 + * The manual starter-page action is intentionally available only on a site
1946 + * retained as a genuine first installation with at least one currently valid
1947 + * starter page. It reopens the dialog without changing its automatic prompt
1948 + * state and never creates or repairs a missing page.
1949 + *
1950 + * @return void
1951 + */
1952 + function wpbc_ui_settings_panel__card__open_test_pages_popup() {
1953 +
1954 + $can_open_booking_pages = class_exists( 'WPBC_Setup_Wizard_First_Run_Popup' ) && WPBC_Setup_Wizard_First_Run_Popup::can_manually_open_booking_pages_dialog();
1955 +
1956 + if ( $can_open_booking_pages ) :
1957 + ?>
1958 + <div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
1959 + <div class="wpbc_ui_settings__center">
1960 + <button
1961 + type="button"
1962 + class="wpbc_admin_button wpbc_admin_button--primary"
1963 + data-wpbc-booking-pages-open-dialog="1"
1964 + >
1965 + <?php
1966 + esc_html_e( 'Test your booking pages', 'booking' ); ?>
1967 + </button>
1968 + </div>
1969 + </div>
1970 + <?php
1971 + endif;
1972 +
1973 + }
1974 +
2076 1975 function wpbc_ui_settings_panel__card__transaltion_download() {
2077 1976 ?>
2078 1977 <div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2079 1978 <div class="wpbc_ui_settings__center">
@@ -2107,9 +2006,11 @@
2107 2006
2108 2007 /**
2109 2008 * Show Version card in top panel
2110 2009 *
2111 - * @return void
2010 + * @param array $params_btn Optional version-card presentation parameters.
2011 + *
2012 + * @return void
2112 2013 */
2113 2014 function wpbc_ui_settings_panel__card__version( $params_btn = array() ){
2114 2015
2115 2016 $defaults = array(
@@ -2152,12 +2053,12 @@
2152 2053 echo $version_title
2153 2054 ?></a>
2154 2055 </div>
2155 2056
2156 - <?php if ( $params_btn['is_show_wizard_button'] ) { ?>
2157 - <div class="wpbc_ui_settings__center wpbc_container wpbc_container_booking_form" style="flex: 1 1 auto;">
2158 - <a class="wpbc_button_light button-primary wpbc_button_green tooltip_top" style="padding: 12px 24px;"
2159 - title="<?php echo esc_attr( sprintf( __('We\'ll guide you through the steps to set up WP Booking Calendar on your site.','booking'), '<strong>WP Booking Calendar</strong>' ) ); ?>"
2057 + <?php if ( $params_btn['is_show_wizard_button'] ) { ?>
2058 + <div class="wpbc_ui_settings__center" style="flex: 1 1 auto;">
2059 + <a class="wpbc_admin_button wpbc_admin_button--success tooltip_top"
2060 + title="<?php echo esc_attr( sprintf( __('We\'ll guide you through the steps to set up WP Booking Calendar on your site.','booking'), '<strong>WP Booking Calendar</strong>' ) ); ?>"
2160 2061 href="<?php echo esc_url( wpbc_get_settings_url() . '&wpbc_setup_wizard=reset&_wpnonce=' . wp_create_nonce( 'wpbc_settings_url_nonce' ) ); ?>"><?php
2161 2062 esc_html_e( 'Start Setup Wizard', 'booking' )
2162 2063 ?></a>
2163 2064 </div>
@@ -2195,9 +2096,12 @@
2195 2096 <div class="wpbc_settings_path_el wpbc_ui_settings__flex_container" style="margin-left:auto;flex-flow: row nowrap;">
2196 2097 <a class="" href="https://wpbookingcalendar.com/changelog/#<?php
2197 2098 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2198 2099 echo wpbc_get_slug_format( trim( wpbc_dashboard_info_get_version_type_readable() . '_' . wpbc_dashboard_info_get_version_type_sites() . '_' . esc_attr( WP_BK_VERSION_NUM ) ) ); ?>">
2199 - <span class="wpbc_ui_settings__text_color__green"><i class="menu_icon icon-1x wpbc_icn_numbers -bi-balloon-heart bi-activity"></i> <?php echo esc_attr( WP_BK_VERSION_NUM ); ?></span>
2100 + <span class="wpbc_ui_settings__text_color__green"><i class="menu_icon icon-1x wpbc_icn_numbers -bi-balloon-heart bi-activity"></i> <?php
2101 + // echo esc_attr( WP_BK_VERSION_NUM );
2102 + echo esc_attr( wpbc_get_wpbc_versions_numbers() );
2103 + ?></span>
2200 2104 </a>
2201 2105 <a class="wpbc_ui_settings__text_color__purple2" style="margin-left:1em;"
2202 2106 href="https://wpbookingcalendar.com/faq/difference-single-developer-multi-site/#<?php
2203 2107 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped