diff --git a/projects/packages/jetpack-mu-wpcom/changelog/update-patch-profile-links b/projects/packages/jetpack-mu-wpcom/changelog/update-patch-profile-links new file mode 100644 index 0000000000000..3b745639e6b34 --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/update-patch-profile-links @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Point Edit Profile link to wpcalypso.* diff --git a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.php b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.php index 001ccc09535dc..644c536dc242c 100644 --- a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.php +++ b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-bar/wpcom-admin-bar.php @@ -171,7 +171,14 @@ function wpcom_maybe_replace_edit_profile_menu_to_me( $wp_admin_bar ) { // // Then, the Edit Profile menu should point to /me, instead of the site's profile.php. if ( ! is_user_member_of_blog() || get_option( 'wpcom_admin_interface' ) !== 'wp-admin' ) { - $edit_profile_node->href = maybe_add_origin_site_id_to_url( 'https://wordpress.com/me' ); + + // Temporarily point to wpcalypso.wordpress.com for testing purposes. + $url = 'https://wordpress.com/me'; + if ( get_option( 'wpcom_site_level_user_profile' ) === '1' ) { + $url = 'https://wpcalypso.wordpress.com/me'; + } + + $edit_profile_node->href = maybe_add_origin_site_id_to_url( $url ); $wp_admin_bar->add_node( (array) $edit_profile_node ); } } @@ -189,12 +196,19 @@ function wpcom_add_my_account_item_to_profile_menu( $wp_admin_bar ) { // Adds the 'My Account' menu item before 'Log Out'. $wp_admin_bar->remove_node( 'logout' ); } + + // Temporarily point to wpcalypso.wordpress.com for testing purposes. + $url = 'https://wordpress.com/me/account'; + if ( get_option( 'wpcom_site_level_user_profile' ) === '1' ) { + $url = 'https://wpcalypso.wordpress.com/me/account'; + } + $wp_admin_bar->add_node( array( 'id' => 'wpcom-profile', 'parent' => 'user-actions', 'title' => __( 'My Account', 'jetpack-mu-wpcom' ), - 'href' => maybe_add_origin_site_id_to_url( 'https://wordpress.com/me/account' ), + 'href' => maybe_add_origin_site_id_to_url( $url ), ) );