<?php  
// $admin_menu = get_option('admin_menu');
// $sorting = new sorting;
// $admin_menu = $sorting->sort_by_meta_value($admin_menu, 'order', 'ASC');
// $admin_submenu = get_option('admin_submenu');
// $active_submenu = is_child_of($app->request_link);

?>
<!-- Left side column. contains the logo and sidebar -->
  <aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
      <!-- Sidebar user panel -->
      <div class="user-panel">
        <div class="pull-left image">
          <img src="<?php echo get_user_image($user_meta['id']); ?>" class="img-circle" alt="User Image">
        </div>
        <div class="pull-left info">
          <p><?php echo get_fullname($user_meta['id']) ?></p>
          <a href="#"><i class="fa fa-circle text-success"></i> <?php echo get_role_name($user_meta['role']) ?></a>
        </div>
      </div>
      <?php
        // do_action("menu_search"); 
        nav_menu([
          'menu_opening_container' => '<ul class="sidebar-menu" data-widget="tree"><li class="header">MAIN NAVIGATION</li>',
          'menu_closing_container' => '<li class="header">EXIT</li><li><a href="logout"><i class="fa fa-sign-out text-red"></i> <span>Logout</span></a></li></ul>',
          'has_child_class' => 'treeview',
          'menu_open_class' => 'menu-open',
          'has_child_toggle' => '<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>',
          'submenu_opening_container' => '<ul class="treeview-menu">',
          'submenu_closing_container' => '</ul>',
        ]);
      ?>
      
    </section>
    <!-- /.sidebar -->
  </aside>