wpdm_frontend – Add/Remove Author Dashboard Menus
1 min read
Updated Jan 26, 2026
Description
Use this filter to add menu items with author dashboard or remove any menu item from author dashboard
Parameters
One parameter is passed to this hook.
Usage
To add a new menu with author dashboard.
<?php add_filter('wpdm_frontend','wpdm_author_dashboard_menus',10,1); ?>
Examples
<?php
add_filter('wpdm_frontend','wpdm_author_dashboard_menus',10,1);
// $menu_items is an array containing current menu items
function wpdm_author_dashboard_menus($menu_items){
// Removing edit profile menu
unset($menu_items['edit-profile']);
//Adding new menu item using callback function
$menu_items['new-menu-id'] = array('label'=> __('Menu Title','text-domain'), 'callback' => 'CallbackFunction');
//Adding new menu item using short-code
$menu_items['new-menu-id'] = array('label'=> __('Menu Title','text-domain'), 'shortcode' => '[short_code_here]');
return $menu_items;
}
?>