Title: WP-REST-API Menus
Author: jcdev518
Published: <strong>2018 年 3 月 19 日</strong>
Last modified: 2018 年 3 月 26 日

---

搜索插件

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

![](https://ps.w.org/wp-rest-api-menus/assets/icon-128x128.jpg?rev=1842417)

# WP-REST-API Menus

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

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

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

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

## 描述

This plugin adds “routes” or “endpoints” to WP REST API that allows for retrieval
of
 menu data as JSON.

Updated port of “WP-REST-API V2 Menus” by Claudio La Barbera (http://www.claudiolabarbera.
com)

**Usage**

**Get all registered menus:**

    ```
    GET /wp-menus/v1/menus
    https://yourwpsite.com/wp-json/wp-menus/v1/menus
    ```

**Get menu data as JSON from menu slug:**

    ```
    GET /wp-menus/v1/menus/{slug}
    https://yourwpsite.com/wp-json/wp-menus/v1/menus/{slug}
    ```

Gets the contents of a registered menu by its “slug”.

When assigning a menu a location in /wp-admin/nav-menus.php?action=locations
 the
slug is the name of the menu in lowercase and without any spaces like a post slug.

If your menu name is Main Menu:
 https://yourwpsite.com/wp-json/menus/v1/wp-menus/
main-menu

## 安装

There are no requirements other than WordPress and one active menu. Installation
is simple:

 1. Upload the `wp-rest-api-menus` folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## 常见问题

  Installation Instructions

There are no requirements other than WordPress and one active menu. Installation
is simple:

 1. Upload the `wp-rest-api-menus` folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

  How do I use this plugin?

It creates a JSON interpretation of any “registered” menu mainly for front-end use.
If you have any questions feel free to contact me: https://www.amorphouswebsolutions.
com/contact/

## 评价

此插件暂无评价。

## 贡献者及开发者

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

贡献者

 *   [ jcdev518 ](https://profiles.wordpress.org/jcdev518/)

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

### 对开发感兴趣吗?

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

## 更新日志

#### 1.0

 * Requires PHP 5.6x at the very least.

## 额外信息

 *  版本 **1.0**
 *  最后更新：**8 年前**
 *  活跃安装数量 **80+**
 *  WordPress 版本 ** 4.7.0 或更高版本 **
 *  已测试的最高版本为 **4.9.29**
 *  PHP 版本 ** 5.6 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/wp-rest-api-menus/)
 * 标签
 * [JSON](https://cn.wordpress.org/plugins/tags/json/)[json rest api](https://cn.wordpress.org/plugins/tags/json-rest-api/)
   [menus](https://cn.wordpress.org/plugins/tags/menus/)[wp-api](https://cn.wordpress.org/plugins/tags/wp-api/)
   [wp-rest-api](https://cn.wordpress.org/plugins/tags/wp-rest-api/)
 *  [高级视图](https://cn.wordpress.org/plugins/wp-rest-api-menus/advanced/)

## 评级

尚未提交反馈。

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

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

## 贡献者

 *   [ jcdev518 ](https://profiles.wordpress.org/jcdev518/)

## 支持

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

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

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://amorphouswebsolutions.com/plugins)