[wp-trac] [WordPress Trac] #14687: Add "collapsible" class to menu items that have children
WordPress Trac
wp-trac at lists.automattic.com
Tue Jul 5 22:17:33 UTC 2011
#14687: Add "collapsible" class to menu items that have children
-----------------------------+-----------------------------
Reporter: digitalnature | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Future Release
Component: Menus | Version: 3.2
Severity: normal | Resolution:
Keywords: has-patch |
-----------------------------+-----------------------------
Changes (by mobius5150):
* cc: mike@… (added)
* keywords: => has-patch
* version: 3.0.1 => 3.2
Comment:
I found this while I was looking for a way to style parent menu items
without using nasty javascript. I found a very nice solution
[http://wordpress.org/support/topic/wp_nav_menu-add-a-parent-class here]
(basically taking the two added lines from [http://pastebin.com/DVEcci3e
this] and adding it to the default {{{WalkerNavMenu->display_element()}}}
function which simply checks to see if the menu item has children, and if
so, appends the appropriate class to it.
I'll be preparing and attaching a patch ASAP.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14687#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list