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 +60 -11 10.15.7 → 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;
@@ -275,9 +312,9 @@
275 312 <div style="display: flex;flex-flow: row wrap;justify-content: center;gap: 2em;margin: 3em 0 1em;">
276 313 <a class="button button-primary"
277 314 href="<?php
278 315 echo esc_url( wpbc_get_bookings_url() . '&tab=vm_booking_listing' ); ?>"
279 - style="font-size: 20px;padding: 0.15em 1.5em;"><?php
316 + style="font-size: 20px;padding: 0 1em;height: 44px;line-height: 40px;"><?php
280 317 esc_html_e( 'Go to Booking Admin Panel', 'booking' ); ?></a>
281 318 <?php
282 319 $wpbc_starter_pages = function_exists( 'wpbc_get_published_activation_booking_pages' ) ? wpbc_get_published_activation_booking_pages() : array();
283 320 if ( ! empty( $wpbc_starter_pages ) ) {
@@ -283,9 +320,9 @@
283 320 if ( ! empty( $wpbc_starter_pages ) ) {
284 321 foreach ( $wpbc_starter_pages as $wpbc_starter_page ) {
285 322 ?>
286 323 <a class="button button-secondary"
287 - style="font-size: 20px;padding: 0.15em 1em;"
324 + style="font-size: 20px;padding: 0 1em;height: 44px;line-height: 40px;"
288 325 href="<?php
289 326 echo esc_url( $wpbc_starter_page['url'] ); ?>"
290 327 ><?php
291 328 echo esc_html( $wpbc_starter_page['button_title'] ); ?></a>
@@ -291,13 +328,13 @@
291 328 echo esc_html( $wpbc_starter_page['button_title'] ); ?></a>
292 329 <?php
293 330 }
294 331 } else {
295 - $wp_post_booking_absolute = wpbc_stp_wiz__is_exist_published_page_with_booking_form();
332 + $wp_post_booking_absolute = false;
296 333 if ( ! empty( $wp_post_booking_absolute ) ) {
297 334 ?>
298 335 <a class="button button-secondary"
299 - style="font-size: 20px;padding: 0.15em 1em;"
336 + style="font-size: 20px;padding: 0 1em;height: 44px;line-height: 40px;"
300 337 href="<?php
301 338 echo esc_url( $wp_post_booking_absolute ); ?>"
302 339 ><?php
303 340 esc_html_e( 'Go to page with booking form', 'booking' ); ?></a>
@@ -319,8 +356,19 @@
319 356 $this->maintence_section();
320 357
321 358 $this->section_9_8_css();
322 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 );
366 + wpbc_welcome_section_11_4( $this );
367 + wpbc_welcome_section_11_3( $this );
368 + wpbc_welcome_section_11_2( $this );
369 + wpbc_welcome_section_11_1( $this );
370 + wpbc_welcome_section_11_0( $this );
323 371 wpbc_welcome_section_10_15( $this );
324 372 wpbc_welcome_section_10_14( $this );
325 373 wpbc_welcome_section_10_13( $this );
326 374
@@ -371,8 +419,9 @@
371 419 }
372 420
373 421
374 422 function section_img_url( $relative_path_to_img ) {
423 +
375 424 return esc_url( $this->asset_path . $relative_path_to_img );
376 425 }
377 426
378 427