Commit a2ae9245 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#192779 by gaele: (usability) only show theme tabs on the blocks page for...

#192779 by gaele: (usability) only show theme tabs on the blocks page for enabled themes, for consistency with the theme settings page
parent 8fb3d9f9
......@@ -162,13 +162,16 @@ function block_menu() {
);
$default = variable_get('theme_default', 'garland');
foreach (list_themes() as $key => $theme) {
$items['admin/build/block/list/'. $key] = array(
'title' => check_plain($theme->info['name']),
'page arguments' => array($key),
'type' => $key == $default ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK,
'weight' => $key == $default ? -10 : 0,
'file' => 'block.admin.inc',
);
// only show enabled themes
if ($theme->status) {
$items['admin/build/block/list/'. $key] = array(
'title' => check_plain($theme->info['name']),
'page arguments' => array($key),
'type' => $key == $default ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK,
'weight' => $key == $default ? -10 : 0,
'file' => 'block.admin.inc',
);
}
}
return $items;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment