function closeblock_initialization in Close Block 7
Same name and namespace in other branches
- 6 includes/closeblock.api.inc \closeblock_initialization()
Load settings.
1 call to closeblock_initialization()
- closeblock_init in ./
closeblock.module - Implements hook_init().
File
- includes/
closeblock.api.inc, line 28 - Module settings functions.
Code
function closeblock_initialization() {
if (user_access('closeblock')) {
global $theme, $user;
$current_theme = $theme ? $theme : variable_get('theme_default', 'garland');
$params = array(
'uid' => $user->uid,
'theme' => $current_theme,
);
$blocks = closeblock_closing_info_get($params);
drupal_static('closeblock_blocks', $blocks);
// Load the settings.
$current_theme = $theme ? $theme : variable_get('theme_default', 'garland');
$theme_settings = variable_get(str_replace('/', '_', 'theme_' . $current_theme . '_settings'), array());
$theme_settings = array_merge(closeblock_default_settings(), $theme_settings, array());
drupal_static('closeblock_theme_settings', $theme_settings);
}
}