[wp-trac] [WordPress Trac] #23806: Nav Menu Edit Walker per menu item type, not menu?

WordPress Trac noreply at wordpress.org
Mon Mar 18 02:09:11 UTC 2013


#23806: Nav Menu Edit Walker per menu item type, not menu?
-----------------------------+--------------------------
 Reporter:  GaryJ            |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Menus
  Version:                   |   Severity:  normal
 Keywords:  needs-patch      |
-----------------------------+--------------------------
 The assignment of a walker to show the menu items on the right side of the
 Menus screen is set per menu in `wp_get_nav_menu_to_edit()`.

 Ideally, it could be overridden per menu item type. That is, posttype,
 custom and taxonomy menu items can be handled by `Walker_Nav_Menu_Edit`,
 while a menu item (in the same menu) or 'foobar' can be handled by the
 `start_el()` from a different walker.

 As things stand, I'd have to extend `Walker_Nav_Menu_Edit`, copy
 `start_el()`, and place the conditional code for what to output in there
 (in my case, strip out fields that aren't ever going to be used in my
 'foobar' menu item type).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23806>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list