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

Menu attribute is being added to <span class="glyphicon...

Open Pezzab opened this issue 12 years ago • 5 comments

It seems the plugin is hijacking the title attribute (the field you can edit in the menu structure admin).

For instance if I add "Find out more about our services" to a menu item named "About" the source looks like this:

<a href="http://mysite.com/about/" title="About">
<span class="glyphicon Find out more about our services"></span>
 About
</a>

Also the navigation label ends up in the title attribute.

Ideally the mark up should look like this:

<a href="http://mysite.com/about/" title="Find out more about our services">
<span class="glyphicon"></span>
 About
</a>

Pezzab avatar Jan 22 '14 13:01 Pezzab

I have fixed this on my copy, just not so familiar with git stuff yet but will try to take care of it today.

n-i-m-a avatar Jan 22 '14 15:01 n-i-m-a

I've put my modified version here https://github.com/n-i-m-a/wp-bootstrap-navwalker, perhaps if everything is ok with it, it'll get merged with the main script soon.

n-i-m-a avatar Jan 22 '14 16:01 n-i-m-a

Great stuff - pretty quick off the block there n-i-m-a :)

Pezzab avatar Jan 22 '14 16:01 Pezzab

The class does hijack the title attribute as it is used to support glyphicons, menu headers and the disabled link feature in the menus from the menu manager. I will take a look at this on a border scope.

@n-i-m-a A quick note for you, altering line 85 will cause your dropdowns to be non functional unless you add javascript or css to dropdown on hover, and then your dropdowns will still be broken on touch devices. Bootstrap purposely does not link top level items so the menus are supported on all device types.

SideQuestDIY avatar Jan 22 '14 16:01 SideQuestDIY

@Pezzab quick but a little dirty I guess! :)

@twittem thanks for the note. you're absolutely right, had forgot completely about that.

n-i-m-a avatar Jan 22 '14 17:01 n-i-m-a