fixing wrapping off canvas menu items
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 13 Mar 2018 12:35:58 +0000 (08:35 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 13 Mar 2018 12:35:58 +0000 (08:35 -0400)
removing br tags from off canvas menu items

lib/menu-walker.php

index 0ad3ace..21279e7 100644 (file)
@@ -103,7 +103,7 @@ class Glm_Theme_Off_Canvas_Walker extends Walker_Nav_Menu {
         if ( in_array( 'label', $classes ) ) {
             $item_html = preg_replace( '/<a[^>]*>(.*)<\/a>/iU', '<label>$1</label>', $item_html );
         }
-
+        $item_html = preg_replace("/<br>/", "", $item_html);
         $output .= $item_html;
     }