{"id":16239626,"url":"https://github.com/iantsch/mu-nav-menu","last_synced_at":"2026-04-20T13:35:09.511Z","repository":{"id":56988231,"uuid":"90074428","full_name":"iantsch/mu-nav-menu","owner":"iantsch","description":"WordPress must-use plugin to register a custom extended front-end menu walker and new wrapper function for BEM styled CSS classes.","archived":false,"fork":false,"pushed_at":"2018-10-30T11:57:40.000Z","size":11,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-30T06:40:20.522Z","etag":null,"topics":["wordpress","wordpress-mu-plugin","wordpress-nav-menu-walker"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iantsch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-02T20:19:53.000Z","updated_at":"2018-10-30T11:57:42.000Z","dependencies_parsed_at":"2022-08-21T09:40:45.182Z","dependency_job_id":null,"html_url":"https://github.com/iantsch/mu-nav-menu","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/iantsch/mu-nav-menu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iantsch%2Fmu-nav-menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iantsch%2Fmu-nav-menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iantsch%2Fmu-nav-menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iantsch%2Fmu-nav-menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iantsch","download_url":"https://codeload.github.com/iantsch/mu-nav-menu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iantsch%2Fmu-nav-menu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32049046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["wordpress","wordpress-mu-plugin","wordpress-nav-menu-walker"],"created_at":"2024-10-10T13:44:26.691Z","updated_at":"2026-04-20T13:35:09.492Z","avatar_url":"https://github.com/iantsch.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Menu Walker with BEM classes\n\nWordPress must-use plugin to register a custom extended front-end menu walker and new wrapper function for BEM styled CSS classes.\n\n## Installation\n\nYou can install this must-use plugin two ways\n\n### Via Composer\n\nIf you load your dependenies via Composer you can load this plugin with\n\n```sh\n$ php composer require iantsch/mu-nav-menu\n```\n\n### Via Download\n\nDownload/fork this repository and copy the contents of this must-use plugin into `wp-content/mu-plugins/`. \nIf you visit your Plugin section in the `wp-admin` area, you should be able to see a newly created category (Must use) plugins\n\n## Usage\n\nA ready-to-use wrapper function `bem_nav_menu` for `wp_nav_menu` is included \n\n```php\n$args = array(\n    'base_class' =\u003e 'main-menu', // Optional. Default: menu\n    'theme_location' =\u003e 'main-menu'\n);\nbem_nav_menu($args);\n```\n\nYou have an additional argument to name your block to your convenience with the argument `base_class`.\n\n## Filter Hooks\n\nYes, you can easily adapt the functionality of this walker with the already known filter hooks and a few custom ones.\n\n### MBT/WalkerNavMenu/renderToggle - string $title\n\n| Parameter | Default | Functionality |\n|  --- | --- | --- | \n| `boolean $render` | true | Enables the rendering of an no-JS toggle with radioboxes |\n\n### MBT/WalkerNavMenu/menuToggleTitle\n\n| Parameter | Default | Functionality |\n|  --- | --- | --- |\n| `string $title` | title attribute for toggle anchor | To localize this string add a filter. |\n\n### MBT/WalkerNavMenu/menuToggleContent\n\n| Parameter | Default | Functionality |\n|  --- | --- | --- | \n| `string $content` | string of a caret SVG | An additional toggle item for nested menus. |\n\n### MBT/WalkerNavMenu/autoArchiveMenu\n\n| Parameter | Default | Functionality |\n|  --- | --- | --- | \n| `boolean $render, int $depth, object $item` | false | Enables an automated post type archive sub menu |\n\n### MBT/WalkerNavMenu/autoTaxonomyMenu\n\n| Parameter | Default | Functionality |\n|  --- | --- | --- | \n| `boolean $render, int $depth, object $item` | false | Enables an automated posts per term of taxonomy sub menu |\n\n###  MBT/WalkerNavMenu/PostTypeArchive/queryArgs/postType={$postType} \n\n| Parameter | Default | Functionality |\n|  --- | --- | --- | \n| `array $query_args` | [see below](#default-post-type-archive-arguments) | Adapt the automated sub menu query for $postType |\n\n#### Default post type archive arguments\n\n```php\narray(\n    'post_type' =\u003e $item-\u003eobject,\n    'posts_per_page' =\u003e -1,\n    'post_parent' =\u003e 0,\n)\n```\n\n### MBT/WalkerNavMenu/TermChildren/queryArgs/taxonomy={$taxonomy} \n\n| Parameter | Default | Functionality |\n|  --- | --- | --- | \n| `array $query_args` | [see below](#default-term-children-arguments) | Adapt the automated sub menu query for $taxonomy |\n\n\n#### Default term children arguments\n\n```php\narray(\n    'post_type' =\u003e $taxonomy-\u003eobject_type,\n    'posts_per_page' =\u003e -1,\n    'post_parent' =\u003e 0,\n    'tax_query' =\u003e array(\n        array(\n            'taxonomy' =\u003e $item-\u003eobject,\n            'field' =\u003e 'id',\n            'terms' =\u003e $item-\u003eobject_id\n        )\n    )\n)\n```\n\n### MBT/WalkerNavMenu/mobileMenuContent\n\n| Parameter | Default | Functionality |\n|  --- | --- | --- |\n| `string $content` | string of html for the mobile toggle | An additional toggle item for mobile menus (burger). |\n\n\n## Credits\n[@iantsch](https://twitter.com/iantsch) - [web developer](https://mbt.wien) behind this and other projects.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiantsch%2Fmu-nav-menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiantsch%2Fmu-nav-menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiantsch%2Fmu-nav-menu/lists"}