[wp-trac] [WordPress Trac] #18584: Nav menu UI needs more hooks

WordPress Trac noreply at wordpress.org
Mon Mar 4 20:37:31 UTC 2013


#18584: Nav menu UI needs more hooks
-----------------------------------------------+------------------
 Reporter:  Viper007Bond                       |       Owner:
     Type:  enhancement                        |      Status:  new
 Priority:  low                                |   Milestone:  3.6
Component:  Menus                              |     Version:  3.3
 Severity:  minor                              |  Resolution:
 Keywords:  has-patch needs-testing 3.6-menus  |
-----------------------------------------------+------------------

Comment (by Chouby):

 The proposed filters are great to add some new custom fields but they
 don't permit to create fully customized menu items.

 What I would like to do is to create a group of menu items, more or less
 the way done by Viper007Bond in his plugin (one "group" item on backend,
 several items on frontend). In his case keeping the existing navigation
 label, title attribute and so on makes sense because the plugin has one
 and only one top level item. But if we want a plugin beeing able to create
 a group of several top level items, these fields do not make sense
 anymore.

 So we should be able to completely customize the output of the walker (I
 know it is already possible by deriving a new class, but as mentionned by
 helgatheviking it leads to plugin conflicts).

 So the easiest way I can propose is to filter the whole output at the end
 of the start_el function with something like:

 {{{
 $output .= ob_get_clean();
 $output = apply_filters('walker_nav_menu_edit', $output, $item, $depth,
 $args);
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18584#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list