| 1 |
<?php
|
| 2 |
function adt_webapplication_regions() {
|
| 3 |
return array(
|
| 4 |
'right' => t('right sidebar'),
|
| 5 |
'left' => t('left sidebar'),
|
| 6 |
'content' => t('content'),
|
| 7 |
'header' => t('header'),
|
| 8 |
'navbar' => t('navbar'),
|
| 9 |
'footer' => t('footer'),
|
| 10 |
);
|
| 11 |
}
|
| 12 |
|
| 13 |
/*
|
| 14 |
* Initialize theme settings
|
| 15 |
*/
|
| 16 |
if (is_null(theme_get_setting('cto_fixedfluid'))) { // <-- if settings have never ben set
|
| 17 |
global $theme_key;
|
| 18 |
/*
|
| 19 |
* The default values for the theme variables. Make sure $defaults exactly
|
| 20 |
* matches the $defaults in the theme-settings.php file.
|
| 21 |
*/
|
| 22 |
$defaults = array(
|
| 23 |
'cto_layout_width' => 900,
|
| 24 |
'cto_fixedfluid' => 'px',
|
| 25 |
'cto_main_width' => '60',
|
| 26 |
'cto_subheader' => 0,
|
| 27 |
'cto_navbar' => 0,
|
| 28 |
'cto_font' => '',
|
| 29 |
'cto_iepngfix' => 1,
|
| 30 |
);
|
| 31 |
|
| 32 |
// Save theme settings with the defaults
|
| 33 |
variable_set(
|
| 34 |
str_replace('/', '_', 'theme_'. $theme_key .'_settings'),
|
| 35 |
array_merge($defaults, theme_get_settings($theme_key))
|
| 36 |
);
|
| 37 |
// Force refresh of Drupal internals
|
| 38 |
theme_get_setting('', TRUE);
|
| 39 |
}
|
| 40 |
|
| 41 |
if (theme_get_setting('cto_dropdown')) {
|
| 42 |
drupal_add_js(drupal_get_path('theme', 'adt_webapplication') . '/js/ddown.js', 'theme');
|
| 43 |
}
|
| 44 |
if (theme_get_setting('cto_iepngfix')) {
|
| 45 |
drupal_add_js(drupal_get_path('theme', 'adt_webapplication') . '/js/jquery.pngFix.pack.js', 'theme');
|
| 46 |
}
|