diff --git a/admin_menu.inc b/admin_menu.inc
index e212970..879e9cb 100644
--- a/admin_menu.inc
+++ b/admin_menu.inc
@@ -686,6 +686,11 @@ function admin_menu_theme_settings() {
'#default_value' => variable_get('admin_menu_tweak_tabs', 0),
'#description' => t('Moves the tabs on all pages into the administration menu. Only possible for themes using the CSS classes tabs primary
and tabs secondary
.'),
);
+ $form['tweaks']['admin_menu_tweak_tabs_exclude_admin'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Don\'t move local tasks on admin pages'),
+ '#default_value' => variable_get('admin_menu_tweak_tabs_exclude_admin', 0),
+ );
$form['performance'] = array(
'#type' => 'fieldset',
diff --git a/admin_menu.module b/admin_menu.module
index 8a8dee1..1ede9f0 100644
--- a/admin_menu.module
+++ b/admin_menu.module
@@ -231,7 +231,14 @@ function admin_menu_page_build(&$page) {
);
}
if ($setting = variable_get('admin_menu_tweak_tabs', 0)) {
- $settings['tweak_tabs'] = $setting;
+ if (variable_get('admin_menu_tweak_tabs_exclude_admin', 0)) {
+ if (!path_is_admin(current_path())) {
+ $settings['tweak_tabs'] = $setting;
+ }
+ }
+ else {
+ $settings['tweak_tabs'] = $setting;
+ }
}
if ($_GET['q'] == 'admin/modules' || strpos($_GET['q'], 'admin/modules/list') === 0) {
$settings['tweak_modules'] = variable_get('admin_menu_tweak_modules', 0);