We are having an issue where the "Show as expanded" checkbox is false whenever a new link is generated regardless of menu link weight.
Using the Superfish module we are displaying the menu block and tried to the following below to see if we can have the menu links expanded by default. However, during testing this is failing. We are using the latest Bootstrap theme as our base theme.
Test case:
1) Create a menu link for custom-menu
2) Navigate to admin page to view all the menu links
3) Click on edit on the menu link item
4) The Show as Expanded is disabled
Code (only hook in my .module file):
function mymodule_menu_link_alter(&$item, $menu) {
if($item['menu'] == 'custom-menu')
{
$item['expanded'] = 1;
}
}