Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
the following add will make ur menu link no visible if menu link it's empty and has no childs :
- file : admin.module
- function : admin_menu_navigation_links($tree, $admin_only = FALSE)
- modification
change
if (!$item['link']['hidden'] && (!$admin_only || !empty($item['link']['options']['admin']))) {
to
if (!$item['link']['hidden'] && ($item['below']) && (!$admin_only || !empty($item['link']['options']['admin']))) {