You are here

function hosting_wizard_dummy_theme_block in Hosting 5

Clever hack to hide display of blocks during wizard.

The wizard installation tries to keep things as simple and uncluttered as possible, making basic use of the menus and forms.

This uses eval to replace the theme_block function implementation. It's done this way so it doesn't affect the interface of the rest of the site, and just clicking on home will make the site render normally.

Only way this could break is if the theme already had a $theme_block, which i consider unlikely, as most themes are phptemplate based these days.

This could probably work for a number of theme functions.

1 call to hosting_wizard_dummy_theme_block()
hosting_wizard_menu in ./hosting.wizard.inc
Wizard menu items.

File

./hosting.wizard.inc, line 616

Code

function hosting_wizard_dummy_theme_block() {
  $func = $GLOBALS['conf']['theme_default'] . "_blocks";
  if (!function_exists($func)) {
    drupal_eval("<?php function {$func}() { return ' ';}");
  }
}