',
'walker' => new Dt_Inc_Classes_WidgetsCustomMenu_Walker()
);
echo $before_widget ;
// title
if ( $title ) echo $before_title . $title . $after_title;
wp_nav_menu( $args );
echo $after_widget;
}
/* Update the widget settings */
function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance['title'] = $new_instance['title'];
$instance['menu'] = $new_instance['menu'];
return $instance;
}
/**
* Displays the widget settings controls on the widget panel.
* Make use of the get_field_id() and get_field_name() function
* when creating your form elements. This handles the confusing stuff.
*/
function form( $instance ) {
/* Set up some default widget settings. */
$instance = wp_parse_args( (array) $instance, self::$widget_defaults );
// Get menus
$menus = get_terms( 'nav_menu', array( 'hide_empty' => false ) );
?>