1. Remove Notifications Menu Option
To hide the notifications menu from the instructor dashboard add the following code in either of the options below:
- Your child theme’s
functions.php
file - Make use of the Code Snippets add-on
if (! function_exists('ir_custom_remove_notifications_module')) {
/**
* Remove notifications module
*
* @param array $modules List of active modules.
* @return array Updated list of active modules.
*
* @author Kumar Rajpurohit <[email protected]>
*/
function ir_custom_remove_notifications_module($modules) {
// Check if module exists.
if (! array_key_exists('notifications', $modules)) {
return $modules;
}
// Remove module
unset($modules['notifications']);
return $modules;
}
add_filter('ir_filter_core_modules', 'ir_custom_remove_notifications_module');
}
2. Remove Profile Menu Option
To hide profile menu from the instructor dashboard hide the following code in either of the options below:
- Your child theme’s
functions.php
file - Make use of the Code Snippets add-on
if (! function_exists('ir_custom_remove_profile_link')) {
/**
* Remove the profile link from the instructor dashboard menu
*
* @param array $menu_items List of menu items.
* @return array Updated list of menu items.
*
* @author Kumar Rajpurohit <[email protected]>
*/
function ir_custom_remove_profile_link($menu_items) {
$menu_items = array(
array(
__('Logout', 'wdm_instructor_role'),
'instructor_reports',
wp_logout_url(site_url()),
'',
'menu-top',
'',
'dashicons-migrate'
)
);
return $menu_items;
}
add_filter('ir_filter_instructor_dashboard_menu_items', 'ir_custom_remove_profile_link');
}