From c3abc04ce2d9f9f8f023e4cc528245fd07d59b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20L=C3=B3pez?= Date: Sun, 12 Oct 2008 22:36:56 +0000 Subject: [PATCH] #309572: Code review by wmostrey #232308: Show devel links feature --- simplemenu.module | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/simplemenu.module b/simplemenu.module index e55f9087..d6d35ad2 100644 --- a/simplemenu.module +++ b/simplemenu.module @@ -75,10 +75,23 @@ function simplemenu_admin_settings() { ); } + if (module_exists('devel')) { + $form['default_menu']['simplemenu_devel'] = array( + '#type' => 'checkbox', + '#title' => t('Add devel module links'), + '#default_value' => variable_get('simplemenu_devel', 0), + '#description' => t('Add devel module links for those users that can access the devel module.') + ); + } + $form['default_menu']['simplemenu_theme'] = array( '#type' => 'select', '#title' => t('Theme'), - '#options' => array('original' => 'original', 'blackblue' => 'black & blue', 'custom' => 'custom'), + '#options' => array( + 'original' => t('original'), + 'blackblue' => t('black & blue'), + 'custom' => t('custom'), + ), '#default_value' => variable_get('simplemenu_theme', 'original'), '#description' => t('Select which theme to use. If you specify custom, you need to define CSS in your theme.') ); @@ -156,7 +169,14 @@ function simplemenu_get_menu() { if (!$menu) { $menu = '
  • '. t('No menu items found. Try a different menu as the default.') .'
  • '; } - + + // This is ugly, I know, but it is the only way I can see to get the additional + // links inside the