#674394 by David_Rothstein: Move add/remove shortcut buttons to a theme setting, so that it does not appear on themes where it makes no sense.

merge-requests/26/head
Angie Byron 2010-01-14 06:47:54 +00:00
parent 6e4c7ffe51
commit fafabc7e2a
2 changed files with 12 additions and 9 deletions

View File

@ -558,6 +558,7 @@ function shortcut_preprocess_page(&$variables) {
$link_path = 'admin/config/system/shortcut/link/' . $mlid . '/delete'; $link_path = 'admin/config/system/shortcut/link/' . $mlid . '/delete';
} }
if (theme_get_setting('shortcut_module_link')) {
$variables['title_suffix']['add_or_remove_shortcut'] = array( $variables['title_suffix']['add_or_remove_shortcut'] = array(
'#attached' => array('css' => array(drupal_get_path('module', 'shortcut') . '/shortcut.css')), '#attached' => array('css' => array(drupal_get_path('module', 'shortcut') . '/shortcut.css')),
'#prefix' => '<div class="add-or-remove-shortcuts ' . $link_mode . '-shortcut">', '#prefix' => '<div class="add-or-remove-shortcuts ' . $link_mode . '-shortcut">',
@ -568,6 +569,7 @@ function shortcut_preprocess_page(&$variables) {
'#suffix' => '</div>', '#suffix' => '</div>',
); );
} }
}
} }
/** /**

View File

@ -7,6 +7,7 @@ core = 7.x
engine = phptemplate engine = phptemplate
stylesheets[screen][] = reset.css stylesheets[screen][] = reset.css
stylesheets[screen][] = style.css stylesheets[screen][] = style.css
settings[shortcut_module_link] = 1
regions[content] = Content regions[content] = Content
regions[help] = Help regions[help] = Help
regions[page_top] = Page top regions[page_top] = Page top