-
Notifications
You must be signed in to change notification settings - Fork 85
Welcome: Account for blog mode in profile setup step #1807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…c/wordpress-activitypub into update/welcome-profile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the welcome onboarding flow to properly handle Blog Only mode by marking the profile step complete and linking the “Edit profile” button to the blog-profile tab.
- Changed the primary button logic to target the correct next step (
profile_setup
). - Added a link and visited-flag update for Blog Only sites in the profile setup step.
- Included a changelog entry for the new behavior.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
includes/wp-admin/class-welcome-fields.php | Adjusted button primary logic and added Blog Only mode link |
includes/wp-admin/class-blog-settings-fields.php | Marked the profile step complete when visiting the blog-profile tab |
.github/changelog/1807-from-description | Added changelog entry |
Comments suppressed due to low confidence (3)
includes/wp-admin/class-welcome-fields.php:358
- [nitpick] The link label still reads “Edit profile” for blog-only sites—consider updating the text to “Edit blog profile” to make the target more explicit for users.
<?php elseif ( ACTIVITYPUB_BLOG_MODE === \get_option( 'activitypub_actor_mode' ) ) : ?>
includes/wp-admin/class-blog-settings-fields.php:31
- It would be good to add or update tests covering the blog-profile tab visit so that this
update_option
path is verified in the test suite.
\update_option( 'activitypub_checklist_profile_setup_visited', '1' );
includes/wp-admin/class-blog-settings-fields.php:30
- To avoid accidentally marking the profile step complete on unrelated admin pages, consider also checking that the current page is the ActivityPub settings page (e.g., verifying
$_GET['page'] === 'activitypub'
).
if ( isset( $_GET['tab'] ) && 'blog-profile' === \sanitize_key( $_GET['tab'] ) && ACTIVITYPUB_BLOG_MODE === \get_option( 'activitypub_actor_mode' ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that might be a rare case, because the actor mode is the default and you see the welcome screen normally only when installing the plugin.
Improves the experience for sites that picked Blog Only mode in the
profile_mode
step.Proposed changes:
Other information:
Testing instructions:
Changelog entry
Changelog Entry Details
Significance
Type
Message
The welcome page now links to the correct profile when Blog Only mode was selected in the profile mode step.