[wp-trac] [WordPress Trac] #47056: Add 'wp_nav_menu_item_custom_fields' hook in Walker_Nav_Menu_Edit::start_el()

WordPress Trac noreply at wordpress.org
Wed May 15 19:06:30 UTC 2019


#47056: Add 'wp_nav_menu_item_custom_fields' hook in
Walker_Nav_Menu_Edit::start_el()
------------------------------------+------------------------------
 Reporter:  MikeSchinkel            |       Owner:  (none)
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Menus                   |     Version:  5.2
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------

Comment (by birgire):

 The plugins search on wpdirectory.net is also very helpful.

 Here's the list of the 60 plugins that use the
 {{{wp_nav_menu_item_custom_fields}}} hook:

 https://wpdirectory.net/search/01DAY87H5P9AAFY90DGWZWWHHP

 Nice to see a joint effort there among these plugins to address this.

 There seems to be a strong case for adding it into core.

 As this hook is not for the Customizer, is the plan to handle that
 separately or in the other existing tickets?

 Looking at [attachment:"47056.2.patch"] it would benefit from adding the
 inline docs.

 [https://plugins.trac.wordpress.org/browser/theme-my-login/trunk/admin
 /class-theme-my-login-walker-nav-menu-edit.php#L33 Here's] an example from
 one such plugin (Theme my login). I based the inline title description
 from this one.

 Some plugins seems to add the nav menu ID to the hook, like
 [https://plugins.trac.wordpress.org/browser/sku-shortlink-for-
 woocommerce/trunk/vendor/wponion/wponion/core/wp/nav-menu/class-
 walker.php#L80 here] and [https://plugins.trac.wordpress.org/browser/menu-
 icons/trunk/vendor/codeinwp/menu-item-custom-fields/walker-nav-menu-
 edit.php#L77 here].

 [attachment:"47056-3.diff"] adds inline docs and adds the navigational
 menu ID as an hook argument.

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


More information about the wp-trac mailing list