[wp-trac] [WordPress Trac] #20275: wp_update_nav_menu hook is not fired when nav menu item is auto-added

WordPress Trac noreply at wordpress.org
Thu Mar 10 16:53:55 UTC 2016


#20275: wp_update_nav_menu hook is not fired when nav menu item is auto-added
------------------------------------+------------------------------
 Reporter:  inderpreet99            |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Menus                   |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------
Changes (by inderpreet99):

 * version:  3.3.1 =>


Comment:

 Like @mark8barnes, we should rename the hooks since they're being called
 at completely different times. This is a bug. It's a pretty important
 hook, so I think it should be fixed.

 Although I don't know why @mark8barnes suggests that javascript is firing
 one of the hooks. I've disabled JS and I do not see that happening.

 If we're not comfortable with renaming the hooks (due to those two
 plugins), we could just add two new hooks with unique names. This would
 allow the developers to target a specific hook.

 PS: Since it's been 4 years, the hooks have moved around. They are now
 located in `wp-admin/includes/nav-menu.php:1048` and `wp-includes/nav-
 menu.php:346`.

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


More information about the wp-trac mailing list