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

Strict Standards Error bootstrap navwalker

Open ghost opened this issue 13 years ago • 12 comments

Hi there

Just thought I should bring these issues to your attention.

I've been trying this in a theme but I got the following error:

Strict Standards: Declaration of wp_bootstrap_navwalker::start_lvl() should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in .../wp-content/themes/flat-portfolio/wp_bootstrap_navwalker.php on line 143

I was told on WordPress Answers that It means:

It means that the declaration of the start_lvl method in wp_bootstrap_navwalker should match the declaration of the method in Walker_Nav_Menu. It doesn't.

function start_lvl( &$output, $depth ) { VS.

function start_lvl( &$output, $depth = 0, $args = array() ) { Make the arguments match exactly and you should be fine.

Also I get Notice: Trying to get property of non-object errors with wp-debug set to true if the menu is not set. Please let me know how I can fix this.

Thanks and best

ghost avatar Aug 25 '13 17:08 ghost

Thanks for the feedback, I am currently working on this issue. The walker was built on the default walker from WordPress 3.4 and I see a lot has changed as far as standards go in 3.6 so I think its time I re:wrote the whole class. I am trying to publish the new walker for Bootstrap 3.0 today and then I will be creating a final-ish version for 2.3.

SideQuestDIY avatar Aug 26 '13 14:08 SideQuestDIY

Thanks sounds great :)

ghost avatar Aug 27 '13 09:08 ghost

Waiting for your 3.0 version ;)

prionkor avatar Aug 27 '13 09:08 prionkor

@prionkor The working 3.0 version RC1 can be found here. https://github.com/twittem/wp-bootstrap-navwalker/tree/Bootstrap-3.0+

Just working on some icon issues and the new read me, then we can switch it over to the master branch and retire the old script.

SideQuestDIY avatar Aug 27 '13 14:08 SideQuestDIY

wp-bootstrap-navwalker Version 2.0 for Bootstrap 3.0 is now live.

@cribby You were looking for the changes to the walker for Bootstrap 2.3.2, is that correct?

SideQuestDIY avatar Aug 27 '13 19:08 SideQuestDIY

@Cribby I have updated the script for Bootstrap 2.3.2 but I haven't found an elegant way to add it to the repository so I created a Gist for you with the updated files - https://gist.github.com/twittem/6358588

SideQuestDIY avatar Aug 27 '13 20:08 SideQuestDIY

Many thanks @twittem really appreciate it.

ghost avatar Aug 28 '13 00:08 ghost

Thanks for the gist. You could create a separate branch for the update for older bootstrap so anyone can download the branch if needed :) But gist works too..

prionkor avatar Sep 08 '13 17:09 prionkor

Important: Dropdown menu doesn't seem to work because of data-toggle and data-target attributes are missing. Fixed it you can see the working gist here https://gist.github.com/prionkor/6550191

All credit goes to @twittem

prionkor avatar Sep 13 '13 12:09 prionkor

Cool, thanks @prionkor :)

ghost avatar Sep 13 '13 14:09 ghost

Hey @prionkor, thanks for the update. I rewrote the class based on my new class for 3.0 and didn't even realize there was an issue. I finaly got arround to creating a new branch of the repository for the version for 2.3.2 that can be found here https://github.com/twittem/wp-bootstrap-navwalker/tree/For-Bootstrap-2.3.2

If you fork it, then update the file with your changes and create a pull request I will merge it so you get contributor credit on the main repo.

SideQuestDIY avatar Sep 13 '13 14:09 SideQuestDIY

@twittem Thanks! I am new to git. I will try that.

prionkor avatar Sep 13 '13 15:09 prionkor