這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

WP-REST-API V2 Menus

外掛說明

This plugin extends the WordPress REST API (Version 2) with new routes for WordPress registered menus.

The new routes available will be:

  • /menus/v1/menus list of every registered menu.
  • /menus/v1/menus/<slug> data for a specific menu.
  • /menus/v1/locations list of every registered menu location in your theme.
  • /menus/v1/locations/<slug> data for a specific menu location.

Compatible with ACF menu’s custom attributes and menu item’s custom attributes.

Compatible with Menu Image, Icons made easy.

安裝方式

  1. Upload the plugin files to the /wp-content/plugins/wp-rest-api-v2-menus directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress

常見問題集

Is this an official extension of WP API?

There’s no such thing.

Can I contribute to the project?

Of course! This is the GitHub Repository https://github.com/thebatclaudio/wp-rest-api-v2-menus

使用者評論

2021 年 7 月 9 日
Thank you for your time effort on this plugin. Please keep update on this plugin and requesting you to maintain it.
2019 年 4 月 4 日
Our current set-up is a custom PHP website, that is powered from WordPress via the Rest API This plugin allows me to eat data from multiple menus, children and use them to power our website. Great and simple plugin
2019 年 3 月 29 日
This Plugin is working perfect when you have to build a more advanced standardized responsive theme. I have tested it with angular 7 and angular material 2 and it did just what is suppose to deliver. Fast access to location and menu data to reuse this to build angular material 2 templated menus. Great! Thnx!
閱讀全部 6 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈WP-REST-API V2 Menus〉的開發相關工作。

參與者

將〈WP-REST-API V2 Menus〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

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

變更記錄

0.12.1 – Bug fix: Fatal error when get_term() fails

0.12 – Some bug fixes

0.10 – Fix possible name colision caused by ACF field with existing name (example: if we have an ACF field named “title” it will overwrite the original post’s title). Now ACF fields are grouped in a “acf” object.

0.9.1 – Wrong release

0.9 – Wrong release

0.8.1 – Use post_name instead of basename (Bug fix for static home page)

0.8 – Added support for apply_filters + Bug fix permision_callback (WP 5.5.0) + Bug fix infinite loop

0.7.7 – Added support for thumbnail_src and thumbnail_hover_src

0.7.6 – Added contributors and changed description in readme.txt

0.7.5 – Compatibility with Menu Image, Icons made easy; Bug fix: use get_term instead of get_category for taxonomies

0.7.3 – Added slug to category item object

0.7.2 – Added slug to menu item object

0.7.1 – Bug fix: menu items were returned as an object instead of array

0.7 – New way to check menu item’s relatives, now it works with infinite child levels + various bug fixes

0.6.1 – Bug fix

0.6 – Added menu locations features

0.5 – Added support for ACF custom fields

0.4 – Added nested menus support and pages slugs

0.3.2 – Bug fix: allowing underscore values in menu slug regexp

0.3.1 – Bug fix: allowing numeric values in menu slug regexp

0.3 – Bug fix

0.2 – Updated compatibility

0.1.1 – Bug fix