diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-16 10:30:09 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-16 10:30:09 +0000 |
commit | a2ae92457ac8a80265971e477337ee9323f0084c (patch) | |
tree | 9e3a97e9a4f1617cb7f226dfded6f38e68a09df0 | |
parent | 8fb3d9f9f36e0309e1c5466da2db635ee05dcb52 (diff) | |
download | brdo-a2ae92457ac8a80265971e477337ee9323f0084c.tar.gz brdo-a2ae92457ac8a80265971e477337ee9323f0084c.tar.bz2 |
#192779 by gaele: (usability) only show theme tabs on the blocks page for enabled themes, for consistency with the theme settings page
-rw-r--r-- | modules/block/block.module | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/modules/block/block.module b/modules/block/block.module index 2d8c60015..0896f0105 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -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; } |