Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Use the following code snippet to add/remove the menu from the Learndash frontend dashboard.
- add_filter( 'learndash_dashboard_nav_menu', 'remove_menu_items_callback' );
- function remove_menu_items_callback( $menus ) {
- $url = Ld_Dashboard_Functions::instance()->ld_dashboard_get_url( 'dashboard' );
- // To remove 'Assignments' menu
- unset( $menus['instructor']['assignments'] );
- // To add menu 'Custom Menu'
- $menus['instructor']['custom-menu'] = array(
- 'url' => $url . '?tab=custom-menu',
- 'icon' => '',
- 'label' => esc_html__( 'Custom Menu', 'ld-dashboard' ),
- );
- return $menus;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement