diff --git a/client/layout/masterbar/logged-in.jsx b/client/layout/masterbar/logged-in.jsx index 39e3f69f92b860..02e03617b1f085 100644 --- a/client/layout/masterbar/logged-in.jsx +++ b/client/layout/masterbar/logged-in.jsx @@ -500,8 +500,7 @@ class MasterbarLoggedIn extends Component { } renderProfileMenu() { - const { translate, user, siteAdminUrl } = this.props; - const editProfileLink = siteAdminUrl ? `${ siteAdminUrl }profile.php` : '/me'; + const { translate, user } = this.props; const profileActions = [ { label: ( @@ -514,16 +513,11 @@ class MasterbarLoggedIn extends Component { />
{ user.display_name } - { translate( 'Edit Profile' ) } + { translate( 'My Profile' ) }
), - url: editProfileLink, - }, - { - label: translate( 'My Account' ), url: '/me', - className: 'account-link', }, { label: translate( 'Log Out' ), @@ -536,7 +530,7 @@ class MasterbarLoggedIn extends Component { return ( + { this.props.siteAdminProfileUrl && ( + , + }, + } + ) } + /> + ) } @@ -181,9 +201,15 @@ class Profile extends Component { export default compose( connect( - ( state ) => ( { - isFetchingUserSettings: isFetchingUserSettings( state ), - } ), + ( state ) => { + const siteId = getSelectedSiteId( state ); + + return { + isFetchingUserSettings: isFetchingUserSettings( state ), + siteAdminProfileUrl: getSiteAdminUrl( state, siteId, 'profile.php' ), + siteTitle: getSiteTitle( state, siteId ), + }; + }, { recordGoogleEvent } ), protectForm,