1, 'garland_shoes' => 0, ); variable_set( str_replace('/', '_', 'theme_'. $theme_key .'_settings'), array_merge(theme_get_settings($theme_key), $defaults) ); // Force refresh of Drupal internals theme_get_setting('', TRUE); } /** * Override or insert variables into the templates. * * In this function, a hook refers to the name of a tpl.php file. Thus, case * 'page' affects page.tpl.php. 'node' affects node.tpl.php, and case 'block' * would affect block.tpl.php. * * @param $hook * string The name of the tpl.php file. * @param $original_vars * array A copy of the array containing the variables for the hook. * @return * array The array containing additional variables to merge with $original_vars. */ function _phptemplate_variables($hook, $original_vars) { $additional_vars = array(); switch ($hook) { case 'page': $additional_vars['garland_happy'] = theme_get_setting('garland_happy'); break; case 'node': $additional_vars['garland_shoes'] = theme_get_setting('garland_shoes'); break; } return $additional_vars; }