You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 2, 2021. It is now read-only.
Create a new Multsite with at least 2 connected Blogs.
Create a new Nav-Menu in Blog 1 and add all available languages as items
Navigate to frontend of Blog 1
What I Expected
The Nav-Menu-Item of "Blog 1" should have at least 1 "current"-class e.G. current-[language|blog|menu|...]-item
What Happened Instead
No "current"-class is added.
Screenshot
Howto fix
In Mlp_Nav_Menu_Frontend:prepare_item() the method should contain a check for get_current_blog() compared with the $site_id. If TRUE, we should add at least 1 "current" class to the given $item.
Version Information
Steps to Reproduce
What I Expected
The Nav-Menu-Item of "Blog 1" should have at least 1 "current"-class e.G.
current-[language|blog|menu|...]-itemWhat Happened Instead
No "current"-class is added.
Screenshot
Howto fix
In
Mlp_Nav_Menu_Frontend:prepare_item()the method should contain a check forget_current_blog()compared with the$site_id. If TRUE, we should add at least 1 "current" class to the given$item.Link in 2.4 Branch: https://github.com/inpsyde/multilingual-press/blob/2.4/src/inc/nav-menu/Mlp_Nav_Menu_Frontend.php#L108
Quick mu-plugin to solve this problem directly:
Here's a mu-plugin which will fix this issue by adding a class
mlp-current-language-nav-itemto the current nav-item: