From 101751f02159038fba4033dbc56b3180a2daf106 Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Fri, 16 Jul 2010 16:22:48 +0000 Subject: [PATCH] Make new menu items expanded by default when the UNL module is enabled. git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x@141 20a16fea-79d4-4915-8869-1ea9d5ebf173 --- sites/all/modules/unl/unl.module | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sites/all/modules/unl/unl.module b/sites/all/modules/unl/unl.module index 0da780b8..58f15e10 100644 --- a/sites/all/modules/unl/unl.module +++ b/sites/all/modules/unl/unl.module @@ -119,3 +119,11 @@ function unl_menu() return $items; } + +function unl_form_alter(&$form, $form_state, $form_id) +{ + // Make new menu items expanded by default. + if ($form_id == 'menu_edit_item' && $form['mlid']['#value'] == 0) { + $form['expanded']['#default_value'] = TRUE; + } +} -- GitLab