unfulvio / wp-api-menus

:abcd: Menu routes for WordPress JSON REST API.
https://wordpress.org/plugins/wp-api-menus
GNU General Public License v2.0
140 stars 59 forks source link

Add items argument to menus #29

Open fahrradflucht opened 8 years ago

fahrradflucht commented 8 years ago

In some cases the cost of fetching the menus first and then only fetching the items for the menus that are needed by id are higher then fetching them all at once. It's now possible to specify an items argument to indicate whether to fetch the menu items as well or not.

Since it defaults to false this change would be non breaking.

Note that this change is currently V2 only.

fahrradflucht commented 8 years ago

Note that this PR is already based on #28.

fahrradflucht commented 8 years ago

@mckernanin I would merge this but I think it would be great if I could get a second per of eyes before that. Could you give a quick review?

Let me know if you need any additional information or context to make this easier for you.

mckernanin commented 8 years ago

I will check it out