In this tip we'll learn how to add Custom Menu links in the Logged in Login panel.
The login panel is located in the top right section of the header /screen. If a user is logged in she sees a list of menu icons upon clicking on the name or the photo in the header.




0. Install the WPLMS Customizer plugin.
1. Go to WP Admin -> Plugins -> Editor -> WPLMS Customizer -> customizer_class.php
2. Add the following line in the function _construct :

PHP Code:

 

add_filter('wplms_logged_in_top_menu',array($this,'loggedin_login_panel'));  

 

3. a. To Add an extra element. Add the following function in the Class :

PHP Code:

 

function loggedin_login_panel($loggedin_menu){
  $loggedin_menu['custom']=array(
         'icon' => 'icon-exclamation', // Grab icon code from here : yoursite.com/wp-content/themes/wplms/css/icons-reference.html
         'label' => __('Custom','vibe'),
         'link' => 'http://google.com'
  );
  return $loggedin_menu;
 }  

 

3. b. Add multiple elements :


 

function loggedin_login_panel($loggedin_menu){
  $loggedin_menu['custom']=array(
         'icon' => 'icon-exclamation', // Grab icon code from here : yoursite.com/wp-content/themes/wplms/css/icons-reference.html
         'label' => __('Custom','vibe'),
         'link' => 'http://google.com'
  );
$loggedin_menu['custom_one']=array(
         'icon' => 'icon-plus-1', // Grab icon code from here : yoursite.com/wp-content/themes/wplms/css/icons-reference.html
         'label' => __('Custom 2','vibe'),
         'link' => 'http://xyz.com'
  );
  return $loggedin_menu;
 }  

 

3. b. To remove an Element. Add the following function in the Class :

PHP Code:

 

function loggedin_login_panel($loggedin_menu){
   unset($loggedin_menu['stats']); // stats, courses, messages, notifications, groups
   return $loggedin_menu;
}