WP-API / menus-endpoints

Feature plugin for Menu Endpoints
43 stars 13 forks source link

Improve how id are handled #30

Closed spacedmonkey closed 5 years ago

spacedmonkey commented 5 years ago

Improve how id are handled and fix how menu items are updated.

TimothyBJacobs commented 5 years ago

Could you expand on what you mean by improve how the ids are handled? Sorry, not immediately following the changes.

spacedmonkey commented 5 years ago

In short, there are two ids were care able here, the menu id and menu item id. This PR, makes that clear and removed unneeded repeated ids.

This PR, also fixes update menu items, which is something I should have done in another PR, but it was hard to test without it being fixed.

TimothyBJacobs commented 5 years ago

It'd be good to start documenting this with unit tests. Taking another look at the code now.

spacedmonkey commented 5 years ago

I’m still trying to find the structure of this. I feel like I lot is going to change in the coming weeks. I don’t want to write tests until then. If you are happy with the change, let’s merge and revisit it later.

spacedmonkey commented 5 years ago

I am replacing this PR with https://github.com/WP-API/wp-api-menus-widgets-endpoints/pull/31