salcode / bootstrap-genesis

WordPress Genesis Child Theme setup to use Bootstrap, Sass, and Grunt
MIT License
184 stars 63 forks source link

Menus should be editable individually #137

Open bryanwillis opened 8 years ago

bryanwillis commented 8 years ago

I opened a pull request #136 about this.

Currently, it's either all in or all out for both menus, since the conditional checks are within the menu themselves. By removing those checks and using genesis filters we can add / remove support for the menus individually...

Example

remove_filter( 'genesis_do_nav', 'bsg_nav_menu');

or

remove_filter( 'genesis_do_subnav', 'bsg_nav_menu');

This would also allow us to remove ubermenu conditional check since we can just disable the menus and would allow you to use ubermenu on say the primary menu and keep bootstrap menu for secondary menu.

salcode commented 8 years ago

So if I understand the big idea here properly,

Currently

We're using WordPress filters wp_nav_menu and wp_nav_menu_args .

Prosposed

We use Genesis filters instead

My thoughts

I like this idea. Good call @bryanwillis

salcode commented 8 years ago

Based on the original work by @bryanwillis, I've created a branch with his changes rebased on the latest develop.