Skip to content

Commit

Permalink
Point "Howdy" link to /me on Default sites (#39113)
Browse files Browse the repository at this point in the history
* 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

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/10593811751

Upstream-Ref: Automattic/jetpack@1bc5900
  • Loading branch information
miksansegundo authored and matticbot committed Aug 28, 2024
1 parent 492d82e commit 9e24aa6
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 85 deletions.
58 changes: 29 additions & 29 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ This is an alpha version! The changes listed here are not final.
### Changed
- Newspack blocks: Updated from 3.5 to 4.0.1

### Fixed
- Always rewrite profile.php to /me on Default sites

## [5.59.0] - 2024-08-26
### Added
- Auto open Upload Theme dialog if query parameter is present [#39045]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) {
$args['href'] = 'https://wordpress.com/me';

// Temporarily point to wpcalypso.wordpress.com for testing purposes.
if ( get_option( 'wpcom_site_level_user_profile' ) === '1' ) {
$args['href'] = 'https://wpcalypso.wordpress.com/me';
}
}
}

$home_url = home_url( '/' );
$site_slug = wp_parse_url( $home_url, PHP_URL_HOST );
$href = str_replace( $home_url, '', $args['href'] );
Expand Down
Loading

0 comments on commit 9e24aa6

Please sign in to comment.