';
}
}
/**
* Called at the end of submenus. Where you can add the closing tags for a submenu wrapper.
*
* @param $output
* @param int $depth
* @param array $args
*/
function end_lvl( &$output, $depth = 0, $args = array() ) {
// Only add if it's the first level of submenus. Otherwise, ignore.
if ( $depth == 0 || $depth == 1 ) {
// Closing of `header.submenu`
$output .= '';
}
}
/**
* Generates the menu item open tags and the menu link
*
* @param $output
* @param $item
* @param int $depth
* @param array $args
* @param int $id
*/
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
if ( $depth == 0 ) {
$child_css_class = isset($args->walker->has_children) && $args->walker->has_children ? "" : "menu-item-no-children";
$item_classes = isset($item->classes) ? implode(' ', $item->classes) : '';
// Root-level item
$output .= '
';
$output .= sprintf('', esc_attr( $item->url )); ;
$output .= '';
$output .= apply_filters( 'the_title', $item->title, $item->ID );
$output .= '';
$output .= '';
$output .= '';
} elseif ( $depth == 2) {
// Sub sub-menu item
$item_classes = implode(' ', $item->classes);
$output .= '';
$output .= sprintf('', esc_attr( $item->url )); ;
$output .= '';
$output .= apply_filters( 'the_title', $item->title, $item->ID );
$output .= '';
$output .= '';
}
// Ignore any deeper levels
}
/**
* Generates the menu item close tags
*
* @param $output
* @param $item
* @param int $depth
* @param array $args
*/
function end_el( &$output, $item, $depth = 0, $args = array() ) {
if ( $depth == 0 ) {
// Root-level item
$output .= '';
} elseif ( $depth == 1 ) {
// Sub-menu item
$output .= '';
} elseif ( $depth == 2 ) {
// Sub-Sub-menu item
$output .= '';
}
// Ignore any deeper levels
}
}
class Bluemed_headermobilemenu_Custom_Nav_Menu extends Walker_Nav_Menu {
/**
* Called at the start of submenus. Where you can add the opening tags for a submenu wrapper.
*
* @param $output
* @param int $depth
* @param array $args
*/
function start_lvl( &$output, $depth = 0, $args = array() ) {
// Only add if it's the first level of submenus. Otherwise, ignore.
if ( $depth == 0 || $depth == 1) {
// Both lines below come from `header.submenu`
$output .= '';
}
}
/**
* Generates the menu item open tags and the menu link
*
* @param $output
* @param $item
* @param int $depth
* @param array $args
* @param int $id
*/
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
if ( $depth == 0 ) {
$child_css_class = isset($args->walker->has_children) && $args->walker->has_children ? "" : "menu-item-no-children";
$item_classes = isset($item->classes) ? implode(' ', $item->classes) : '';
// Root-level item
$output .= '';
} elseif ( $depth == 1 || $depth == 2) {
// Sub-menu item
$output .= '';
}
// Ignore any deeper levels
}
}class Bluemed_subfootermenu_Custom_Nav_Menu extends Walker_Nav_Menu {
/**
* Called at the start of submenus. Where you can add the opening tags for a submenu wrapper.
*
* @param $output
* @param int $depth
* @param array $args
*/
function start_lvl( &$output, $depth = 0, $args = array() ) {
// Only add if it's the first level of submenus. Otherwise, ignore.
if ( $depth == 0 ) {
// Both lines below come from `header.submenu`
$output .= '';
}
}
/**
* Called at the end of submenus. Where you can add the closing tags for a submenu wrapper.
*
* @param $output
* @param int $depth
* @param array $args
*/
function end_lvl( &$output, $depth = 0, $args = array() ) {
// Only add if it's the first level of submenus. Otherwise, ignore.
if ( $depth == 0 ) {
// Closing of `header.submenu`
$output .= '';
}
}
/**
* Generates the menu item open tags and the menu link
*
* @param $output
* @param $item
* @param int $depth
* @param array $args
* @param int $id
*/
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
if ( $depth == 0 ) {
// Root-level item
$output .= '';
} elseif ( $depth == 1 ) {
// Sub-menu item
$output .= '';
}
// Ignore any deeper levels
}
}