deshack / melany

Melany, a simple responsive WordPress theme focused on content, everywhere.
melany.deshack.net
GNU General Public License v3.0
17 stars 7 forks source link

Bootstrap_Walker Glyphicon issue #219

Closed deshack closed 10 years ago

deshack commented 10 years ago

Bootstrap_Walker applies the glyphicon markup every time the title attribute ($item->attr_title)is defined. This may cause errors, because not every title attribute is meant to set a glyphicon.

We need to add a check for glyphicons in the $item->attr_title through strpos(), like this:

strpos( $item->attr_title, 'glyphicon' )
deshack commented 10 years ago

695cce5 doesn't fix the issue. strpos( $item->attr_title, 'glyphicon' ) returns 0 and is treated as false. The right way to fix is:

strpos( $item->attr_title, 'glyphicon' ) !== false