Twenty Thirteen: add visual Indicator for menu items with children
|Reported by:||downstairsdev||Owned by:|
It's helpful to have a visual indicator when a top level menu item contains a hidden drop down menu.
This patch adds a filter to wp_nav_menu_objects in order to add the class "has-children" to top level menu items that contain children. This allows us to style it with psuedo element, similar to how the menu-toggle is styled for smaller screens.
The filter I used was posted by @chipbennet on the WordPress Theme Reviewers List. The same functionality could also be achieved by a Custom Nav Walker (see http://wptheming.com/2013/03/drop-down-menu-indicator/), but Chip's solution seemed more straightforward.
Neither method works unless a menu has actually been set.
Change History (7)
- Component changed from General to Bundled Theme
- Version set to trunk
- Keywords has-patch added
- Milestone changed from Awaiting Review to 3.6