summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhimerus2009-07-12 01:38:19 (GMT)
committer himerus2009-07-12 01:38:19 (GMT)
commit168be94fb31321e197e74b80e6666a3f67ab396a (patch)
tree11240cb762c503927908eecb7bf6f6a51db4dd6b
parent464739dffaf878f89d8a5168045aaefedc07affe (diff)
adding in working subtheme model labeled polished. Still not ready for public use
-rw-r--r--js/omega_admin.js6
-rw-r--r--omega.info34
-rw-r--r--polished/favicon.icobin0 -> 15086 bytes
-rwxr-xr-xpolished/logo.pngbin0 -> 4735 bytes
-rw-r--r--polished/page.tpl.php130
-rw-r--r--polished/polished.info69
-rw-r--r--polished/template.php100
-rw-r--r--polished/theme-settings.php24
-rw-r--r--preprocess/preprocess-page.inc153
-rw-r--r--template.php19
-rw-r--r--template.theme-registry.inc54
-rw-r--r--theme-functions.inc18
-rw-r--r--theme-settings.php74
13 files changed, 542 insertions, 139 deletions
diff --git a/js/omega_admin.js b/js/omega_admin.js
new file mode 100644
index 0000000..bc66249
--- /dev/null
+++ b/js/omega_admin.js
@@ -0,0 +1,6 @@
+$(document).ready(function(){
+ $(function(){
+
+ });
+
+});
diff --git a/omega.info b/omega.info
index b846f0b..ac7e03d 100644
--- a/omega.info
+++ b/omega.info
@@ -34,7 +34,6 @@ regions[postscript_four] = postscript 4
regions[footer_first] = footer first
regions[footer_last] = footer last
-
features[] = logo
features[] = name
features[] = slogan
@@ -44,4 +43,35 @@ features[] = comment_user_picture
features[] = search
features[] = favicon
features[] = primary_links
-features[] = secondary_links \ No newline at end of file
+features[] = secondary_links
+
+
+; Set the default settings to be used in theme-settings.php
+
+settings[omega_header_first_width] = 6
+settings[omega_header_last_width] = 6
+
+settings[omega_preface_first_width] = 4
+settings[omega_preface_middle_width] = 4
+settings[omega_preface_last_width] = 8
+
+settings[omega_sidebar_first_width] = 4
+settings[omega_content_main_width] = 8
+settings[omega_sidebar_last_width] = 4
+
+settings[omega_postscript_one_width] = 4
+settings[omega_postscript_two_width] = 4
+settings[omega_postscript_three_width] = 4
+settings[omega_postscript_four_width] = 4
+
+settings[omega_content_layout] = first_content_last
+settings[front_page_title_display] = title_slogan
+settings[page_title_display_custom] = ''
+settings[other_page_title_display] = ptitle_slogan
+settings[other_page_title_display_custom] = ''
+
+settings[configurable_separator] = ' | '
+settings[mission_statement_pages] = home
+settings[omega_jqueryui] = 0
+settings[sidebar_combine] = 1
+settings[sidebar_contain_pages] = '' \ No newline at end of file
diff --git a/polished/favicon.ico b/polished/favicon.ico
new file mode 100644
index 0000000..0f9909a
--- /dev/null
+++ b/polished/favicon.ico
Binary files differ
diff --git a/polished/logo.png b/polished/logo.png
new file mode 100755
index 0000000..ca82c94
--- /dev/null
+++ b/polished/logo.png
Binary files differ
diff --git a/polished/page.tpl.php b/polished/page.tpl.php
new file mode 100644
index 0000000..b5a28ea
--- /dev/null
+++ b/polished/page.tpl.php
@@ -0,0 +1,130 @@
+<?php
+// $Id$
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
+
+<head>
+ <title><?php print $head_title; ?></title>
+ <?php print $head; ?>
+ <?php print $styles; ?>
+ <?php print $scripts; ?>
+</head>
+
+<body class="<?php print $body_classes; ?>">
+ <?php if (!empty($admin)) print $admin; ?>
+ <div id="page" class="container-16 clear-block">
+
+ <div id="site-header" class="grid-16 clear-block">
+
+ <div id="branding" class="grid-4 alpha">
+ <?php if ($linked_logo_img): ?>
+ <?php print $linked_logo_img; ?>
+ <?php endif; ?>
+ <?php if ($linked_site_name): ?>
+ <h1 id="site-name" class=""><?php print $linked_site_name; ?></h1>
+ <?php endif; ?>
+ </div><!-- /#branding -->
+
+
+
+ <?php if ($main_menu_links || $secondary_menu_links): ?>
+ <div id="site-menu" class="grid-12 omega">
+ <?php print $main_menu_links; ?>
+ <?php print $secondary_menu_links; ?>
+ </div>
+ <?php endif; ?>
+
+ <?php print $header_first; ?>
+ <?php print $header_last; ?>
+ </div><!-- /#site-header -->
+
+ <div id="internal-nav" class="grid-16">
+ <div id="slogan-bcrumb" class="grid-10 alpha">
+ <?php if ($site_slogan && $is_front): ?>
+ <div id="slogan"><?php print $site_slogan; ?></div>
+ <?php endif; ?>
+ <?php if($breadcrumb): ?>
+ <div id="bcrumb"><?php print $breadcrumb; ?></div>
+ <?php endif; ?>
+ </div>
+ <?php if ($search_box): ?>
+ <div id="search-box" class="grid-6 omega"><?php print $search_box; ?></div>
+ <?php endif; ?>
+
+ </div>
+
+ <div id="preface-wrapper" class="grid-16">
+ <?php print $preface_first; ?>
+ <?php print $preface_middle; ?>
+ <?php print $preface_last; ?>
+ </div><!-- /preface-wrapper -->
+
+ <div class="grid-16"><?php print $help; ?><?php print $messages; ?></div>
+ <div>
+ <div id="main-wrapper" class="column <?php print $main_content_classes; ?>">
+
+
+ <?php print $mission; ?>
+
+
+ <div id="content-top">
+ <?php print $content_top; ?>
+ </div>
+
+ <?php if ($tabs): ?>
+ <div id="content-tabs" class=""><?php print $tabs; ?></div>
+ <?php endif; ?>
+
+ <?php if ($title): ?>
+ <h1 class="title" id="page-title"><?php print $title; ?></h1>
+ <?php endif; ?>
+
+ <div id="main-content" class="region clear-block">
+ <?php print $content; ?>
+ </div>
+
+ <div id="content-bottom">
+ <?php print $content_bottom; ?>
+ </div>
+ </div>
+ </div>
+ <?php if ($sidebar_first): ?>
+ <div id="sidebar-first" class="column sidebar region <?php print $sidebar_first_classes; ?>">
+ <?php print $sidebar_first; ?>
+ </div>
+ <?php endif; ?>
+
+ <?php if ($sidebar_last): ?>
+ <div id="sidebar-last" class="column sidebar region <?php print $sidebar_last_classes; ?>">
+ <?php print $sidebar_last; ?>
+ </div>
+ <?php endif; ?>
+
+
+ <div id="postscript-wrapper" class="grid-16">
+ <?php print $postscript_one; ?>
+ <?php print $postscript_two; ?>
+ <?php print $postscript_three; ?>
+ <?php print $postscript_four; ?>
+ </div><!-- /postscript-wrapper -->
+
+
+ <div id="footer-first" class="grid-16 clear-block">
+ <?php print $footer_first; ?>
+ </div>
+ <div id="footer-last" class="grid-16 clear-block">
+ <?php print $footer_last; ?>
+ <?php if ($footer_message): ?>
+ <div id="footer-message">
+ <?php print $footer_message; ?>
+ </div>
+ <?php endif; ?>
+ </div>
+
+
+ </div>
+ <?php print $closure; ?>
+</body>
+</html>
diff --git a/polished/polished.info b/polished/polished.info
new file mode 100644
index 0000000..7c1a677
--- /dev/null
+++ b/polished/polished.info
@@ -0,0 +1,69 @@
+; $Id$
+name = Omega Polished
+description = Omega Sub-Theme with clean CSS styles
+screenshot = screenshot.png
+core = 6.x
+base theme = omega
+
+regions[sidebar_first] = sidebar first
+regions[sidebar_last] = sidebar last
+
+regions[header_first] = header first
+regions[header_last] = header last
+
+regions[preface_first] = preface first
+regions[preface_middle] = preface middle
+regions[preface_last] = preface last
+
+regions[content_top] = content top
+regions[content_bottom] = content bottom
+
+regions[postscript_one] = postscript 1
+regions[postscript_two] = postscript 2
+regions[postscript_three] = postscript 3
+regions[postscript_four] = postscript 4
+
+regions[footer_first] = footer first
+regions[footer_last] = footer last
+
+features[] = logo
+features[] = name
+features[] = slogan
+features[] = mission
+features[] = node_user_picture
+features[] = comment_user_picture
+features[] = search
+features[] = favicon
+features[] = primary_links
+features[] = secondary_links
+
+
+; Set the default settings to be used in theme-settings.php
+
+settings[omega_header_first_width] = 6
+settings[omega_header_last_width] = 6
+
+settings[omega_preface_first_width] = 4
+settings[omega_preface_middle_width] = 4
+settings[omega_preface_last_width] = 8
+
+settings[omega_sidebar_first_width] = 4
+settings[omega_content_main_width] = 8
+settings[omega_sidebar_last_width] = 4
+
+settings[omega_postscript_one_width] = 4
+settings[omega_postscript_two_width] = 4
+settings[omega_postscript_three_width] = 4
+settings[omega_postscript_four_width] = 4
+
+settings[omega_content_layout] = first_content_last
+settings[front_page_title_display] = title_slogan
+settings[page_title_display_custom] = ''
+settings[other_page_title_display] = ptitle_slogan
+settings[other_page_title_display_custom] = ''
+
+settings[configurable_separator] = ' | '
+settings[mission_statement_pages] = home
+settings[omega_jqueryui] = 0
+settings[sidebar_combine] = 1
+settings[sidebar_contain_pages] = '' \ No newline at end of file
diff --git a/polished/template.php b/polished/template.php
new file mode 100644
index 0000000..4644ae7
--- /dev/null
+++ b/polished/template.php
@@ -0,0 +1,100 @@
+<?php
+// $Id$
+
+/*
+ * Add any conditional stylesheets you will need for this sub-theme.
+ *
+ * To add stylesheets that ALWAYS need to be included, you should add them to
+ * your .info file instead. Only use this section if you are including
+ * stylesheets based on certain conditions.
+ */
+/* -- Delete this line if you want to use and modify this code
+// Example: optionally add a fixed width CSS file.
+if (theme_get_setting('polished_fixed')) {
+ drupal_add_css(path_to_theme() . '/layout-fixed.css', 'theme', 'all');
+}
+// */
+
+
+/**
+ * Implementation of HOOK_theme().
+ */
+function polished_theme(&$existing, $type, $theme, $path) {
+ $hooks = omega_theme($existing, $type, $theme, $path);
+ // Add your theme hooks like this:
+ /*
+ $hooks['hook_name_here'] = array( // Details go here );
+ */
+ // @TODO: Needs detailed comments. Patches welcome!
+ return $hooks;
+}
+
+/**
+ * Override or insert variables into all templates.
+ *
+ * @param $vars
+ * An array of variables to pass to the theme template.
+ * @param $hook
+ * The name of the template being rendered (name of the .tpl.php file.)
+ */
+/* -- Delete this line if you want to use this function
+function polished_preprocess(&$vars, $hook) {
+ $vars['sample_variable'] = t('Lorem ipsum.');
+}
+// */
+
+/**
+ * Override or insert variables into the page templates.
+ *
+ * @param $vars
+ * An array of variables to pass to the theme template.
+ * @param $hook
+ * The name of the template being rendered ("page" in this case.)
+ */
+/* -- Delete this line if you want to use this function
+function polished_preprocess_page(&$vars, $hook) {
+ $vars['sample_variable'] = t('Lorem ipsum.');
+}
+// */
+
+/**
+ * Override or insert variables into the node templates.
+ *
+ * @param $vars
+ * An array of variables to pass to the theme template.
+ * @param $hook
+ * The name of the template being rendered ("node" in this case.)
+ */
+/* -- Delete this line if you want to use this function
+function polished_preprocess_node(&$vars, $hook) {
+ $vars['sample_variable'] = t('Lorem ipsum.');
+}
+// */
+
+/**
+ * Override or insert variables into the comment templates.
+ *
+ * @param $vars
+ * An array of variables to pass to the theme template.
+ * @param $hook
+ * The name of the template being rendered ("comment" in this case.)
+ */
+/* -- Delete this line if you want to use this function
+function polished_preprocess_comment(&$vars, $hook) {
+ $vars['sample_variable'] = t('Lorem ipsum.');
+}
+// */
+
+/**
+ * Override or insert variables into the block templates.
+ *
+ * @param $vars
+ * An array of variables to pass to the theme template.
+ * @param $hook
+ * The name of the template being rendered ("block" in this case.)
+ */
+/* -- Delete this line if you want to use this function
+function polished_preprocess_block(&$vars, $hook) {
+ $vars['sample_variable'] = t('Lorem ipsum.');
+}
+// */
diff --git a/polished/theme-settings.php b/polished/theme-settings.php
new file mode 100644
index 0000000..294d0f7
--- /dev/null
+++ b/polished/theme-settings.php
@@ -0,0 +1,24 @@
+<?php
+// $Id$
+
+// Include the definition of zen_settings() and zen_theme_get_default_settings().
+include_once './' . drupal_get_path('theme', 'omega') . '/theme-settings.php';
+/**
+ * Implementation of THEMEHOOK_settings() function.
+ *
+ * @param $saved_settings
+ * An array of saved settings for this theme.
+ * @return
+ * A form array.
+ */
+function polished_settings($saved_settings) {
+ // Get the default values from the .info file.
+ $defaults = omega_theme_get_default_settings('polished');
+ // Merge the saved variables and their default values.
+ $settings = array_merge($defaults, $saved_settings);
+ $form = array();
+ // Add the base theme's settings.
+ $form += omega_settings($saved_settings, $defaults);
+ // Return the form
+ return $form;
+}
diff --git a/preprocess/preprocess-page.inc b/preprocess/preprocess-page.inc
index bf25ea3..ceb3c5a 100644
--- a/preprocess/preprocess-page.inc
+++ b/preprocess/preprocess-page.inc
@@ -4,39 +4,10 @@
// $header_first
global $theme_key;
$settings = theme_get_settings($theme_key);
-//krumo($settings);
-$omega = array(
- // grid size/layout variable defaults
- // Header Regions
- 'omega_header_first_width' => ovars($settings['omega_header_first_width'], 6),
- 'omega_header_last_width' => ovars($settings['omega_header_last_width'], 6),
- // Preface Regions
- 'omega_preface_first_width' => ovars($settings['omega_preface_first_width'], 6),
- 'omega_preface_middle_width' => ovars($settings['omega_preface_middle_width'], 4),
- 'omega_preface_last_width' => ovars($settings['omega_preface_last_width'], 6),
- // Postscript Regions
- 'omega_postscript_one_width' => ovars($settings['omega_postscript_one_width'], 4),
- 'omega_postscript_two_width' => ovars($settings['omega_postscript_two_width'], 4),
- 'omega_postscript_three_width' => ovars($settings['omega_postscript_three_width'], 4),
- 'omega_postscript_four_width' => ovars($settings['omega_postscript_four_width'], 4),
- // Main Content Regions
- 'omega_content_layout' => ovars($settings['omega_content_layout'], 'first_content_last'),
- 'omega_sidebar_first_width' => ovars($settings['omega_sidebar_first_width'], 4),
- 'omega_content_main_width' => ovars($settings['omega_content_main_width'], 8),
- 'omega_sidebar_last_width' => ovars($settings['omega_sidebar_last_width'], 4),
- // page title information
- 'front_page_title_display' => ovars($settings['front_page_title_display'], 'title_slogan'),
- 'page_title_display_custom' => ovars($settings['page_title_display_custom'], ''),
- 'other_page_title_display' => ovars($settings['other_page_title_display'], 'ptitle_slogan'),
- 'other_page_title_display_custom' => ovars($settings['other_page_title_display_custom'], ''),
- 'configurable_separator' => ovars($settings['configurable_separator'], ' | '),
- 'mission_statement_pages' => ovars($settings['mission_statement_pages'], 'home'),
- 'omega_jqueryui' => ovars($settings['omega_jqueryui'], '0'),
- 'sidebar_combine' => ovars($settings['sidebar_combine'], '1'),
- 'sidebar_contain_pages' => ovars($settings['sidebar_contain_pages'], ''),
-);
+$omega = omega_theme_get_default_settings('omega');
+// Merge the saved variables and their default values.
+$settings = array_merge($omega, $settings);
$vars['omega'] = $omega;
-//krumo($vars);
/**
* Adding in the ability to combine the sidebars on certain paths in order to adjust
* layouts based on context of the page. My main purpose for this is in the admin
@@ -46,14 +17,14 @@ $vars['omega'] = $omega;
* unset the sidebar_last variable. This resets the layout to act like only one
* sidebar is present in certain paths
*/
- if ($omega['sidebar_contain_pages']) {
+ if ($settings['sidebar_contain_pages']) {
$path = drupal_get_path_alias($_GET['q']);
// Compare with the internal and path alias (if any).
- $page_match = drupal_match_path($path, $omega['sidebar_contain_pages']);
+ $page_match = drupal_match_path($path, $settings['sidebar_contain_pages']);
if ($path != $_GET['q']) {
- $page_match = $page_match || drupal_match_path($_GET['q'], $omega['sidebar_contain_pages']);
+ $page_match = $page_match || drupal_match_path($_GET['q'], $settings['sidebar_contain_pages']);
}
- $page_match = !($omega['sidebar_combine'] xor $page_match);
+ $page_match = !($settings['sidebar_combine'] xor $page_match);
if($page_match && substr($_GET['q'], 0, 17) != 'admin/build/block') {
$vars['sidebar_first'] = $vars['sidebar_first']. $vars['sidebar_last'];
unset($vars['sidebar_last']);
@@ -68,130 +39,142 @@ $vars['omega'] = $omega;
*/
if ($vars['header_first']) {
$vars['omega']['header_first_classes'] = ao($vars, array('header_first', 'header_last'), 'header_first', TRUE);
- $vars['header_first'] = '<div id="header-first" class="'.ns('grid-12', $vars['header_last'], $omega['omega_header_last_width']). $vars['omega']['header_first']. $vars['omega']['header_first_classes']. '">'. $vars['header_first']. '</div>';
+ $vars['header_first'] = '<div id="header-first" class="'.ns('grid-12', $vars['header_last'], $settings['omega_header_last_width']). $vars['omega']['header_first']. $vars['omega']['header_first_classes']. '">'. $vars['header_first']. '</div>';
}
// $header_last
if ($vars['header_last']) {
$vars['omega']['header_last_classes'] = ao($vars, array('header_first', 'header_last'), 'header_last', TRUE);
- $vars['header_last'] = '<div id="header-last" class="'.ns('grid-12', $vars['header_first'], $omega['omega_header_first_width']). $vars['omega']['header_last_classes']. '">'. $vars['header_last']. '</div>';
+ $vars['header_last'] = '<div id="header-last" class="'.ns('grid-12', $vars['header_first'], $settings['omega_header_first_width']). $vars['omega']['header_last_classes']. '">'. $vars['header_last']. '</div>';
}
/**
* Preface Region
* Same as above, preparing the preface regions to accept settings configurations
*/
if ($vars['preface_first']) {
+ // determine if this region needs an alpha or omega class applied
$vars['omega']['preface_first_classes'] = ao($vars, array('preface_first', 'preface_middle', 'preface_last'), 'preface_first');
+ // add the wrapper element, grid-x and alpha/omega classes
$vars['preface_first'] = '<div id="preface-first" class="preface '.ns(
'grid-16',
- $vars['preface_middle'], $omega['omega_preface_middle_width'],
- $vars['preface_last'], $omega['omega_preface_last_width'])
+ $vars['preface_middle'], $settings['omega_preface_middle_width'],
+ $vars['preface_last'], $settings['omega_preface_last_width'])
. ' '.$vars['omega']['preface_first_classes'].'">'
.$vars['preface_first']. '</div>';
}
if ($vars['preface_middle']) {
+ // determine if this region needs an alpha or omega class applied
$vars['omega']['preface_middle_classes'] = ao($vars, array('preface_first', 'preface_middle', 'preface_last'), 'preface_middle');
+ // add the wrapper element, grid-x and alpha/omega classes
$vars['preface_middle'] = '<div id="preface-middle" class="preface '.ns(
'grid-16',
- $vars['preface_first'], $omega['omega_preface_first_width'],
- $vars['preface_last'], $omega['omega_preface_last_width'])
+ $vars['preface_first'], $settings['omega_preface_first_width'],
+ $vars['preface_last'], $settings['omega_preface_last_width'])
. $vars['omega']['preface_middle_classes']. '">'
.$vars['preface_middle']. '</div>';
}
if ($vars['preface_last']) {
+ // determine if this region needs an alpha or omega class applied
$vars['omega']['preface_last_classes'] = ao($vars, array('preface_first', 'preface_middle', 'preface_last'), 'preface_last');
+ // add the wrapper element, grid-x and alpha/omega classes
$vars['preface_last'] = '<div id="preface-last" class="preface '.ns(
'grid-16',
- $vars['preface_first'], $omega['omega_preface_first_width'],
- $vars['preface_middle'], $omega['omega_preface_middle_width'])
+ $vars['preface_first'], $settings['omega_preface_first_width'],
+ $vars['preface_middle'], $settings['omega_preface_middle_width'])
. $vars['omega']['preface_last_classes']. '">'
.$vars['preface_last']. '</div>';
}
/**
* Body Region
* Configuration of $sidebar_first, $sidebar_last, and the main content zone
+ *
+ * This section needs MUCH cleanup as I know I can condense the switch
+ * statement to be much shorter than completely redeclaring each zone
+ * for each case that can be present.
+ *
+ * @todo cleanup switch statement
*/
switch($settings['omega_content_layout']){
default:
case 'first_content_last':
// FIRST - CONTENT - LAST
- $sl_max_width = $omega['omega_sidebar_first_width'] + $omega['omega_sidebar_last_width'];
- $sl_pull = $omega['omega_content_main_width'] + $omega['omega_sidebar_last_width'];
+ $sl_max_width = $omega['omega_sidebar_first_width'] + $settings['omega_sidebar_last_width'];
+ $sl_pull = $omega['omega_content_main_width'] + $settings['omega_sidebar_last_width'];
if ($vars['sidebar_first']) {
$vars['sidebar_first_classes'] =
ns('grid-'. $sl_max_width,
- $vars['sidebar_last'] || !$vars['sidebar_last'], $omega['omega_sidebar_last_width']
+ $vars['sidebar_last'] || !$vars['sidebar_last'], $settings['omega_sidebar_last_width']
). ' '. ns('pull-'. $sl_pull,
- $vars['sidebar_last'], $omega['omega_sidebar_last_width']
+ $vars['sidebar_last'], $settings['omega_sidebar_last_width']
);
}
if ($vars['sidebar_last']) {
$vars['sidebar_last_classes'] =
ns('grid-'. $sl_max_width,
- $vars['sidebar_first'] || !$vars['sidebar_first'], $omega['omega_sidebar_first_width']
+ $vars['sidebar_first'] || !$vars['sidebar_first'], $settings['omega_sidebar_first_width']
);
}
if($vars['content']) {
$vars['main_content_classes'] =
ns('grid-16',
- $vars['sidebar_first'], $omega['omega_sidebar_first_width'],
- $vars['sidebar_last'], $omega['omega_sidebar_last_width']
- ). ' '. ns('push-'. $omega['omega_sidebar_first_width'],
- !$vars['sidebar_first'], $omega['omega_sidebar_first_width']
+ $vars['sidebar_first'], $settings['omega_sidebar_first_width'],
+ $vars['sidebar_last'], $settings['omega_sidebar_last_width']
+ ). ' '. ns('push-'. $settings['omega_sidebar_first_width'],
+ !$vars['sidebar_first'], $settings['omega_sidebar_first_width']
);
}
break;
// CONTENT - FIRST - LAST
case 'content_first_last':
- $sl_max_width = $omega['omega_sidebar_first_width'] + $omega['omega_sidebar_last_width'];
- $sl_pull = $omega['omega_content_main_width'] + $omega['omega_sidebar_last_width'];
+ $sl_max_width = $settings['omega_sidebar_first_width'] + $settings['omega_sidebar_last_width'];
+ $sl_pull = $settings['omega_content_main_width'] + $settings['omega_sidebar_last_width'];
if ($vars['sidebar_first']) {
$vars['sidebar_first_classes'] =
ns('grid-'. $sl_max_width,
- $vars['sidebar_last'] || !$vars['sidebar_last'], $omega['omega_sidebar_last_width']
+ $vars['sidebar_last'] || !$vars['sidebar_last'], $settings['omega_sidebar_last_width']
);
}
if ($vars['sidebar_last']) {
$vars['sidebar_last_classes'] =
ns('grid-'. $sl_max_width,
- $vars['sidebar_first'] || !$vars['sidebar_first'], $omega['omega_sidebar_first_width']
+ $vars['sidebar_first'] || !$vars['sidebar_first'], $settings['omega_sidebar_first_width']
);
}
if($vars['content']) {
$vars['main_content_classes'] =
ns('grid-16',
- $vars['sidebar_first'], $omega['omega_sidebar_first_width'],
- $vars['sidebar_last'], $omega['omega_sidebar_last_width']
+ $vars['sidebar_first'], $settings['omega_sidebar_first_width'],
+ $vars['sidebar_last'], $settings['omega_sidebar_last_width']
);
}
break;
// FIRST - LAST - CONTENT
case 'first_last_content':
- $sl_max_width = $omega['omega_sidebar_first_width'] + $omega['omega_sidebar_last_width'];
- $sl_pull = $omega['omega_content_main_width'] + $omega['omega_sidebar_last_width'];
+ $sl_max_width = $settings['omega_sidebar_first_width'] + $settings['omega_sidebar_last_width'];
+ $sl_pull = $settings['omega_content_main_width'] + $settings['omega_sidebar_last_width'];
if ($vars['sidebar_first']) {
$vars['sidebar_first_classes'] =
ns('grid-'. $sl_max_width,
- $vars['sidebar_last'] || !$vars['sidebar_last'], $omega['omega_sidebar_last_width']
+ $vars['sidebar_last'] || !$vars['sidebar_last'], $settings['omega_sidebar_last_width']
). ' '. ns('pull-'. $sl_pull,
- $vars['sidebar_last'], $omega['omega_sidebar_last_width']
+ $vars['sidebar_last'], $settings['omega_sidebar_last_width']
);
}
if ($vars['sidebar_last']) {
$vars['sidebar_last_classes'] =
ns('grid-'. $sl_max_width,
- $vars['sidebar_first'] || !$vars['sidebar_first'], $omega['omega_sidebar_first_width']
+ $vars['sidebar_first'] || !$vars['sidebar_first'], $settings['omega_sidebar_first_width']
). ' '. ns('pull-'. $sl_pull,
- $vars['sidebar_first'], $omega['omega_sidebar_first_width']
+ $vars['sidebar_first'], $settings['omega_sidebar_first_width']
);
}
if($vars['content']) {
$vars['main_content_classes'] =
ns('grid-16',
- $vars['sidebar_first'], $omega['omega_sidebar_first_width'],
- $vars['sidebar_last'], $omega['omega_sidebar_last_width']
+ $vars['sidebar_first'], $settings['omega_sidebar_first_width'],
+ $vars['sidebar_last'], $settings['omega_sidebar_last_width']
). ' '. ns('push-'. $sl_max_width,
- !$vars['sidebar_first'], $omega['omega_sidebar_first_width']
+ !$vars['sidebar_first'], $settings['omega_sidebar_first_width']
);
}
break;
@@ -202,42 +185,50 @@ switch($settings['omega_content_layout']){
* Same as above, preparing the preface regions to accept settings configurations
*/
if ($vars['postscript_one']) {
+ // determine if this region needs an alpha or omega class applied
$vars['omega']['postscript_one_classes'] = ao($vars, array('postscript_one', 'postscript_two', 'postscript_three', 'postscript_four'), 'postscript_one');
+ // add the wrapper element, grid-x and alpha/omega classes
$vars['postscript_one'] = '<div id="postscript-one" class="postscript '.ns(
'grid-16',
- $vars['postscript_two'], $omega['omega_postscript_two_width'],
- $vars['postscript_three'], $omega['omega_postscript_three_width'],
- $vars['postscript_four'], $omega['omega_postscript_four_width'])
+ $vars['postscript_two'], $settings['omega_postscript_two_width'],
+ $vars['postscript_three'], $settings['omega_postscript_three_width'],
+ $vars['postscript_four'], $settings['omega_postscript_four_width'])
. ' '.$vars['omega']['postscript_one_classes'].'">'.
$vars['postscript_one'] . '</div>';
}
if ($vars['postscript_two']) {
+ // determine if this region needs an alpha or omega class applied
$vars['omega']['postscript_two_classes'] = ao($vars, array('postscript_one', 'postscript_two', 'postscript_three', 'postscript_four'), 'postscript_two');
+ // add the wrapper element, grid-x and alpha/omega classes
$vars['postscript_two'] = '<div id="postscript-two" class="postscript '.ns(
'grid-16',
- $vars['postscript_one'], $omega['omega_postscript_one_width'],
- $vars['postscript_three'], $omega['omega_postscript_three_width'],
- $vars['postscript_four'], $omega['omega_postscript_four_width'])
+ $vars['postscript_one'], $settings['omega_postscript_one_width'],
+ $vars['postscript_three'], $settings['omega_postscript_three_width'],
+ $vars['postscript_four'], $settings['omega_postscript_four_width'])
. ' '.$vars['omega']['postscript_two_classes'].'">'.
$vars['postscript_two'] . '</div>';
}
if ($vars['postscript_three']) {
+ // determine if this region needs an alpha or omega class applied
$vars['omega']['postscript_three_classes'] = ao($vars, array('postscript_one', 'postscript_two', 'postscript_three', 'postscript_four'), 'postscript_three');
+ // add the wrapper element, grid-x and alpha/omega classes
$vars['postscript_three'] = '<div id="postscript-three" class="postscript '.ns(
'grid-16',
- $vars['postscript_one'], $omega['omega_postscript_one_width'],
- $vars['postscript_two'], $omega['omega_postscript_two_width'],
- $vars['postscript_four'], $omega['omega_postscript_four_width'])
+ $vars['postscript_one'], $settings['omega_postscript_one_width'],
+ $vars['postscript_two'], $settings['omega_postscript_two_width'],
+ $vars['postscript_four'], $settings['omega_postscript_four_width'])
. ' '.$vars['omega']['postscript_three_classes'].'">'.
$vars['postscript_three'] . '</div>';
}
if ($vars['postscript_four']) {
+ // determine if this region needs an alpha or omega class applied
$vars['omega']['postscript_four_classes'] = ao($vars, array('postscript_one', 'postscript_two', 'postscript_three', 'postscript_four'), 'postscript_four');
+ // add the wrapper element, grid-x and alpha/omega classes
$vars['postscript_four'] = '<div id="postscript-four" class="postscript '.ns(
'grid-16',
- $vars['postscript_one'], $omega['omega_postscript_one_width'],
- $vars['postscript_two'], $omega['omega_postscript_two_width'],
- $vars['postscript_three'], $omega['omega_postscript_three_width'])
+ $vars['postscript_one'], $settings['omega_postscript_one_width'],
+ $vars['postscript_two'], $settings['omega_postscript_two_width'],
+ $vars['postscript_three'], $settings['omega_postscript_three_width'])
. ' '.$vars['omega']['postscript_four_classes'].'">'.
$vars['postscript_four'] .'</div>';
}
@@ -328,7 +319,7 @@ if (!module_exists('page_title')) {
}
// implement mission statement settings
$vars['mission'] = t(variable_get('site_mission', ''));
-if ($omega['mission_statement_pages'] == 'all' || $vars['is_front'] && $omega['mission_statement_pages'] == 'home') {
+if ($settings['mission_statement_pages'] == 'all' || $vars['is_front'] && $settings['mission_statement_pages'] == 'home') {
$vars['mission'] = '<div id="mission" class="">' .$vars['mission']. '</div>';
}
else {
diff --git a/template.php b/template.php
index 18687da..5c4e943 100644
--- a/template.php
+++ b/template.php
@@ -1,14 +1,21 @@
<?php
//$Id$
-require_once './'. drupal_get_path('theme', 'omega') ."/theme-functions.inc";
+// Report all PHP errors (see changelog)
+ini_set('error_reporting', E_ALL);
+require_once drupal_get_path('theme', 'omega') . '/template.theme-registry.inc';
/**
* Implementation of hook_theme().
*
* @return
*/
-function omega_theme() {
-
-}
+function omega_theme(&$existing, $type, $theme, $path) {
+ if (!db_is_active()) {
+ return array();
+ }
+ include_once './' . drupal_get_path('theme', 'omega') . '/template.theme-registry.inc';
+ return _omega_theme($existing, $type, $theme, $path);
+}// */
+
/**
* Implementation of hook_preprocess()
*
@@ -26,7 +33,7 @@ function omega_theme() {
*/
function omega_preprocess(&$vars, $hook) {
if(is_file(drupal_get_path('theme', 'omega') . '/preprocess/preprocess-' . str_replace('_', '-', $hook) . '.inc')) {
- include('preprocess/preprocess-' . str_replace('_', '-', $hook) . '.inc');
+ include_once('preprocess/preprocess-' . str_replace('_', '-', $hook) . '.inc');
}
}
/**
@@ -186,7 +193,7 @@ function omega_id_safe($string) {
}
/**
- * Return a themed breadcrumb trail.
+ * ZEN - Return a themed breadcrumb trail.
*
* @param $breadcrumb
* An array containing the breadcrumb links.
diff --git a/template.theme-registry.inc b/template.theme-registry.inc
new file mode 100644
index 0000000..49a362b
--- /dev/null
+++ b/template.theme-registry.inc
@@ -0,0 +1,54 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * Contains infrequently used theme registry build functions.
+ */
+/**
+ * Implements HOOK_theme().
+ *
+ * We are simply using this hook as a convenient time to do some related work.
+ */
+function _omega_theme(&$existing, $type, $theme, $path) {
+ // Since we are rebuilding the theme registry and the theme settings' default
+ // values may have changed, make sure they are saved in the database properly.
+ omega_theme_get_default_settings($theme);
+
+ // Return nothing.
+ return array();
+}
+/**
+ * Return the theme settings' default values from the .info and save them into the database.
+ *
+ * @param $theme
+ * The name of theme.
+ */
+function omega_theme_get_default_settings($theme) {
+ $themes = list_themes();
+
+ // Get the default values from the .info file.
+ $defaults = !empty($themes[$theme]->info['settings']) ? $themes[$theme]->info['settings'] : array();
+
+ if (!empty($defaults)) {
+ // Get the theme settings saved in the database.
+ $settings = theme_get_settings($theme);
+ // Don't save the toggle_node_info_ variables.
+ if (module_exists('node')) {
+ foreach (node_get_types() as $type => $name) {
+ unset($settings['toggle_node_info_' . $type]);
+ }
+ }
+ // Save default theme settings.
+ variable_set(
+ str_replace('/', '_', 'theme_' . $theme . '_settings'),
+ array_merge($defaults, $settings)
+ );
+ // If the active theme has been loaded, force refresh of Drupal internals.
+ if (!empty($GLOBALS['theme_key'])) {
+ theme_get_setting('', TRUE);
+ }
+ }
+ // Return the default settings.
+ return $defaults;
+}
diff --git a/theme-functions.inc b/theme-functions.inc
deleted file mode 100644
index 6a613c1..0000000
--- a/theme-functions.inc
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-/**
- * Provides a wrapper for theme_get_setting()
- * that will return either current or a default value
- * provided by omega_vars('variable_name', 'default_value')
- *
- * @param setting name $setting
- * @param default value $d
- * @return value
- */
-function ovars($s, $d){
- if ($s) {
- return $s;
- }
- else {
- return $d;
- }
-}
diff --git a/theme-settings.php b/theme-settings.php
index 4ef9dd6..297e4b7 100644
--- a/theme-settings.php
+++ b/theme-settings.php
@@ -2,9 +2,7 @@
// $Id$
// require_once for the functions that need to be available when we are outside
// of the omega theme in the administrative interface
-if (!function_exists('ovars')) {
- require_once 'theme-functions.inc';
-}
+include_once './' . drupal_get_path('theme', 'omega') . '/template.theme-registry.inc';
/**
* Implementation of THEMEHOOK_settings() function.
*
@@ -13,8 +11,20 @@ if (!function_exists('ovars')) {
* @return
* array A form array.
*/
-function omega_settings($saved_settings) {
- drupal_add_js(drupal_get_path('theme', 'omega'). '/js/omega_admin.js', 'module');
+function omega_settings($saved_settings, $subtheme_defaults = array()) {
+ // Add the form's CSS
+ //drupal_add_css(drupal_get_path('theme', 'omega') . '/theme-settings.css', 'theme');
+
+ // Add javascript to show/hide optional settings
+ drupal_add_js(drupal_get_path('theme', 'omega'). '/js/omega_admin.js', 'theme');
+
+ // Get the default values from the .info file.
+ $defaults = omega_theme_get_default_settings('omega');
+ // Allow a subtheme to override the default values.
+ $defaults = array_merge($defaults, $subtheme_defaults);
+ // Merge the saved variables and their default values.
+ $settings = array_merge($defaults, $saved_settings);
+
for($i=1;$i<=16;$i++){
$grids[$i]= $i;
}
@@ -55,7 +65,7 @@ function omega_settings($saved_settings) {
'#title' => t('Set text of front page title'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
- '#default_value' => ovars($saved_settings['front_page_title_display'], ''),
+ '#default_value' => $saved_settings['front_page_title_display'],
'#options' => array(
'title_slogan' => t('Site title | Site slogan'),
'slogan_title' => t('Site slogan | Site title'),
@@ -67,7 +77,7 @@ function omega_settings($saved_settings) {
'#type' => 'textfield',
'#title' => t('Custom'),
'#size' => 60,
- '#default_value' => ovars($saved_settings['page_title_display_custom'], ''),
+ '#default_value' => $saved_settings['page_title_display_custom'],
'#description' => t('Enter a custom page title for your front page'),
);
// other pages title
@@ -82,7 +92,7 @@ function omega_settings($saved_settings) {
'#title' => t('Set text of other page titles'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
- '#default_value' => ovars($saved_settings['other_page_title_display'], 'ptitle_slogan'),
+ '#default_value' => $saved_settings['other_page_title_display'],
'#options' => array(
'ptitle_slogan' => t('Page title | Site slogan'),
'ptitle_stitle' => t('Page title | Site title'),
@@ -95,7 +105,7 @@ function omega_settings($saved_settings) {
'#type' => 'textfield',
'#title' => t('Custom'),
'#size' => 60,
- '#default_value' => ovars($saved_settings['other_page_title_display_custom'], ''),
+ '#default_value' => $saved_settings['other_page_title_display_custom'],
'#description' => t('Enter a custom page title for all other pages'),
);
// SEO configurable separator
@@ -104,7 +114,7 @@ function omega_settings($saved_settings) {
'#title' => t('Title separator'),
'#description' => t('Customize the separator character used in the page title'),
'#size' => 60,
- '#default_value' => ovars($saved_settings['configurable_separator'], ' | '),
+ '#default_value' => $saved_settings['configurable_separator'],
);
} else {
$form['omega_container']['omega_general']['page_format_titles']['#description'] = 'NOTICE: You currently have the "Page Title" module installed and enabled, so the Page titles theme settings have been disabled to prevent conflicts. If you wish to re-enable the Page titles theme settings, you must first disable the "Page Title" module.';
@@ -121,7 +131,7 @@ function omega_settings($saved_settings) {
$form['omega_container']['omega_general']['breadcrumb']['omega_breadcrumb'] = array(
'#type' => 'select',
'#title' => t('Display breadcrumb'),
- '#default_value' => ovars($saved_settings['omega_breadcrumb'], 'yes'),
+ '#default_value' => $saved_settings['omega_breadcrumb'],
'#options' => array(
'yes' => t('Yes'),
'admin' => t('Only in admin section'),
@@ -132,25 +142,25 @@ function omega_settings($saved_settings) {
'#type' => 'textfield',
'#title' => t('Breadcrumb separator'),
'#description' => t('Text only. Don’t forget to include spaces.'),
- '#default_value' => ovars($saved_settings['omega_breadcrumb_separator'], ' / '),
+ '#default_value' => $saved_settings['omega_breadcrumb_separator'],
'#size' => 5,
'#maxlength' => 10,
);
$form['omega_container']['omega_general']['breadcrumb']['omega_breadcrumb_home'] = array(
'#type' => 'checkbox',
'#title' => t('Show home page link in breadcrumb'),
- '#default_value' => ovars($saved_settings['omega_breadcrumb_home'], 1),
+ '#default_value' => $saved_settings['omega_breadcrumb_home'],
);
$form['omega_container']['omega_general']['breadcrumb']['omega_breadcrumb_trailing'] = array(
'#type' => 'checkbox',
'#title' => t('Append a separator to the end of the breadcrumb'),
- '#default_value' => ovars($saved_settings['omega_breadcrumb_trailing'], 0),
+ '#default_value' => $saved_settings['omega_breadcrumb_trailing'],
'#description' => t('Useful when the breadcrumb is placed just before the title.'),
);
$form['omega_container']['omega_general']['breadcrumb']['omega_breadcrumb_title'] = array(
'#type' => 'checkbox',
'#title' => t('Append the content title to the end of the breadcrumb'),
- '#default_value' => ovars($saved_settings['omega_breadcrumb_title'], 1),
+ '#default_value' => $saved_settings['omega_breadcrumb_title'],
'#description' => t('Useful when the breadcrumb is not placed just before the title.'),
);
@@ -166,7 +176,7 @@ function omega_settings($saved_settings) {
'#type' => 'radios',
'#description' => t('The Omega theme provides jQueryUI functionality. You will need to turn this off if you are using the jQuery UI module.'),
'#title' => t('Include jQuery UI?'),
- '#default_value' => ovars($saved_settings['omega_jqueryui'], 0),
+ '#default_value' => $saved_settings['omega_jqueryui'],
'#options' => array(
t('Do NOT include jQueryUI'),
t('DO include jQueryUI'),
@@ -182,7 +192,7 @@ function omega_settings($saved_settings) {
$form['omega_container']['omega_general']['mission_statement']['mission_statement_pages'] = array(
'#type' => 'radios',
'#title' => t('Where should your mission statement be displayed?'),
- '#default_value' => ovars($saved_settings['mission_statement_pages'], 'home'),
+ '#default_value' => $saved_settings['mission_statement_pages'],
'#options' => array(
'home' => t('Display mission statement only on front page'),
'all' => t('Display mission statement on all pages'),
@@ -209,14 +219,14 @@ function omega_settings($saved_settings) {
$form['omega_container']['omega_regions']['headers']['omega_header_first_width'] = array(
'#type' => 'select',
'#title' => t('Contextual Width for Header First'),
- '#default_value' => ovars($saved_settings['omega_header_first_width'], 6),
+ '#default_value' => $saved_settings['omega_header_first_width'],
'#options' => $grids,
'#description' => t('This number, paired with the Header Last determine the share of your grid for each element.'),
);
$form['omega_container']['omega_regions']['headers']['omega_header_last_width'] = array(
'#type' => 'select',
'#title' => t('Contextual Width for Header First'),
- '#default_value' => ovars($saved_settings['omega_header_last_width'], 6),
+ '#default_value' => $saved_settings['omega_header_last_width'],
'#options' => $grids,
'#description' => t('This number, paired with the Header First determine the share of your grid for each element.'),
);
@@ -231,21 +241,21 @@ function omega_settings($saved_settings) {
$form['omega_container']['omega_regions']['preface']['omega_preface_first_width'] = array(
'#type' => 'select',
'#title' => t('Contextual Width for Preface First'),
- '#default_value' => ovars($saved_settings['omega_preface_first_width'], 6),
+ '#default_value' => $saved_settings['omega_preface_first_width'],
'#options' => $grids,
'#description' => t('This number, combined with the Preface Middle and Preface Last determine the share of your grid for each element.'),
);
$form['omega_container']['omega_regions']['preface']['omega_preface_middle_width'] = array(
'#type' => 'select',
'#title' => t('Contextual Width for Preface Middle'),
- '#default_value' => ovars($saved_settings['omega_preface_middle_width'], 4),
+ '#default_value' => $saved_settings['omega_preface_middle_width'],
'#options' => $grids,
'#description' => t('This number, combined with the Preface First and Preface Last determine the share of your grid for each element.'),
);
$form['omega_container']['omega_regions']['preface']['omega_preface_last_width'] = array(
'#type' => 'select',
'#title' => t('Contextual Width for Preface Last'),
- '#default_value' => ovars($saved_settings['omega_preface_last_width'], 6),
+ '#default_value' => $saved_settings['omega_preface_last_width'],
'#options' => $grids,
'#description' => t('This number, combined with the Preface First and Preface Middle determine the share of your grid for each element.'),
);
@@ -261,7 +271,7 @@ function omega_settings($saved_settings) {
'#type' => 'radios',
'#description' => t('You may arrange the order and size of your sidebars and main content zones here.'),
'#title' => t('Content Zone Layout'),
- '#default_value' => ovars($saved_settings['omega_content_layout'], first_content_last),
+ '#default_value' => $saved_settings['omega_content_layout'],
'#options' => array(
'first_content_last' => t('Sidebar First - Content - Sidebar Last'),
'content_first_last' => t('Content - Sidebar First - Sidebar Last'),
@@ -271,21 +281,21 @@ function omega_settings($saved_settings) {
$form['omega_container']['omega_regions']['main']['omega_sidebar_first_width'] = array(
'#type' => 'select',
'#title' => t('Contextual Width for Sidebar First'),
- '#default_value' => ovars($saved_settings['omega_sidebar_first_width'], 4),
+ '#default_value' => $saved_settings['omega_sidebar_first_width'],
'#options' => $grids,
'#description' => t('This number, combined with the Content Main and Sidebar Last determine the share of your grid for each element.'),
);
$form['omega_container']['omega_regions']['main']['omega_content_main_width'] = array(
'#type' => 'select',
'#title' => t('Contextual Width for Main Content Region'),
- '#default_value' => ovars($saved_settings['omega_content_main_width'], 8),
+ '#default_value' => $saved_settings['omega_content_main_width'],
'#options' => $grids,
'#description' => t('This number, combined with the Sidebar First and Sidebar Last determine the share of your grid for each element.'),
);
$form['omega_container']['omega_regions']['main']['omega_sidebar_last_width'] = array(
'#type' => 'select',
'#title' => t('Contextual Width for Sidebar Last'),
- '#default_value' => ovars($saved_settings['omega_sidebar_last_width'], 4),
+ '#default_value' => $saved_settings['omega_sidebar_last_width'],
'#options' => $grids,
'#description' => t('This number, combined with the Sidebar First and Main Content determine the share of your grid for each element.'),
);
@@ -296,12 +306,12 @@ function omega_settings($saved_settings) {
'#title' => t('Combine Sidebars'),
'#description' => t('This is useful for administrative pages, and in certain contexts. You may choose to in certain areas, combine the <strong>$sidebar_first</strong> and <strong>$sidebar_last</strong> to create one sidebar from the content of both.'),
'#options' => $options,
- '#default_value' => ovars($saved_settings['sidebar_combine'], 1),
+ '#default_value' => $saved_settings['sidebar_combine'],
);
$form['omega_container']['omega_regions']['main']['sidebar_contain_pages'] = array(
'#type' => 'textarea',
'#title' => t('Pages'),
- '#default_value' => ovars($saved_settings['sidebar_contain_pages'], ''),
+ '#default_value' => $saved_settings['sidebar_contain_pages'],
'#description' => $description,
);
// Preface Blocks
@@ -315,28 +325,28 @@ function omega_settings($saved_settings) {
$form['omega_container']['omega_regions']['postscript']['omega_postscript_one_width'] = array(
'#type' => 'select',
'#title' => t('Contextual Width for Postscript 1'),
- '#default_value' => ovars($saved_settings['omega_postscript_one_width'], 4),
+ '#default_value' => $saved_settings['omega_postscript_one_width'],
'#options' => $grids,
'#description' => t('This number, combined with the other Postscript content zones determines the share of your grid for each element.'),
);
$form['omega_container']['omega_regions']['postscript']['omega_postscript_two_width'] = array(
'#type' => 'select',
'#title' => t('Contextual Width for Postscript 2'),
- '#default_value' => ovars($saved_settings['omega_postscript_two_width'], 4),
+ '#default_value' => $saved_settings['omega_postscript_two_width'],
'#options' => $grids,
'#description' => t('This number, combined with the other Postscript content zones determines the share of your grid for each element.'),
);
$form['omega_container']['omega_regions']['postscript']['omega_postscript_three_width'] = array(
'#type' => 'select',
'#title' => t('Contextual Width for Postscript 3'),
- '#default_value' => ovars($saved_settings['omega_postscript_three_width'], 4),
+ '#default_value' => $saved_settings['omega_postscript_three_width'],
'#options' => $grids,
'#description' => t('This number, combined with the other Postscript content zones determines the share of your grid for each element.'),
);
$form['omega_container']['omega_regions']['postscript']['omega_postscript_four_width'] = array(
'#type' => 'select',
'#title' => t('Contextual Width for Postscript 4'),
- '#default_value' => ovars($saved_settings['omega_postscript_four_width'], 4),
+ '#default_value' => $saved_settings['omega_postscript_four_width'],
'#options' => $grids,
'#description' => t('This number, combined with the other Postscript content zones determines the share of your grid for each element.'),
);