Title: WP-REST-API V2 Menus
Author: thebatclaudio
Published: <strong>2016 年 3 月 1 日</strong>
Last modified: 2022 年 11 月 9 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/wp-rest-api-v2-menus.svg)

# WP-REST-API V2 Menus

 作者：[thebatclaudio](https://profiles.wordpress.org/claudiolabarbera/)

[下载](https://downloads.wordpress.org/plugin/wp-rest-api-v2-menus.0.12.1.zip)

 * [详情](https://cn.wordpress.org/plugins/wp-rest-api-v2-menus/#description)
 * [评价](https://cn.wordpress.org/plugins/wp-rest-api-v2-menus/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/wp-rest-api-v2-menus/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/wp-rest-api-v2-menus/#developers)

 [支持](https://wordpress.org/support/plugin/wp-rest-api-v2-menus/)

## 描述

This plugin extends the [WordPress REST API (Version 2)](https://wordpress.org/plugins/rest-api/)
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](https://wordpress.org/plugins/menu-image/).

## 安装

 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

## 评价

![](https://secure.gravatar.com/avatar/1e0616296c4d26d92cb64457f967d9ac34aae2b2b1980e1fcf56af41183c5739?
s=60&d=retro&r=g)

### 󠀁[Working as expected](https://wordpress.org/support/topic/working-as-expected-43/)󠁿

 [Sarankumar](https://profiles.wordpress.org/sarankumar/) 2021 年 7 月 9 日

Thank you for your time effort on this plugin. Please keep update on this plugin
and requesting you to maintain it.

![](https://secure.gravatar.com/avatar/809098021b2230516b40d861cd9092b9f8b8c2f1e6028477ea862838855fc39e?
s=60&d=retro&r=g)

### 󠀁[Perfecto](https://wordpress.org/support/topic/perfecto-223/)󠁿

 [davidfh34](https://profiles.wordpress.org/davidfh34/) 2020 年 5 月 26 日

Perfecto y simple

![](https://secure.gravatar.com/avatar/1de86ba420edbfe0a9530744b81e2c201d40d04ee629a27ff5607c163e9524dd?
s=60&d=retro&r=g)

### 󠀁[It does the job and saves time!](https://wordpress.org/support/topic/it-does-the-job-and-saves-time/)󠁿

 [beltranrengifo](https://profiles.wordpress.org/beltranrengifo/) 2019 年 11 月 
20 日

The plugin works fine and is really helpful when using the REST api.

![](https://secure.gravatar.com/avatar/61d1254767cece0f0e322c56fe1fe215ae99cc9e2b016547aa67e45605de6c6b?
s=60&d=retro&r=g)

### 󠀁[Great little plugin with an active developer](https://wordpress.org/support/topic/great-little-plugin-with-an-active-developer/)󠁿

 [picksley](https://profiles.wordpress.org/picksley/) 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

![](https://secure.gravatar.com/avatar/1ee109e14134ef2ace9175eacc33b401d47bde2cc31973b154882d54996df443?
s=60&d=retro&r=g)

### 󠀁[Essential addition to existing wp rest api](https://wordpress.org/support/topic/essential-addition-to-existing-wp-rest-api/)󠁿

 [onnohaldar](https://profiles.wordpress.org/onnohaldar/) 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!

![](https://secure.gravatar.com/avatar/6103b899aa62a97f1e002bd12b07704029521ccca52af7bb9d1d39acd3875399?
s=60&d=retro&r=g)

### 󠀁[Excellent Plugin](https://wordpress.org/support/topic/excellent-plugin-246/)󠁿

 [dcurasi](https://profiles.wordpress.org/dcurasi/) 2016 年 9 月 15 日

The plugin works great!

 [ 阅读所有6条评价 ](https://wordpress.org/support/plugin/wp-rest-api-v2-menus/reviews/)

## 贡献者及开发者

「WP-REST-API V2 Menus」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ thebatclaudio ](https://profiles.wordpress.org/claudiolabarbera/)
 *   [ ale.barbieri ](https://profiles.wordpress.org/alebarbieri/)
 *   [ joshuaslate ](https://profiles.wordpress.org/joshuaslatedesign/)
 *   [ raik ](https://profiles.wordpress.org/raik/)
 *   [ beltranrengifo ](https://profiles.wordpress.org/beltranrengifo/)
 *   [ Trollhag ](https://profiles.wordpress.org/trollhag/)
 *   [ fifciuu ](https://profiles.wordpress.org/fifciuu/)

[帮助将「WP-REST-API V2 Menus」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/wp-rest-api-v2-menus)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/wp-rest-api-v2-menus/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/wp-rest-api-v2-menus/)，或通过[RSS](https://plugins.trac.wordpress.org/log/wp-rest-api-v2-menus/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/wp-rest-api-v2-menus/)。

## 更新日志

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

## 额外信息

 *  版本 **0.12.1**
 *  最后更新：**4 年前**
 *  活跃安装数量 **3,000+**
 *  WordPress 版本 ** 4.4 或更高版本 **
 *  已测试的最高版本为 **6.0.12**
 *  语言
 * [English (US)](https://wordpress.org/plugins/wp-rest-api-v2-menus/)
 * 标签
 * [api](https://cn.wordpress.org/plugins/tags/api/)[JSON](https://cn.wordpress.org/plugins/tags/json/)
   [json rest api](https://cn.wordpress.org/plugins/tags/json-rest-api/)[menu-routes](https://cn.wordpress.org/plugins/tags/menu-routes/)
   [menus](https://cn.wordpress.org/plugins/tags/menus/)
 *  [高级视图](https://cn.wordpress.org/plugins/wp-rest-api-v2-menus/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  6 条 5 星评价     ](https://wordpress.org/support/plugin/wp-rest-api-v2-menus/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/wp-rest-api-v2-menus/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/wp-rest-api-v2-menus/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/wp-rest-api-v2-menus/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/wp-rest-api-v2-menus/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-rest-api-v2-menus/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/wp-rest-api-v2-menus/reviews/)

## 贡献者

 *   [ thebatclaudio ](https://profiles.wordpress.org/claudiolabarbera/)
 *   [ ale.barbieri ](https://profiles.wordpress.org/alebarbieri/)
 *   [ joshuaslate ](https://profiles.wordpress.org/joshuaslatedesign/)
 *   [ raik ](https://profiles.wordpress.org/raik/)
 *   [ beltranrengifo ](https://profiles.wordpress.org/beltranrengifo/)
 *   [ Trollhag ](https://profiles.wordpress.org/trollhag/)
 *   [ fifciuu ](https://profiles.wordpress.org/fifciuu/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/wp-rest-api-v2-menus/)