Advertisement
Guest User

Untitled

a guest
May 2nd, 2014
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1.     class megaMenuWalker extends Walker_Nav_Menu {
  2.         function start_lvl(&$output, $depth = 0, $args = array()) {
  3.             $indent = str_repeat("\t", $depth);
  4.             if ($depth == 0) {
  5.                 $output .= "\n$indent<section>\n";
  6.             }
  7.             $output .= "<ul class=\"sub-menu\">\n";
  8.         }
  9.         function end_lvl(&$output, $depth = 0, $args = array()) {
  10.             $indent = str_repeat("\t", $depth);
  11.             $output .= "\n$indent</ul>\n";
  12.             if ($depth == 0) {
  13.                 $output .= "</section>\n";
  14.             }
  15.         }
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement