diff -upr modules/menu/menu.admin.inc modules/menu/menu.admin.inc --- modules/menu/menu.admin.inc 2008-11-15 02:23:07.000000000 -0600 +++ modules/menu/menu.admin.inc 2008-12-25 23:20:51.852700000 -0600 @@ -612,6 +612,15 @@ function menu_configure() { '#description' => t('Choose the menu to be the default in the menu options in the content authoring form.'), ); + $form['menu_default_node_menu_available_menus'] = array( + '#type' => 'select', + '#title' => t('Only show these menus'), + '#default_value' => variable_get('menu_default_node_menu_available_menus', array('main-menu' => 'main-menu')), + '#options' => $menu_options, + '#description' => t('Choose the menus that will appear in the menu options in the content authoring form.'), + '#multiple' => TRUE, + ); + $main = variable_get('menu_main_links_source', 'main-menu'); $main_options = array_merge($menu_options, array('' => t('No Main links'))); $form['menu_main_links_source'] = array( diff -upr modules/menu/menu.module modules/menu/menu.module --- modules/menu/menu.module 2008-12-16 17:57:32.000000000 -0600 +++ modules/menu/menu.module 2008-12-26 00:08:16.327700000 -0600 @@ -213,10 +213,14 @@ function menu_parent_options($menus, $it $limit = _menu_parent_depth_limit($item); } + $available_menus = variable_get('menu_default_node_menu_available_menus', array('main-menu' => 'main-menu')); + $in_admin_page = arg(0) == 'admin'; foreach ($menus as $menu_name => $title) { - $tree = menu_tree_all_data($menu_name, NULL); - $options[$menu_name . ':0'] = '<' . $title . '>'; - _menu_parents_recurse($tree, $menu_name, '--', $options, $item['mlid'], $limit); + if (isset($available_menus[$menu_name]) || $in_admin_page) { + $tree = menu_tree_all_data($menu_name, NULL); + $options[$menu_name . ':0'] = '<' . $title . '>'; + _menu_parents_recurse($tree, $menu_name, '--', $options, $item['mlid'], $limit); + } } return $options; }