Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class megaMenuWalker extends Walker_Nav_Menu {
- function start_lvl(&$output, $depth = 0, $args = array()) {
- $indent = str_repeat("\t", $depth);
- if ($depth == 0) {
- $output .= "\n$indent<section>\n";
- }
- $output .= "<ul class=\"sub-menu\">\n";
- }
- function end_lvl(&$output, $depth = 0, $args = array()) {
- $indent = str_repeat("\t", $depth);
- $output .= "\n$indent</ul>\n";
- if ($depth == 0) {
- $output .= "</section>\n";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement