This functionality was recently added to WordPress core, and is expected to be released in 3.7. But this plugin provides you the functionality without needing to run trunk. The code in this plugin only runs if your version is older than 3.7 (ex: 3.6.1), so once you update WordPress you’ll seamlessly be using the WordPress core version instead. No need to update your theme’s styles or to disable this plugin.
It’s recommended that you limit the scope of the plugin to the specific theme locations you want to target using the
dropdown_menu_class_menus filter. This will reduce unnecessary database queries. By default, the code runs on all menus.
Here’s an example of limiting it to the ‘primary’ menu theme location.
Once you’re running WordPress 3.7 the class will be applied to all menus, regardless of your use of this filter. But the reason we’re using this filter is for performance reasons. My way requires additional database queries, since I have to work with the filters that are available. Core was able to do it without database queries, so there’s no need to limit this to certain menus.