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

WordPress Trac noreply at wordpress.org
Tue Mar 31 22:13:10 UTC 2015


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

Comment (by rtpHarry):

 Replying to [comment:37 helgatheviking]:
 > In the meantime, per @Shazdeh's very neat suggestion at:
 > http://shazdeh.me/2014/06/25/custom-fields-nav-menu-items/
 >
 > I am modifying the Walker in my plugin to only add the following action
 hook right after the description input:
 >
 >
 > {{{
 > <?php
 > // This is the added section
 > do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth,
 $args );
 > // end added section
 > ?>
 > }}}
 >
 > Then I am adding my custom fields to this hook. If we all do this in our
 plugins (those of us with plugins that rely on replacing the
 `wp_edit_nav_menu_walker`) then our plugins can play together. People will
 just have to run the risk of hitting the $_POST limit... a risk they are
 already taking now. If this hook is ever added to core, the plugins should
 seamless be forward-compatible.
 >
 >

 FYI: Original blog is gone but you can still get a copy of this in the
 wayback machine:

 [https://web.archive.org/web/20140714053731/http://shazdeh.me/2014/06/25
 /custom-fields-nav-menu-items/]

--
Ticket URL: <https://core.trac.wordpress.org/ticket/18584#comment:44>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list