Hello I'm trying to alter a content-type's menu options by code, since there will be new menus that keep being created on the site and I can't keep going back to the content type to keep adding every single menu to the Available Menus. I should be able to set the default available menus to all, or all custom... but I can't figure this out. I'm looking at the function menu_form_node_type_form_alter and created a module to override, however nothing changes, and the Main Menu is always the default available menu. I'm actually trying to prepopulate the parent menu through the URL, which only works if the parent menu is checked as available, but it's not working for all the new menus because the parent menu is not set as available ... How do I override the default menu option for a certain content type so that the available menu checkboxes gets set automatically to all of the custom menus that were created?
Thanks in advance!
update: still not figured out yet, but, I went straight into the core menu module and modified this piece of the function above:
$form['menu']['menu_options'] = array( '#type' => 'checkboxes', '#title' => t('Available menus'), '#default_value' => variable_get('menu_options_' . $type->type, array('main-menu')), '#options' => $menu_options, '#description' => t('The menus available to place links in for this content type.'),
changing the 'main-menu' to a different name actually works straight from core but doesn't work when trying to override with my own module.