PluginProbe
Booking Calendar / 11.9
Booking Calendar v11.9
11.9 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 All 205 releases
booking / includes / page-setup-wizard / templates / shell.php

shell.php in Booking Calendar 11.9, at includes/page-setup-wizard/templates/shell.php

140 lines 5.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Full-screen Setup Wizard shell.
4 *
5 * @package Booking Calendar
6 * @var array<string,mixed> $template_context Authorized shell context.
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 $templates = $template_context['templates'];
14 $draft = $template_context['draft'];
15 $step_dialogs = isset( $template_context['step_data']['dialogs'] ) && is_array( $template_context['step_data']['dialogs'] )
16 ? $template_context['step_data']['dialogs']
17 : array();
18 ?>
19 <div
20 class="wpbc_setup_wizard"
21 data-wpbc-setup-wizard
22 data-step="<?php echo esc_attr( $draft['current_step'] ); ?>"
23 data-revision="<?php echo esc_attr( (string) $draft['revision'] ); ?>"
24 data-request-phase="idle"
25 aria-busy="false"
26 >
27 <header class="wpbc_setup_wizard__header wpbc_ui_el wpbc_ui_el__top_nav" aria-label="<?php esc_attr_e( 'Booking Calendar Setup Wizard', 'booking' ); ?>">
28 <?php
29 // Reuse the canonical Booking Calendar brand menu and all of its current items.
30 wpbc_ui__top_nav__dropdown__wpbc();
31 if ( ! empty( $template_context['header_template_id'] ) ) {
32 $templates->render(
33 $template_context['header_template_id'],
34 array(
35 'current_step' => $template_context['current_step'],
36 'step_data' => $template_context['step_data'],
37 )
38 );
39 }
40 ?>
41 <div class="wpbc_ui_el__make_space"></div>
42 <a
43 class="wpbc_setup_wizard__close"
44 href="<?php echo esc_url( $template_context['close_url'] ); ?>"
45 aria-label="<?php esc_attr_e( 'Close Setup Wizard and keep saved progress', 'booking' ); ?>"
46 >
47 <i class="menu_icon icon-1x wpbc_icn_close" aria-hidden="true"></i>
48 </a>
49 </header>
50
51 <div class="wpbc_setup_wizard__layout">
52 <?php $templates->render( 'rail', $template_context ); ?>
53 <main class="wpbc_setup_wizard__main" id="wpbc-setup-wizard-main" tabindex="-1">
54 <div class="wpbc_setup_wizard__stage wpbc_setup_wizard__stage--<?php echo esc_attr( $draft['current_step'] ); ?>">
55 <div
56 class="wpbc_setup_wizard__request-error wpbc_setup_wizard__message wpbc_setup_wizard__message--error"
57 data-wpbc-setup-wizard-request-error
58 role="alert"
59 aria-live="assertive"
60 aria-atomic="true"
61 tabindex="-1"
62 hidden
63 >
64 <i class="menu_icon icon-1x wpbc_icn_error_outline" aria-hidden="true"></i>
65 <div class="wpbc_setup_wizard__request-error-content">
66 <h2><?php esc_html_e( 'This step could not be saved', 'booking' ); ?></h2>
67 <p data-wpbc-setup-wizard-request-error-message></p>
68 <p class="wpbc_setup_wizard__request-error-reference" data-wpbc-setup-wizard-request-error-reference hidden>
69 <?php esc_html_e( 'Reference:', 'booking' ); ?>
70 <code data-wpbc-setup-wizard-request-error-request-id></code>
71 </p>
72 </div>
73 <button
74 type="button"
75 class="wpbc_setup_wizard__request-error-dismiss"
76 data-wpbc-setup-wizard-dismiss-error
77 aria-label="<?php esc_attr_e( 'Dismiss this error', 'booking' ); ?>"
78 >
79 <i class="menu_icon icon-1x wpbc_icn_close" aria-hidden="true"></i>
80 </button>
81 </div>
82 <?php
83 $templates->render(
84 $template_context['step_template_id'],
85 array(
86 'current_step' => $template_context['current_step'],
87 'draft' => $draft,
88 'step_data' => $template_context['step_data'],
89 'templates' => $templates,
90 'settings_hint' => isset( $template_context['settings_hint'] ) && is_array( $template_context['settings_hint'] ) ? $template_context['settings_hint'] : array(),
91 )
92 );
93 ?>
94 </div>
95 </main>
96 </div>
97
98 <?php $templates->render( 'footer', $template_context ); ?>
99 <?php
100 $templates->render(
101 'confirmation-dialog',
102 array(
103 'dialog_id' => 'wpbc-setup-wizard-restart-dialog',
104 'action' => 'restart',
105 'title' => __( 'Restart the Setup Wizard?', 'booking' ),
106 'description' => __( 'This restarts wizard navigation, recommendations, and editable wizard values while retaining operation history. It does not restore or roll back Booking Calendar settings or separately completed actions.', 'booking' ),
107 'confirm_label' => __( 'Restart Wizard', 'booking' ),
108 )
109 );
110 $templates->render(
111 'confirmation-dialog',
112 array(
113 'dialog_id' => 'wpbc-setup-wizard-skip-dialog',
114 'action' => 'skip',
115 'title' => __( 'Skip the remaining setup steps?', 'booking' ),
116 'description' => __( 'This marks every remaining Setup Wizard step as skipped, completes the setup, and opens Setup overview. Settings and actions already saved remain active. Unsaved changes on this page will not be saved.', 'booking' ),
117 'confirm_label' => __( 'Skip Setup Wizard', 'booking' ),
118 )
119 );
120 foreach ( $step_dialogs as $step_dialog ) {
121 if ( ! is_array( $step_dialog ) ) {
122 continue;
123 }
124
125 $templates->render( 'confirmation-dialog', $step_dialog );
126 }
127 ?>
128 <div
129 class="wpbc_setup_wizard__transition"
130 data-wpbc-setup-wizard-transition
131 aria-hidden="true"
132 >
133 <div class="wpbc_setup_wizard__transition-panel">
134 <span class="spinner is-active" aria-hidden="true"></span>
135 <span data-wpbc-setup-wizard-transition-message><?php esc_html_e( 'Saving setup progress...', 'booking' ); ?></span>
136 </div>
137 </div>
138 <p class="wpbc_setup_wizard__status" role="status" aria-live="polite" aria-atomic="true" data-wpbc-setup-wizard-status></p>
139 </div>
140