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
← All changes | includes/booking_modes_v3/booking_modes-toolbar.php +24 -3 11.8 → 11.9 View file →
@@ -142,8 +142,29 @@
142 142 }
143 143 add_action( 'wpbc_ui_el__top_nav__content_start', 'wpbc_booking_modes_render_toolbar_selector', 5, 3 );
144 144
145 145 /**
146 + * Check whether the QuickStart notice belongs on the current administration route.
147 + *
148 + * Form Builder has its own focused editing workflow and action toolbar. Keeping
149 + * the content-provisioning notice out of that route prevents it from covering
150 + * the Builder canvas while leaving QuickStart available on other eligible
151 + * Booking Calendar screens.
152 + *
153 + * @param string $page_tag Current Booking Calendar page slug.
154 + * @param string $active_page_tab Current active tab slug.
155 + *
156 + * @return bool True when the current route may render QuickStart.
157 + */
158 +function wpbc_booking_modes_is_quickstart_route_allowed( $page_tag, $active_page_tab ) {
159 + if ( 'wpbc-setup' === (string) $page_tag ) {
160 + return false;
161 + }
162 +
163 + return ! ( 'wpbc-settings' === (string) $page_tag && 'builder_booking_form' === (string) $active_page_tab );
164 +}
165 +
166 +/**
146 167 * Render the explicit QuickStart notice in the floating admin-message stack.
147 168 *
148 169 * Mode selection remains a presentation-only operation. QuickStart uses a
149 170 * standard WordPress notice with standard buttons because it can create site
@@ -158,13 +179,13 @@
158 179 * @return void
159 180 */
160 181 function wpbc_booking_modes_render_quickstart_action( $page_tag, $active_page_tab, $active_page_subtab ) {
161 182
162 - unset( $page_tag, $active_page_tab, $active_page_subtab );
163 -
164 - if ( function_exists( 'wpbc_setup_wizard_page__is_in_progress' ) && wpbc_setup_wizard_page__is_in_progress() ) {
183 + if ( ! wpbc_booking_modes_is_quickstart_route_allowed( $page_tag, $active_page_tab ) ) {
165 184 return;
166 185 }
186 +
187 + unset( $active_page_subtab );
167 188
168 189 if ( function_exists( 'wpbc_is_this_demo' ) && wpbc_is_this_demo() ) {
169 190 return;
170 191 }