shelob9/jp-menu-route

Adds ability to retrieve menus via the WordPress REST API (WP-API).

Installs: 11

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/shelob9/jp-menu-route

dev-master 2014-10-23 23:41 UTC

This package is auto-updated.

Last update: 2025-09-08 09:14:20 UTC


README

Adds a menu endpoint for the WordPress REST API.

Installation

This is not a plugin.

Add "jp-menu-route": "dev-master" to your site/plugin/theme's composer.json file. Include composer autoloader.

Use

Make request to wp-json/jp-api/menus/ to get info about all menus.

Make request to wp-json/jp-api/menus/<menu-name> to get all items of specific menu.

Note that the base URL for the REST API "wp-json" can be modified with a filter. Also this lib's route can be modified using the JP_API_ROUTE constant.

License, Copyright etc.

Copyright 2014 Josh Pollock Licensed under the terms of the GNU General Public License version 2 or later. Please share with your neighbor.