{"id":15524970,"url":"https://github.com/unfulvio/wp-api-menus","last_synced_at":"2025-04-05T05:09:50.427Z","repository":{"id":18834187,"uuid":"22049720","full_name":"unfulvio/wp-api-menus","owner":"unfulvio","description":":abcd: Menu routes for WordPress JSON REST API.","archived":false,"fork":false,"pushed_at":"2024-05-14T02:10:26.000Z","size":230,"stargazers_count":140,"open_issues_count":21,"forks_count":58,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-29T04:11:20.541Z","etag":null,"topics":["json-rest","php","wordpress","wp-api"],"latest_commit_sha":null,"homepage":"https://wordpress.org/plugins/wp-api-menus","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unfulvio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-07-21T02:54:33.000Z","updated_at":"2025-02-09T18:43:03.000Z","dependencies_parsed_at":"2025-01-04T15:11:51.613Z","dependency_job_id":"3e779ae9-ab0d-4ed3-b213-64ad98670459","html_url":"https://github.com/unfulvio/wp-api-menus","commit_stats":{"total_commits":82,"total_committers":19,"mean_commits":4.315789473684211,"dds":0.7073170731707317,"last_synced_commit":"b7334e5b92c709fe55696593b3ec2f96e574ec6c"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfulvio%2Fwp-api-menus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfulvio%2Fwp-api-menus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfulvio%2Fwp-api-menus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfulvio%2Fwp-api-menus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unfulvio","download_url":"https://codeload.github.com/unfulvio/wp-api-menus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289429,"owners_count":20914464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json-rest","php","wordpress","wp-api"],"created_at":"2024-10-02T10:53:39.860Z","updated_at":"2025-04-05T05:09:50.404Z","avatar_url":"https://github.com/unfulvio.png","language":"PHP","readme":"## Menu routes for WordPress JSON REST API\n\n[![GitHub version](https://badge.fury.io/gh/unfulvio%2Fwp-api-menus.svg)](http://badge.fury.io/gh/unfulvio%2Fwp-api-menus)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/unfulvio/wp-api-menus/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/unfulvio/wp-api-menus/?branch=master)\n[![Join the chat at https://gitter.im/unfulvio/wp-api-menus](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/unfulvio/wp-api-menus?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n[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/).\n\n[![Download from WordPress.org](https://github.com/unfulvio/wp-api-menus/blob/master/assets/wordpress-download-btn.png)](https://wordpress.org/plugins/wp-api-menus/)\n\n#### New routes available:\n\n- `/menus` list of every registered menu.\n- `/menus/\u003cid\u003e` data for a specific menu.\n- `/menu-locations` list of all registered theme locations.\n- `/menu-locations/\u003clocation\u003e` data for menu in specified menu in theme location. \n\nCurrently, the `menu-locations/\u003clocation\u003e` 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/\u003cid\u003e` 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.\n \nYou can alter the V1 data arrangement of each individual menu items and children using the filter hook `json_menus_format_menu_item`.\n\n#### WP API V2\n\nIn V1 of the REST API the routes are located by default at `wp-json/menus/` etc.\n\nIn 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. \n\nYou can alter the V2 data arrangement of the REST response using the filter hooks\n1. `rest_menus_format_menus` to alter the list of menu items returned (e.g from `wp-json/wp-api-menus/v2/menus/`)\n2. `rest_menus_format_menu` to alter a single menu returned (e.g `wp-json/wp-api-menus/v2/menus/\u003cid\u003e`)\n3. `rest_menus_format_menu_item` to alter the menu items returned (e.g `wp-json/wp-api-menus/v2/menus/\u003cid\u003e` `items` property)\n\n#### Contributing\n\n* Submit a pull request or open a ticket here on GitHub. ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funfulvio%2Fwp-api-menus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funfulvio%2Fwp-api-menus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funfulvio%2Fwp-api-menus/lists"}