Skip to main content
1 of 2
Chapabu
  • 13.9k
  • 2
  • 40
  • 58

FYI it's a REALLY bad idea to hack core. Firstly, God knows what could break, and secondly..whatever changes you make will likely be over-written if/when you update core.

To answer your question, you're calling the $custom_theme as you should, but then assigning a Garland to $theme, which isn't used.

Try the following:

function mytheme_init() {
  // Hardcode the administration theme onto the blocks page
  if ($_GET['q'] == 'admin/build/block') {
    global $custom_theme;
    $custom_theme = 'garland';
  }
}

In your custom theme's template.php instead of in block.admin.inc

You might also want to look at the Administration Theme module or the Themekey module for admin theme options/theme switching.

EDIT

I forgot, the Admin module also comes with an admin theme option, and a pretty decent admin menu for end users (clients etc.).

Chapabu
  • 13.9k
  • 2
  • 40
  • 58