funkhaus / fuxt-api

A WordPress plugin that extend the WP-JSON API to work with the fuxt framework.
0 stars 0 forks source link

Feature: Request a menu with it's children by name. #5

Closed drewbaker closed 3 weeks ago

drewbaker commented 3 weeks ago

By default menus are private in WP-JSON.

For example, something like this: /wp-json/fuxt/v1/menus?name=Main Menu and have it return all the child items of the menu called Main Menu even if it's a public request.

It's important that this /wp-json/fuxt/v1/menus is still private and does not return a list of all menus.

drewbaker commented 3 weeks ago

Custom links to external show a URL in the uri field... Is that default behavior? Should we include url for those? The default API returns menu items all as URLs...

I think ideally we have url for everything, and uri for any relative links? Not even sure how we'd know the difference in PHP...

Screenshot 2024-09-26 at 5 53 57 PM

drewbaker commented 3 weeks ago

Also, I think we'd want the type of the menu item, to know if it's a custom link.