Skip to content

Commit

Permalink
Point "Edit Profile" to profile.php when Site-Level Profile is enabled (
Browse files Browse the repository at this point in the history
#93938)

* Point Edit Profile link to profile.php

* Enable site-level-user-profile in development

* Update Howdy link, too
  • Loading branch information
okmttdhr authored Aug 30, 2024
1 parent 8031cdc commit 2e1141a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions client/layout/masterbar/logged-in.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@ class MasterbarLoggedIn extends Component {

renderProfileMenu() {
const { translate, user, siteUrl, isClassicView } = this.props;
const editProfileLink =
config.isEnabled( 'layout/site-level-user-profile' ) || isClassicView
? siteUrl + '/wp-admin/profile.php'
: '/me';
const profileActions = [
{
label: (
Expand All @@ -478,7 +482,7 @@ class MasterbarLoggedIn extends Component {
</div>
</div>
),
url: isClassicView ? siteUrl + '/wp-admin/profile.php' : '/me',
url: editProfileLink,
},
{
label: translate( 'My Account' ),
Expand All @@ -496,7 +500,7 @@ class MasterbarLoggedIn extends Component {
return (
<Item
tipTarget="me"
url="/me"
url={ editProfileLink }
onClick={ this.clickMe }
isActive={ this.isActive( 'me', true ) }
className="masterbar__item-howdy"
Expand Down
2 changes: 1 addition & 1 deletion config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"layout/app-banner": true,
"layout/guided-tours": true,
"layout/query-selected-editor": true,
"layout/site-level-user-profile": false,
"layout/site-level-user-profile": true,
"layout/support-article-dialog": true,
"legal-updates-banner": true,
"livechat_solution": true,
Expand Down

0 comments on commit 2e1141a

Please sign in to comment.