Redirect immediately to onboarding when activating a single plugin#2046
Conversation
WalkthroughThe Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- classes/controllers/FrmOnboardingWizardController.php (4 hunks)
🧰 Additional context used
🔇 Additional comments (5)
classes/controllers/FrmOnboardingWizardController.php (5)
49-49: Comment addition is informative and clear.The added comment clearly specifies that the transient value is used when activating a single plugin, which enhances code readability.
55-62: Addition ofTRANSIENT_MULTI_VALUEconstant is well-documented.The new constant
TRANSIENT_MULTI_VALUEfor handling multiple plugin activations is properly defined with comprehensive documentation.
157-159: Logical check prevents unnecessary redirects effectively.The condition
if ( self::has_onboarding_been_skipped() || FrmAppHelper::pro_is_connected() )ensures that users who have already skipped onboarding or are connected to Pro are not redirected again.
161-165: Transient value validation is correctly implemented.The check for both
TRANSIENT_VALUEandTRANSIENT_MULTI_VALUEcorrectly handles redirection scenarios for single and multiple plugin activations.
176-177: Conditional logic for multi-plugin activation is appropriate.The condition ensures that after multiple plugins are activated, the user is only redirected when accessing a Formidable admin page, enhancing user experience.
shervElmi
left a comment
There was a problem hiding this comment.
Thanks @Crabcyborg, It looks great to me! 🚀
|
Thanks Sherv! |
…sient
Fixes https://github.com/Strategy11/formidable-pro/issues/5411
Now we only avoid redirecting immediately when we are not bulk-activating. If the plugin is activated when bulk-activating, we fallback to the old behaviour, where we check for a Formidable admin page.