function collapsiblock_load in Collapsiblock 6
Load needed files.
1 call to collapsiblock_load()
- collapsiblock_init in ./
collapsiblock.module - Implementation of hook_init().
File
- ./
collapsiblock.module, line 69 - Make blocks collapsible.
Code
function collapsiblock_load() {
static $loaded = FALSE;
if (!$loaded) {
global $theme;
$current_theme = $theme ? $theme : variable_get('theme_default', 'garland');
$collapsiblock_path = drupal_get_path('module', 'collapsiblock');
$theme_settings = theme_get_settings($current_theme);
$theme_settings = array_merge(collapsiblock_default_settings(), $theme_settings, array());
jstools_add_js(drupal_get_path('module', 'collapsiblock') . '/collapsiblock.js');
drupal_add_js(drupal_get_path('module', 'jstools') . '/jquery.cookie.js');
drupal_add_js(array(
'collapsiblock' => array(
'blocks' => variable_get('collapsiblock_settings', array()),
'default_state' => variable_get('collapsiblock_default_state', 1),
'slide_type' => variable_get('collapsiblock_slide_type', 1),
'slide_speed' => variable_get('collapsiblock_slide_speed', 200),
'block_title' => $theme_settings['collapsiblock_title'],
'block' => $theme_settings['collapsiblock_block'],
'block_content' => $theme_settings['collapsiblock_content'],
),
), 'setting');
drupal_add_css($collapsiblock_path . '/collapsiblock.css');
$loaded = TRUE;
}
}