[wp-trac] [WordPress Trac] #20275: wp_update_nav_menu hook is not fired when nav menu item is auto-added
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 27 00:38:50 UTC 2012
#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: 3.3.1
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Changes (by mark8barnes):
* cc: mark@… (added)
* type: enhancement => defect (bug)
Comment:
Replying to [comment:1 SergeyBiryukov]:
> Renaming an existing hook isn't a good idea, some plugins are using it.
I've found two:
> {{{
> wp-super-cache/trunk/wp-cache-phase2.php
> add-descendants-as-submenu-items/trunk/add-descendants-as-submenu-
items.php
> }}}
But surely having these two actions named the same is a bug, not a design
decision. The two hooks fire at completely different times in the save
menu process - the first fires when the menu itself is updated, the second
fires when the menu items are updated by javascript.
Incidentally, trying to monitor a menu by adding a hook to discover a menu
change is way harder than it ought to be - partly for the reason above,
and partly because when javascript is disabled, no hooks are in place.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20275#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list