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 | core/class/wpbc-class-welcome.php +55 -18 11.6 → 11.9 View file →
@@ -241,22 +241,59 @@
241 241 $booking_activation_process = get_bk_option( 'booking_activation_process' );
242 242 if ( $booking_activation_process == 'On' )
243 243 return;
244 244
245 - // Bail if no activation redirect transient is set
246 - if ( ! get_transient( '_booking_activation_redirect' ) ) { // $.
245 + if ( function_exists( 'wp_doing_ajax' ) && wp_doing_ajax() ) {
247 246 return;
248 247 }
249 248
249 + $legacy_redirect = get_transient( '_booking_activation_redirect' );
250 + $redirect_intent = class_exists( 'WPBC_Setup_Wizard_First_Install_State' )
251 + ? get_transient( WPBC_Setup_Wizard_First_Install_State::ACTIVATION_INTENT_TRANSIENT )
252 + : false;
253 + $is_whats_new_intent = class_exists( 'WPBC_Setup_Wizard_First_Install_State' )
254 + && WPBC_Setup_Wizard_First_Install_State::is_whats_new_redirect_intent( $redirect_intent );
255 +
256 + // A genuine first-install intent belongs exclusively to the earlier Setup Wizard redirect handler.
257 + if (
258 + class_exists( 'WPBC_Setup_Wizard_First_Install_State' )
259 + && WPBC_Setup_Wizard_First_Install_State::is_first_install_redirect_intent( $redirect_intent )
260 + ) {
261 + return;
262 + }
263 +
264 + // Bail if neither the released boolean nor a current structured intent is set.
265 + if ( ! $legacy_redirect && ! $is_whats_new_intent ) { // $.
266 + return;
267 + }
268 + if (
269 + $is_whats_new_intent
270 + && ! WPBC_Setup_Wizard_First_Install_State::is_redirect_intent_for_current_user( $redirect_intent )
271 + ) {
272 + return;
273 + }
274 +
250 275 // Delete the redirect transient
251 276 delete_transient( '_booking_activation_redirect' );
277 + if ( class_exists( 'WPBC_Setup_Wizard_First_Install_State' ) ) {
278 + delete_transient( WPBC_Setup_Wizard_First_Install_State::ACTIVATION_INTENT_TRANSIENT );
279 + }
252 280
253 - // Bail if DEMO or activating from network, or bulk, or within an iFrame.
281 + // Bail for environments where automatic activation navigation is disabled.
282 + $is_redirect_restricted = class_exists( 'WPBC_Setup_Wizard_First_Install_State' )
283 + ? WPBC_Setup_Wizard_First_Install_State::is_automatic_onboarding_restricted()
284 + : (
285 + wpbc_is_this_demo()
286 + || ( defined( 'WPBC_IS_PLAYGROUND' ) && true === WPBC_IS_PLAYGROUND )
287 + || is_network_admin()
288 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only activation context detection.
289 + || isset( $_GET['activate-multi'] )
290 + || defined( 'IFRAME_REQUEST' )
291 + );
292 + if ( $is_redirect_restricted ) {
293 + return;
294 + }
254 295
255 - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
256 - if ( wpbc_is_this_demo() || is_network_admin() || isset( $_GET[ 'activate-multi' ] ) || defined( 'IFRAME_REQUEST' ) )
257 - return;
258 -
259 296 // Set mark, that we already redirected to About screen //FixIn: 5.4.5
260 297 $redirect_for_version = get_bk_option( 'booking_activation_redirect_for_version' );
261 298 if ( $redirect_for_version == WP_BK_VERSION_NUM )
262 299 return;
@@ -291,11 +328,9 @@
291 328 echo esc_html( $wpbc_starter_page['button_title'] ); ?></a>
292 329 <?php
293 330 }
294 331 } else {
295 - $wp_post_booking_absolute = function_exists( 'wpbc_stp_wiz__is_exist_published_page_with_booking_form' )
296 - ? wpbc_stp_wiz__is_exist_published_page_with_booking_form()
297 - : false;
332 + $wp_post_booking_absolute = false;
298 333 if ( ! empty( $wp_post_booking_absolute ) ) {
299 334 ?>
300 335 <a class="button button-secondary"
301 336 style="font-size: 20px;padding: 0 1em;height: 44px;line-height: 40px;"
@@ -317,16 +352,18 @@
317 352 $this->title_section();
318 353
319 354 $this->show_go_links();
320 355
321 - $this->maintence_section();
322 -
323 - $this->section_9_8_css();
324 -
325 - if ( function_exists( 'wpbc_is_11_6_features_enabled' ) && wpbc_is_11_6_features_enabled() ) {
326 - wpbc_welcome_section_11_6( $this );
327 - }
328 - wpbc_welcome_section_11_5( $this );
356 + $this->maintence_section();
357 +
358 + $this->section_9_8_css();
359 +
360 + wpbc_welcome_section_11_9( $this );
361 + wpbc_welcome_section_11_8_1( $this );
362 + wpbc_welcome_section_11_8( $this );
363 + wpbc_welcome_section_11_7( $this );
364 + wpbc_welcome_section_11_6( $this );
365 + wpbc_welcome_section_11_5( $this );
329 366 wpbc_welcome_section_11_4( $this );
330 367 wpbc_welcome_section_11_3( $this );
331 368 wpbc_welcome_section_11_2( $this );
332 369 wpbc_welcome_section_11_1( $this );