EndPointy Menus

外掛說明

EndPointy Menus adds custom REST API routes to expose your WordPress navigation menus as JSON.

Base namespace: endpointy-menus/v1

Endpoints:

  • GET /wp-json/endpointy-menus/v1/menus
    Returns all registered menus with locations and items.

  • GET /wp-json/endpointy-menus/v1/menus/<id>
    Returns a single menu and its items by menu ID.

  • GET /wp-json/endpointy-menus/v1/locations
    Returns all registered menu locations with assigned menus.

  • GET /wp-json/endpointy-menus/v1/locations/<location>
    Returns a menu assigned to a specific location (e.g., ‘primary’, ‘footer’).

Query Parameters:

  • nested=true – Returns menu items in a hierarchical tree structure with parent-child relationships.
    Example: /wp-json/endpointy-menus/v1/menus/2?nested=true

This is useful for headless WordPress setups or any external app that needs to read your menu structure.

Usage

Example requests:

Get all menus:
https://your-site.com/wp-json/endpointy-menus/v1/menus

Get single menu by ID:
https://your-site.com/wp-json/endpointy-menus/v1/menus/2

Get all menu locations:
https://your-site.com/wp-json/endpointy-menus/v1/locations

Get menu by location (e.g., ‘primary’):
https://your-site.com/wp-json/endpointy-menus/v1/locations/primary

Get nested menu structure:
https://your-site.com/wp-json/endpointy-menus/v1/menus/2?nested=true
https://your-site.com/wp-json/endpointy-menus/v1/locations/primary?nested=true

Use these URLs directly from your front-end application or API client.

Support the Developer

If you find this plugin useful, you can support the developer:

  • Website: https://gunjanjaswal.me
  • GitHub: https://github.com/gunjanjaswal/Endpointy-Menus
  • Buy Me a Coffee: https://buymeacoffee.com/gunjanjaswal

Contributing

Contributions, issues, and feature requests are welcome!
GitHub: https://github.com/gunjanjaswal/Endpointy-Menus
Issues: https://github.com/gunjanjaswal/Endpointy-Menus/issues

安裝方式

  1. Upload the endpointy-menus folder to your wp-content/plugins directory.
  2. Activate EndPointy Menus from the Plugins screen in WordPress.
  3. Ensure you have at least one menu configured under Appearance Menus.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈EndPointy Menus〉的開發相關工作。

參與者

將〈EndPointy Menus〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.1.0

  • Added support for filtering menus by location.
  • Added nested menu hierarchy with nested=true query parameter.
  • Added /locations endpoint to list all menu locations.
  • Added /locations/<location> endpoint to get menu by location.

1.0.0

  • Initial release.