Index: admin_menu.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.inc,v
retrieving revision 1.11.2.20.2.30
diff -u -p -r1.11.2.20.2.30 admin_menu.inc
--- admin_menu.inc 11 Mar 2010 03:28:47 -0000 1.11.2.20.2.30
+++ admin_menu.inc 14 Jun 2010 14:23:21 -0000
@@ -278,6 +278,12 @@ function admin_menu_theme_settings() {
'#default_value' => variable_get('admin_menu_tweak_tabs', 0),
'#description' => t('If enabled, the tabs on the current page are moved into the administration menu. This feature is only available in themes that use the CSS classes tabs primary and tabs secondary for tabs.'),
);
+ $form['tweaks']['admin_menu_create_content'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Copy \'Add new content\' into admin_menu menu.'),
+ '#default_value' => variable_get('admin_menu_create_content', 1),
+ '#description' => t('If enabled, the \'Add new content\' items are copy into the administration menu.'),
+ );
// Fetch all available modules manually, since module_list() only returns
// currently enabled modules, which makes this setting pointless if developer
Index: admin_menu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.module,v
retrieving revision 1.43.2.17.2.30
diff -u -p -r1.43.2.17.2.30 admin_menu.module
--- admin_menu.module 20 Feb 2010 01:02:58 -0000 1.43.2.17.2.30
+++ admin_menu.module 14 Jun 2010 14:23:24 -0000
@@ -120,9 +120,8 @@ function admin_menu_menu_alter(&$items)
$items[$path]['menu_name'] = 'admin_menu';
}
}
-/*
// Copy 'Add new content' into admin_menu menu.
- elseif (strpos($path, 'node/add') === 0) {
+ elseif (variable_get('admin_menu_create_content', 1) && strpos($path, 'node/add') === 0) {
$newpath = 'admin/' . $path;
$items[$newpath] = admin_menu_copy_item($item, $path, $newpath);
$items[$newpath]['menu_name'] = 'admin_menu';
@@ -130,7 +129,6 @@ function admin_menu_menu_alter(&$items)
$items[$newpath]['weight'] = -15;
}
}
-*/
}
// Remove 'admin', so children appear on the top-level.