Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nav_Menus component is not ready to handle many nav menus #464

Open
benoitchantre opened this issue May 6, 2019 · 0 comments
Open

Nav_Menus component is not ready to handle many nav menus #464

benoitchantre opened this issue May 6, 2019 · 0 comments
Assignees

Comments

@benoitchantre
Copy link
Contributor

benoitchantre commented May 6, 2019

Issue Overview

The component seems limited to handle only one nav menu. I think it should ready to handle multiple nav menus, because a theme often has many nav menus.

WP Rig should be usable with many nav menus without having to refactor the methods of this component.

Current Behavior

We have a PRIMARY_NAV_MENU_SLUG string to store nav menu slugs. This constant limits the usage of the component to one nav menu without having to refactor it.

Possible Solution

Rename PRIMARY_NAV_MENU_SLUG to $nav_menus. Add getters and setters to get/set the nav menus as an associative array with menu slugs and descriptif texts.

Refactor methods to use that array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant