// Get menu description as global variable
function add_menu_description( $item_output, $item, $depth, $args ) {
global $description;
$description = $item->post_content;
return $item_output;
}
add_filter( \'walker_nav_menu_start_el\', \'add_menu_description\', 10, 4);
// Submenu walker to add image
class submenu_walker extends Walker_Nav_Menu {
function start_lvl( &$output, $depth = 0, $args = array() ) {
if(0 == $depth) {
global $description;
$output .= \'<ul class="sub-menu">\'.
\'<li class="row marginbottom1">\'.
\'<div class="col-sm-8 col-lg-9">\'.
\'<div class="menu-title">\'.
//$item->title.
\'</div>\'.
\'<div class="menu-description">\'.
$description.
\'</div>\'.
\'</div>\'.
\'<div class="col-sm-4 col-lg-3"><div class="menu-image img-rounded"></div></div>\'.
\'</li>\';
} else {
$output .= \'<ul class="sub-menu">\';
}
}
}