Skip to content

feat(onboarding): support TI_ONBOARDING_DEFAULT_SITE redirect#459

Merged
selul merged 1 commit intodevelopmentfrom
feat/onboarding-default-site-redirect
Apr 23, 2026
Merged

feat(onboarding): support TI_ONBOARDING_DEFAULT_SITE redirect#459
selul merged 1 commit intodevelopmentfrom
feat/onboarding-default-site-redirect

Conversation

@selul
Copy link
Copy Markdown
Contributor

@selul selul commented Apr 23, 2026

Summary

Adds a new opt-in mechanism to deep-link the onboarding wizard straight to the preview/import screen for a specific starter site.

  • When the PHP constant TI_ONBOARDING_DEFAULT_SITE is defined, Admin::activation_redirect() now sends users to admin.php?page=neve-onboarding&site=<slug> instead of the welcome/search screen.
  • The onboarding store reads ?site=<slug> on boot, looks the slug up across all builders in tiobDash.onboarding.sites.sites, and starts at step 3 (CustomizeSite / preview + Import) with currentSite preset.
  • If the slug is missing or unknown, behaviour falls back to the existing search screen (no broken state).

Use case: distributions and embedded environments (e.g. WordPress Playground demos) that want to drop a user directly into the import flow for a chosen site.

Test plan

  • Without the constant: re-activate the plugin and confirm the redirect still goes to ?page=neve-onboarding&show=welcome (welcome step).
  • With define( 'TI_ONBOARDING_DEFAULT_SITE', 'web-design-agency' ); in wp-config.php: re-activate the plugin and confirm the redirect goes to ?page=neve-onboarding&site=web-design-agency, app boots on the preview screen with the site preselected and the Import panel visible.
  • Open ?page=neve-onboarding&site=does-not-exist directly: app falls back to the search screen instead of breaking.

When the TI_ONBOARDING_DEFAULT_SITE constant is defined, the
post-activation redirect now lands on the preview/import screen for
that site (admin.php?page=neve-onboarding&site=<slug>) instead of the
default search/welcome screen. The onboarding store resolves the
?site=<slug> query param against the bootstrapped sites list (across
all builders) and starts at step 3 with currentSite preset; if the
slug is unknown the app falls back to the existing search screen.

This lets distributions and embedded environments (e.g. WordPress
Playground) deep-link a user straight to the import flow for a chosen
starter site.

Made-with: Cursor
@pirate-bot pirate-bot added the pr-checklist-incomplete The Pull Request checklist is incomplete. (automatic label) label Apr 23, 2026
@pirate-bot
Copy link
Copy Markdown
Collaborator

Plugin build for 71ed2bd is ready 🛎️!

@selul selul merged commit 42ca3d8 into development Apr 23, 2026
6 of 9 checks passed
@selul selul deleted the feat/onboarding-default-site-redirect branch April 23, 2026 11:18
@pirate-bot
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 1.2.27 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-incomplete The Pull Request checklist is incomplete. (automatic label) released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants