Skip to content

Commit

Permalink
Merge pull request #2 from jamesfawcett/feature/add-menu-class-support
Browse files Browse the repository at this point in the history
Output menu_class on menu wrapper.
  • Loading branch information
craigpearson authored Dec 3, 2020
2 parents 2b04d0b + e6f6beb commit a766620
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion walker.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class navWalker extends \Walker_Nav_Menu
public function __construct()
{
add_filter('wp_nav_menu_args', function ($args) {
$args['items_wrap'] = '<ul id="%1$s" class="' . $this->getPrefix() . $this->navListClass . '">%3$s</ul>';
$args['items_wrap'] = '<ul id="%1$s" class="' . $args['menu_class'] . ' ' . $this->getPrefix() . $this->navListClass . '">%3$s</ul>';

return $args;
});
Expand Down

0 comments on commit a766620

Please sign in to comment.