wearerequired / admin-menu-manager

Manage the WordPress admin menu using a simple drag & drop interface.
https://wordpress.org/plugins/admin-menu-manager/
GNU General Public License v2.0
61 stars 6 forks source link

Use the REST API #44

Closed swissspidy closed 6 years ago

swissspidy commented 7 years ago

The new plugin requires WordPress 4.4 and PHP 5.4, so why not use the REST API for saving and retrieving the admin menu? I think that would make for a very interesting project which WordPress core could theoretically also benefit from.

swissspidy commented 7 years ago

Right now, Ajax_Handler handles two cases:

It's mainly this way because Backbone.Collection natively supports this.

The REST API doesn't really allow modifying collections, just individual objects (menu items). That's not very useful for our use case, so we'd need to think about how to best leverage the REST API.