[wp-trac] [WordPress Trac] #41081: Improve Custom Menu widget, show notification if menu is empty or no menu selected
WordPress Trac
noreply at wordpress.org
Thu Jun 22 22:30:03 UTC 2017
#41081: Improve Custom Menu widget, show notification if menu is empty or no menu
selected
----------------------------------------+-----------------------------
Reporter: alexvorn2 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.9
Component: Widgets | Version: trunk
Severity: normal | Resolution:
Keywords: good-first-bug needs-patch | Focuses: administration
----------------------------------------+-----------------------------
Comment (by westonruter):
@mdifelice this is actually already accounted for in the Nav Menus
component of the Customizer, specifically when nav menus get renamed,
added, or deleted. See:
• https://github.com/WordPress/wordpress-
develop/blob/ddc823a3e9039e6f8f2278cd5a34d9af125bf3df/src/wp-admin/js
/customize-nav-menus.js#L2179-L2205
• https://github.com/WordPress/wordpress-
develop/blob/ddc823a3e9039e6f8f2278cd5a34d9af125bf3df/src/wp-admin/js
/customize-nav-menus.js#L2220-L2228
• https://github.com/WordPress/wordpress-
develop/blob/ddc823a3e9039e6f8f2278cd5a34d9af125bf3df/src/wp-admin/js
/customize-nav-menus.js#L2368-L2387
• https://github.com/WordPress/wordpress-
develop/blob/ddc823a3e9039e6f8f2278cd5a34d9af125bf3df/src/wp-admin/js
/customize-nav-menus.js#L2932-L2942
So the work here would be essentially to extend that to catch for when the
number of items in a nav menu change between zero and not zero.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41081#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list