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 +137 -238 10.15.711.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,17 +539,12 @@
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 - if ( ! empty( $params['is_use_permalink'] ) ) {
514 - $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_availability_tab';
515 - $onclick = "";
516 - } else {
517 - $permalink = 'javascript:void(0);';
518 - $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_availability_tab a' ,'#wpbc_general_settings_availability_metabox', '" . $title . "' );";
519 - }
545 + $permalink = function_exists( 'wpbc_get_general_availability_url' ) ? wpbc_get_general_availability_url() : admin_url( 'admin.php?page=wpbc-availability&tab=general_availability' );
546 + $onclick = "";
520 547
521 548 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__general_availability">
522 549 <div class="wpbc_ui_settings__text_row">
523 550 <i class="menu_icon icon-1x wpbc-bi-calendar-check bi-calendar2-day"></i>
@@ -550,17 +577,11 @@
550 577 */
551 578 function wpbc_ui_settings_panel__card__capacity( $params = array() ){
552 579
553 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 = "";
554 583
555 - if ( ! empty( $params['is_use_permalink'] ) ) {
556 - $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_capacity_tab';
557 - $onclick = "";
558 - } else {
559 - $permalink = 'javascript:void(0);';
560 - $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 . "' );";
561 - }
562 -
563 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">
564 585 <div class="wpbc_ui_settings__text_row">
565 586 <i class="menu_icon icon-1x wpbc_icn_filter_none"></i>
566 587 <h1>
@@ -597,16 +618,9 @@
597 618 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__form"><?php
598 619
599 620 wpbc_ui_settings__panel_start();
600 621
601 - if ( WPBC_Frontend_Settings::is_bfb_enabled( null ) ) {
602 - wpbc_ui_settings_panel__card__bfb( $params );
603 - } else {
604 - wpbc_ui_settings_panel__card__form_fields( $params );
605 - wpbc_ui_settings_panel__card__time_fields( $params );
606 - wpbc_ui_settings_panel__card__time_slots_options( $params );
607 - wpbc_ui_settings_panel__card__form_options( $params );
608 - }
622 + wpbc_ui_settings_panel__card__bfb( $params );
609 623
610 624 wpbc_ui_settings__panel_end();
611 625
612 626 ?></div><?php
@@ -613,54 +627,18 @@
613 627
614 628 }
615 629
616 630 /**
617 - * Show == Dashboard Card - Booking Form Fields ==
631 + * Show == Dashboard Card - Booking Form Builder ==
618 632 *
619 633 * @return void
620 634 */
621 - function wpbc_ui_settings_panel__card__form_fields( $params = array() ){
622 -
623 - $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
624 - $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=form' ) . '" ';
625 -
626 - ?><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">
627 - <div class="wpbc_ui_settings__text_row">
628 - <i class="menu_icon icon-1x wpbc_icn_dashboard"></i>
629 - <h1>
630 - <a onclick="<?php
631 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
632 - echo $onclick; ?>" <?php
633 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
634 - echo $url; ?>>
635 - <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Booking Form Fields','booking'); ?></span>
636 - </a>
637 - </h1>
638 - </div>
639 - <div class="wpbc_ui_settings__text_row">
640 - <a class="wpbc_ui_settings__text_color__black" onclick="<?php
641 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
642 - echo $onclick; ?>" <?php
643 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
644 - echo $url; ?>> <?php esc_html_e( 'Add, remove, or customize fields in your booking form.', 'booking' ); ?>
645 - </a>
646 - </div>
647 - </div><?php
648 -
649 - }
650 -
651 -
652 - /**
653 - * Show == Dashboard Card - Booking Form Fields ==
654 - *
655 - * @return void
656 - */
657 635 function wpbc_ui_settings_panel__card__bfb( $params = array() ){
658 636
659 637 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
660 638 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=builder_booking_form' ) . '" ';
661 639
662 - ?><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">
663 641 <div class="wpbc_ui_settings__text_row">
664 642 <i class="menu_icon icon-1x wpbc_icn_dashboard"></i>
665 643 <h1>
666 644 <a onclick="<?php
@@ -683,131 +661,8 @@
683 661 </div><?php
684 662
685 663 }
686 664
687 - /**
688 - * Show == Dashboard Card - Time Fields ==
689 - *
690 - * @return void
691 - */
692 - function wpbc_ui_settings_panel__card__time_fields( $params = array() ){
693 -
694 - $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
695 - $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=form&field_type=timeslots' ) . '" ';
696 -
697 - ?><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">
698 - <div class="wpbc_ui_settings__text_row">
699 - <i class="menu_icon icon-1x wpbc_icn_schedule"></i>
700 - <h1>
701 - <a onclick="<?php
702 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
703 - echo $onclick; ?>" <?php
704 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
705 - echo $url; ?>>
706 - <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Time Slot Configuration','booking'); ?></span>
707 - </a>
708 - </h1>
709 - </div>
710 - <div class="wpbc_ui_settings__text_row">
711 - <a class="wpbc_ui_settings__text_color__black" onclick="<?php
712 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
713 - echo $onclick; ?>" <?php
714 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
715 - echo $url; ?>> <?php esc_html_e( 'Enable and configure time selection fields in your booking form.', 'booking' ); ?>
716 - </a>
717 - </div>
718 - </div><?php
719 -
720 - }
721 -
722 -
723 - /**
724 - * Show == Dashboard Card - Form Options ==
725 - *
726 - * @return void
727 - */
728 - function wpbc_ui_settings_panel__card__form_options( $params = array() ){
729 -
730 - $title = esc_attr__( 'Booking Form Options', 'booking' );
731 -
732 - if ( ! empty( $params['is_use_permalink'] ) ) {
733 - $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_form_tab';
734 - $onclick = '';
735 - } else {
736 - $permalink = 'javascript:void(0);';
737 - $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_form_tab a' ,'#wpbc_general_settings_form_metabox', '" . $title . "' );";
738 - }
739 - $onclick = '';
740 - $permalink = wpbc_get_settings_url() . '&tab=form&subtab=form_options';
741 -
742 - ?><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">
743 - <div class="wpbc_ui_settings__text_row">
744 - <i class="menu_icon icon-1x wpbc-bi-toggle2-off"></i>
745 - <h1>
746 - <a onclick="<?php
747 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
748 - echo $onclick; ?>" href="<?php
749 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
750 - echo $permalink; ?>">
751 - <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
752 - </a>
753 - </h1>
754 - </div>
755 - <div class="wpbc_ui_settings__text_row">
756 - <a class="wpbc_ui_settings__text_color__black" onclick="<?php
757 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
758 - echo $onclick; ?>" href="<?php
759 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
760 - echo $permalink; ?>">
761 - <?php esc_html_e( 'Enable CAPTCHA, auto-fill fields, and customize the form\'s color theme.', 'booking' ); ?>
762 - </a>
763 - </div>
764 - </div><?php
765 - }
766 -
767 - /**
768 - * Show == Dashboard Card - Time Slots Options ==
769 - *
770 - * @return void
771 - */
772 - function wpbc_ui_settings_panel__card__time_slots_options( $params = array() ){
773 -
774 - $title = esc_attr__( 'Time Slot Appearance', 'booking' );
775 -
776 - if ( ! empty( $params['is_use_permalink'] ) ) {
777 - $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_time_slots_tab';
778 - $onclick = '';
779 - } else {
780 - $permalink = 'javascript:void(0);';
781 - $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_time_slots_tab a' ,'#wpbc_general_settings_time_slots_metabox', '" . $title . "' );";
782 - }
783 - $permalink = wpbc_get_settings_url() . '&tab=color_themes';
784 - $onclick = '';
785 -
786 - ?><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">
787 - <div class="wpbc_ui_settings__text_row">
788 - <i class="menu_icon icon-1x wpbc_icn_more_time"></i>
789 - <h1>
790 - <a onclick="<?php
791 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
792 - echo $onclick; ?>" href="<?php
793 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
794 - echo $permalink; ?>">
795 - <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
796 - </a>
797 - </h1>
798 - </div>
799 - <div class="wpbc_ui_settings__text_row">
800 - <a class="wpbc_ui_settings__text_color__black" onclick="<?php
801 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
802 - echo $onclick; ?>" href="<?php
803 - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
804 - 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' ); ?>
805 - </a>
806 - </div>
807 - </div><?php
808 - }
809 -
810 665 // ---------------------------------------------------------------------------------------------------------------------
811 666
812 667 /**
813 668 * Show Settings = Booking Confirmation = Panel
@@ -2063,15 +1918,20 @@
2063 1918 </div>
2064 1919 <?php
2065 1920 }
2066 1921
2067 - function wpbc_ui_settings_panel__card__setup_wizard() {
2068 - ?>
2069 - <div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2070 - <div class="wpbc_ui_settings__center wpbc_container wpbc_container_booking_form">
2071 - <a class="wpbc_button_light button-primary wpbc_button_green tooltip_top" style="padding: 12px 24px;"
2072 - 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>' ) ); ?>"
2073 - 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
2074 1934 esc_html_e( 'Start Setup Wizard', 'booking' )
2075 1935 ?></a>
2076 1936 </div>
2077 1937 </div>
@@ -2077,8 +1937,42 @@
2077 1937 </div>
2078 1938 <?php
2079 1939 }
2080 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 +
2081 1975 function wpbc_ui_settings_panel__card__transaltion_download() {
2082 1976 ?>
2083 1977 <div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2084 1978 <div class="wpbc_ui_settings__center">
@@ -2112,9 +2006,11 @@
2112 2006
2113 2007 /**
2114 2008 * Show Version card in top panel
2115 2009 *
2116 - * @return void
2010 + * @param array $params_btn Optional version-card presentation parameters.
2011 + *
2012 + * @return void
2117 2013 */
2118 2014 function wpbc_ui_settings_panel__card__version( $params_btn = array() ){
2119 2015
2120 2016 $defaults = array(
@@ -2157,12 +2053,12 @@
2157 2053 echo $version_title
2158 2054 ?></a>
2159 2055 </div>
2160 2056
2161 - <?php if ( $params_btn['is_show_wizard_button'] ) { ?>
2162 - <div class="wpbc_ui_settings__center wpbc_container wpbc_container_booking_form" style="flex: 1 1 auto;">
2163 - <a class="wpbc_button_light button-primary wpbc_button_green tooltip_top" style="padding: 12px 24px;"
2164 - 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>' ) ); ?>"
2165 2061 href="<?php echo esc_url( wpbc_get_settings_url() . '&wpbc_setup_wizard=reset&_wpnonce=' . wp_create_nonce( 'wpbc_settings_url_nonce' ) ); ?>"><?php
2166 2062 esc_html_e( 'Start Setup Wizard', 'booking' )
2167 2063 ?></a>
2168 2064 </div>
@@ -2200,9 +2096,12 @@
2200 2096 <div class="wpbc_settings_path_el wpbc_ui_settings__flex_container" style="margin-left:auto;flex-flow: row nowrap;">
2201 2097 <a class="" href="https://wpbookingcalendar.com/changelog/#<?php
2202 2098 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2203 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 ) ) ); ?>">
2204 - <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>
2205 2104 </a>
2206 2105 <a class="wpbc_ui_settings__text_color__purple2" style="margin-left:1em;"
2207 2106 href="https://wpbookingcalendar.com/faq/difference-single-developer-multi-site/#<?php
2208 2107 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
@@ -2427,5 +2326,5 @@
2427 2326
2428 2327 break;
2429 2328 }
2430 2329
2431 - }
2330 + }