[wp-trac] [WordPress Trac] #40878: Adding menus route

WordPress Trac noreply at wordpress.org
Mon Mar 25 22:03:07 UTC 2019


#40878: Adding menus route
------------------------------------+------------------------------
 Reporter:  dingo_d                 |       Owner:  (none)
     Type:  feature request         |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  REST API                |     Version:  4.7
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  rest-api
------------------------------------+------------------------------

Comment (by wpscholar):

 My latest attachment includes fully functional API endpoints for menus,
 menu items, menu locations, and menu settings.

 There was a good bit of logic that is part of the
 `wp_wpdate_nav_menu_item()` function that needed to be duplicated to get
 it working properly in the menu items endpoint. One of these was the
 handling of orphaned menu items.

 I made menu locations writeable, but only for updating the menu ID
 assigned to a menu location.

 Menu settings is a new introduction that provides access to the `auto_add`
 option to automatically add top-level pages to a menu.

 With all of these endpoints, it would be possible to completely replace
 the existing screen under `Appearance` -> `Menus` with a single page
 JavaScript app.

 These endpoints are key to the initiative being explored here:
 https://github.com/WordPress/gutenberg/issues/13206

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


More information about the wp-trac mailing list