From d76921295fce34c053025c4e51aa7e8020b47e1c Mon Sep 17 00:00:00 2001 From: Allison Levine <1689238+allilevine@users.noreply.github.com> Date: Thu, 29 Aug 2024 14:34:45 -0400 Subject: [PATCH] Show the Themes menu item as selected for individual themes. (#94028) --- client/my-sites/sidebar/utils.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/my-sites/sidebar/utils.js b/client/my-sites/sidebar/utils.js index 446655b6bd9d65..401a548709c0bb 100644 --- a/client/my-sites/sidebar/utils.js +++ b/client/my-sites/sidebar/utils.js @@ -104,5 +104,10 @@ export const itemLinkMatches = ( path, currentPath ) => { return path.startsWith( '/stats/' ); } + // For `/theme/*` paths, show Themes menu as selected. + if ( pathIncludes( currentPath, 'theme', 1 ) ) { + return pathIncludes( path, 'themes', 1 ); + } + return fragmentIsEqual( path, currentPath, 1 ); };