-
Notifications
You must be signed in to change notification settings - Fork 800
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
Point "Howdy" link to /me on Default sites #39113
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance! |
@@ -60,6 +60,17 @@ public function add_node( $args ) { | |||
return; | |||
} | |||
|
|||
if ( $args['id'] === 'my-account' ) { | |||
if ( ! is_user_member_of_blog() || get_option( 'wpcom_admin_interface' ) !== 'wp-admin' ) { |
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.
I extracted the logic from here:
jetpack/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.php
Line 176 in 9b6a4f5
if ( ! is_user_member_of_blog() || get_option( 'wpcom_admin_interface' ) !== 'wp-admin' ) { |
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.
Working as expected 🚀
Before
Screen.Recording.2567-08-28.at.16.13.19.mov
After
Screen.Recording.2567-08-28.at.16.12.15.mov
* Always rewrite profile.php to /me on Default sites * changelog * Point "Howdy" link to /me on Default sites * Remove profile menu link mapping to wp-admin/profile.php
Fixes p1724826862520339-slack-C07GQ1Q0L6B
Proposed changes:
This PR reverts the change in https://github.com/Automattic/jetpack/pull/38530/files#diff-c783f4c3c1add4e348657440ae37d16ca5a04bed0467458c8e7d8aa55fa03fa9 since it affects Simple Default sites. On Simple Default sites, it should point to /me (until the Site-Level Profile lands).
This PR fixes the "Howdy" link on the Simple Default site to point to /me instead of /wp-admin/profile.php.
This looks dirty, so I plan to refactor to move this code around here:
jetpack/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.php
Lines 168 to 222 in 9b6a4f5
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions: