Closed imaginegrafix closed 11 years ago
Removing this block of code seems to fix the issue and everything is functioning on the front end properly, just want to be sure it is safe to remove this:
function start_lvl( &$output, $depth ) {
$indent = str_repeat( "\t", $depth );
$output .= "\n$indent<ul class=\"dropdown-menu\">\n";
}
Interesting as I don't the that same error with 3.6, are you using version 1.4.3 of the walker?
Removing that block will make it so the menu can only have one level (no dropdowns)
Yes, using the most current version and using with theme-hybrid - it does seem to be theme specific as if activate twentyten the error messages go away.
Am I losing anything vital by removing that code?
You will lose the ability to use dropdown menus. As a point of curiosity can you share your wp_nav_menu()
menu declaration block from your theme?
Thanks for the quick reply - here is what I have:
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'depth' => 2, 'container' => 'nav', 'walker' => new wp_bootstrap_navwalker(), 'container_class' => 'nav-collapse', 'menu_class' => 'nav', 'menu_id' => 'menu-primary-items', 'fallback_cb' => 'wp_page_menu' ) ); ?>
Hey @imaginegrafix sorry for the delay, I have been crazy busy. I don't get the same errors on 3.6 and haven't been able to replicate the issue. I merged @wboptimise's commit to add strict declarations, can you try the latest file and let me know if you still have an issue?
Looks like it is all good now - thanks much; greatly appreciated!
Awesome! Glad its working now :)
Getting the following messages after upgrading to 3.6:
Strict Standards: Declaration of wp_bootstrap_navwalker::start_lvl() should be compatible with Walker::start_lvl(&$output, $depth = 0, $args = Array) in wp_bootstrap_navwalker.php on line 143
Warning: Cannot modify header information - headers already sent by (output started at wp_bootstrap_navwalker.php:143) in wp-includes/option.php on line 571
Warning: Cannot modify header information - headers already sent by (output started at wp_bootstrap_navwalker.php:143) in wp-includes/option.php on line 572