Closed Colir closed 7 years ago
Sorry, i've found how to setup with language.
http://www.horsepilot.dev/wp-json/wp-api-menus/v2/menu-locations/main-nav/?lang=fr.
However getting menu by slug could be very cool.
Is this what you want? #30
It enables getting menus by id, name or slug.
If yes I think the best bet is to just use my branch (or fork it) since this PR is open since May and the project isn't very active...
Yes, this is it Thanks for your feedback
hey @Fahrradflucht I've added you to the list of collaborators for this project, now you can push to master, merge or close PRs and so on. This project needs more maintainers that really make use of the plugin and therefore have better understanding/control of the requests made here.
I want to keep WP API up since there are many people using it - I'm hardly doing any front end / theme work these days so I'm a bit behind in WP API status and Menus in WP. I don't have a good overview over the project so it's a bit hard for me to understand how a PR or a ticket should be addressed. I'd ideally prefer to keep the plugin lean and do only 1 thing, and address third party support for other plugins in filters or actions etc. For example today one person opened a PR to add thumbnails support. But I think doesn't make sense as menus don't have thumbnails and it introduces a wp post reference in the API result.
This API should be only for menus.
Mind that the core WP API project is also planning to introduce support for menus, the lacking of was the reason why I had to design this plugin back then. Like most things WP it's taking ages to see that come to light, so I think this plugin might still have its usefulness for now.
Thanks
Hi. First at all, thanks for your plugin, it work very well.
i use the plugin Polylang to manage my website in 2 languages.
Do you know how i can retrieve a menu location with a language param, to get the menu in the correct language ? or,
it will be great to retireve a menu by it slug...
http://www.horsepilot.dev/wp-json/wp-api-menus/v2/menus/49 => http://www.horsepilot.dev/wp-json/wp-api-menus/v2/menus/main-nav
thanks for youtr help.