[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
Thu May 16 02:11:07 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 MikeSchinkel):

 Replying to [comment:4 birgire]:
 > 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].

 Just a follow up on this.  Looking at core source, that parameters is
 commented [https://github.com/WordPress/wordpress-develop/blob/master/src
 /wp-admin/includes/class-walker-nav-menu-edit.php#L56 to be unused], which
 is why I did not include in my patch.

 I personally don't have an issue to include it, if some plugin actually
 does pass it, but I visually tracied the code I don't see how it would
 pass it. I think that might have been a legacy parameter that is no longer
 used.

 But if it is in use, okay my me to include. OTOH if it does not, would be
 a shame to include it.

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


More information about the wp-trac mailing list