PHPackages                             nekojira/wp-api-menus - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. nekojira/wp-api-menus

ActiveWordpress-plugin[API Development](/categories/api)

nekojira/wp-api-menus
=====================

Extends WordPress WP API with menu routes.

1.3.2(5y ago)1391.5k56[12 issues](https://github.com/unfulvio/wp-api-menus/issues)[9 PRs](https://github.com/unfulvio/wp-api-menus/pulls)GPLv2.0+PHPPHP &gt;=5.3.2

Since Jun 19Pushed 2y ago12 watchersCompare

[ Source](https://github.com/unfulvio/wp-api-menus)[ Packagist](https://packagist.org/packages/nekojira/wp-api-menus)[ Docs](https://github.com/unfulvio/wp-api-menus)[ RSS](/packages/nekojira-wp-api-menus/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (7)Used By (0)

Menu routes for WordPress JSON REST API
---------------------------------------

[](#menu-routes-for-wordpress-json-rest-api)

[![GitHub version](https://camo.githubusercontent.com/fd5822ee9a93d0c1b900625fd8521dcab9395a06c8579f70e62cbc8a23b2cd41/68747470733a2f2f62616467652e667572792e696f2f67682f756e66756c76696f25324677702d6170692d6d656e75732e737667)](http://badge.fury.io/gh/unfulvio%2Fwp-api-menus)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0c2c81b420d087cc06a2219f56794db457b9b951aab7d0f3d408e3d760cc2398/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f756e66756c76696f2f77702d6170692d6d656e75732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/unfulvio/wp-api-menus/?branch=master)[![Join the chat at https://gitter.im/unfulvio/wp-api-menus](https://camo.githubusercontent.com/abe08b740a4156153736f791393ec4da6619c4be73212e75769f52edacc0e2b5/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/unfulvio/wp-api-menus?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[WordPress](http://www.wordpress.org/) plugin that extends the JSON REST [WP API](https://github.com/WP-API/WP-API) with new routes pointing to WordPress registered menus. Read the [WP API documentation](http://wp-api.org/).

[![Download from WordPress.org](https://github.com/unfulvio/wp-api-menus/raw/master/assets/wordpress-download-btn.png)](https://wordpress.org/plugins/wp-api-menus/)

#### New routes available:

[](#new-routes-available)

- `/menus` list of every registered menu.
- `/menus/` data for a specific menu.
- `/menu-locations` list of all registered theme locations.
- `/menu-locations/` data for menu in specified menu in theme location.

Currently, the `menu-locations/` route for individual menus will return a tree with full menu hierarchy, with correct menu item order and listing children for each menu item. The `menus/` route will output menu details and a flat array of menu items. Item order or if each item has a parent will be indicated in each item attributes, but this route won't output items as a tree.

You can alter the V1 data arrangement of each individual menu items and children using the filter hook `json_menus_format_menu_item`.

#### WP API V2

[](#wp-api-v2)

In V1 of the REST API the routes are located by default at `wp-json/menus/` etc.

In V2 the routes by default are at `wp-json/wp-api-menus/v2/` (e.g. `wp-json/wp-api-menus/v2/menus/`, etc.) since V2 encourages prefixing and version namespacing.

You can alter the V2 data arrangement of the REST response using the filter hooks

1. `rest_menus_format_menus` to alter the list of menu items returned (e.g from `wp-json/wp-api-menus/v2/menus/`)
2. `rest_menus_format_menu` to alter a single menu returned (e.g `wp-json/wp-api-menus/v2/menus/`)
3. `rest_menus_format_menu_item` to alter the menu items returned (e.g `wp-json/wp-api-menus/v2/menus/` `items` property)

#### Contributing

[](#contributing)

- Submit a pull request or open a ticket here on GitHub.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 54.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~376 days

Recently: every ~440 days

Total

6

Last Release

2104d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48f2cb4e743490b58576a0672e49cdbacc8850e712ab50cec99d8e0ec3ab1368?d=identicon)[unfulvio](/maintainers/unfulvio)

---

Top Contributors

[![unfulvio](https://avatars.githubusercontent.com/u/1227930?v=4)](https://github.com/unfulvio "unfulvio (34 commits)")[![thefrosty](https://avatars.githubusercontent.com/u/367897?v=4)](https://github.com/thefrosty "thefrosty (16 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")[![josh-taylor](https://avatars.githubusercontent.com/u/675003?v=4)](https://github.com/josh-taylor "josh-taylor (1 commits)")[![k1sul1](https://avatars.githubusercontent.com/u/2719615?v=4)](https://github.com/k1sul1 "k1sul1 (1 commits)")[![mattheu](https://avatars.githubusercontent.com/u/494927?v=4)](https://github.com/mattheu "mattheu (1 commits)")[![pdufour](https://avatars.githubusercontent.com/u/1239145?v=4)](https://github.com/pdufour "pdufour (1 commits)")[![Dobbler](https://avatars.githubusercontent.com/u/407156?v=4)](https://github.com/Dobbler "Dobbler (1 commits)")[![sarahannnicholson](https://avatars.githubusercontent.com/u/10520771?v=4)](https://github.com/sarahannnicholson "sarahannnicholson (1 commits)")[![sathyapulse](https://avatars.githubusercontent.com/u/3540501?v=4)](https://github.com/sathyapulse "sathyapulse (1 commits)")[![stirtingale](https://avatars.githubusercontent.com/u/25981099?v=4)](https://github.com/stirtingale "stirtingale (1 commits)")[![tdlm](https://avatars.githubusercontent.com/u/424090?v=4)](https://github.com/tdlm "tdlm (1 commits)")[![puredazzle](https://avatars.githubusercontent.com/u/3775209?v=4)](https://github.com/puredazzle "puredazzle (1 commits)")[![fahrradflucht](https://avatars.githubusercontent.com/u/13237661?v=4)](https://github.com/fahrradflucht "fahrradflucht (1 commits)")

---

Tags

json-restphpwordpresswp-apijsonapiwordpresswpwp-apiwp-rest-api

### Embed Badge

![Health badge](/badges/nekojira-wp-api-menus/health.svg)

```
[![Health](https://phpackages.com/badges/nekojira-wp-api-menus/health.svg)](https://phpackages.com/packages/nekojira-wp-api-menus)
```

###  Alternatives

[airesvsg/acf-to-rest-api

Exposes Advanced Custom Fields Endpoints in the WordPress REST API

1.4k75.0k](/packages/airesvsg-acf-to-rest-api)[oomphinc/wp-forms-api

Drupal-esque API for creating and munging forms in WordPress

581.1k](/packages/oomphinc-wp-forms-api)[walle89/swedbank-json

Unofficial API client for the Swedbank's and Sparbanken's mobile apps in Sweden.

752.5k](/packages/walle89-swedbank-json)[wayofdev/laravel-symfony-serializer

📦 Laravel wrapper around Symfony Serializer.

2113.6k](/packages/wayofdev-laravel-symfony-serializer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
