[wp-trac] [WordPress Trac] #31218: nav-menu.js menu item added event
WordPress Trac
noreply at wordpress.org
Tue Feb 3 02:52:45 UTC 2015
#31218: nav-menu.js menu item added event
-------------------------+-----------------------------
Reporter: welcher | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: trunk
Severity: normal | Keywords:
Focuses: javascript |
-------------------------+-----------------------------
I am writing a plugin that adds a checkbox to each item in the admin Menu
that is being edited. The checkbox is used to either bulk delete items in
the menu or to insert a new one after it. Here is the plugin on github -
[https://github.com/ryanwelcher/Bulk-Remove-Menu-Items]
Currently, I am overriding the addMenuToBottom() method in nav-menu.js to
achieve the goal. I would love to see an event be triggered after the item
is added. This seems like a much more efficient and elegant - not to
mention less hacky - way of approaching this.
I have attached a patch with an initial approach that passes the markup of
the item as a parameter. Any input is welcome.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31218>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list