WP Manifestindependent plugin directory
manifest / integrations / wpmenu-rest-api

WPMenu REST API

WordPress plugin adding endpoints for WordPress menus.

by slushman · github.com/slushman/wpmenu-rest-api · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/slushman/wpmenu-rest-api/archive/refs/heads/master.zip

Declares an update source (https://github.com/slushman/wpmenu-rest-api/), so updates arrive through the plugin's own updater.

From the readme

WPMenu REST API Adds REST endpoints for menus and menu locations. Description Adds REST endpoints for menus and menu locations. There are four endpoints added: 1. /menus - returns all menus. 2. /menus/$id - returns a specific menu with its menu items. 3. /menu-locations - returns all the menu locations. 4. /menu-locations/$slug - returns the menu and menu items assigned to a specific menu location. The returned menu items are not nested. If you're using the WPMenu React component, it handles nesting while creating the output. CSS classes for the menu items are returned both as an array and as a string. Your choice. It also tells CORS to allow GET requests for the menus. Installation 1. Within the WordPress admin, go to Plugins Add New 2. Click the "Upload Plugin" button 3. Click the "Choose File" button to select and upload the wpmenu-rest-api.zip file. 4. Activate the plugin once its uploaded.

Read the full README on GitHub →