wp-bootstrap-navwalker icon indicating copy to clipboard operation
wp-bootstrap-navwalker copied to clipboard

please add option for custom dropdown menu classes

Open jkd77 opened this issue 5 years ago • 0 comments

Thanks for contributing this, super helpful.

I just ran into a limitation that I thought might impact others. I had not run into an issue with this before, but I needed to control dropdown menu alignment and found I could not.

I added the following within start_lvl() replacing line 50:

if ( isset( $args->dropdown_menu_class ) ) { $classes = explode(" ", $args->dropdown_menu_class ); } else { // Default class to add to the file. $classes = array( 'dropdown-menu' ); }

Then usage looks like such:

'dropdown_menu_class' => 'dropdown-menu dropdown-menu-right'

jkd77 avatar Jan 08 '20 19:01 jkd77