'Main Menu',
'secondary' => 'Footer Menu',
) );
};
add_action( 'after_setup_theme', 'kit_setup' );
class kit_custom_main_menu extends Walker_Nav_Menu {
function start_lvl( &$output, $depth = 0, $args = array() ) {
// depth dependent classes
$indent = ( $depth > 0 ? str_repeat( "\t", $depth ) : '' ); // code indent
$display_depth = ( $depth + 1); // because it counts the first submenu as 0
$classes = array(
'sub-menu',
'menu-depth-' . $display_depth
);
$class_names = implode( ' ', $classes );
// build html
if ($display_depth == 1) {
$output .= "\n" . $indent . '
' . "\n";
} else {
$output .= "\n" . $indent . '' . "\n";
}
}
function start_el(&$output, $item, $depth = 0, $args=array(), $id = 0) {
$object = $item->object;
$type = $item->type;
$title = $item->title;
$description = $item->description;
$permalink = $item->url;
$theme_template_path = get_template_directory_uri();
if ($depth == 1) {
$output .= '
';
$output .= $title;
$output .= '
';
} else {
$output .= "