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 +45 -7 11.8.4 → 11.9 View file →
@@ -1,4 +1,4 @@
1 1 <?php
2 2 /**
3 3 * Welcome Page Class
4 4 * Shows a feature overview for the new version (major).
@@ -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;
@@ -319,8 +356,9 @@
319 356 $this->maintence_section();
320 357
321 358 $this->section_9_8_css();
322 359
360 + wpbc_welcome_section_11_9( $this );
323 361 wpbc_welcome_section_11_8_1( $this );
324 362 wpbc_welcome_section_11_8( $this );
325 363 wpbc_welcome_section_11_7( $this );
326 364 wpbc_welcome_section_11_6( $this );