Ticket #4986: 4986.diff
| File 4986.diff, 873 bytes (added by , 9 years ago) |
|---|
-
src/bp-core/bp-core-template.php
3608 3608 $submenu->parent = $nav_menu->slug; 3609 3609 3610 3610 // If we're viewing this item's screen, record that we need to mark its parent menu to be selected. 3611 if ( $sub_menu->slug == bp_current_action() ) { 3611 // This also checks that the items parent is the current component so that two items with the same slug 3612 // but different parents only selects the parent that is active. See https://buddypress.trac.wordpress.org/ticket/4986 3613 if ( bp_current_action() === $sub_menu->slug && bp_current_component() === $nav_menu->slug ) { 3612 3614 $menu->class[] = 'current-menu-parent'; 3613 3615 $submenu->class[] = 'current-menu-item'; 3614 3616 }