diff --git a/node.tpl.php b/node.tpl.php index a68844234fa1fadaa8e3ab2c833ee1426819643c..feee68ab0485c0d1dc8788e69be652f761127ea5 100755 --- a/node.tpl.php +++ b/node.tpl.php @@ -2,24 +2,42 @@ // $Id$ /** - * @file node.tpl.php - * - * Theme implementation to display a node. + * @file + * Default theme implementation to display a node. * * Available variables: * - $title: the (sanitized) title of the node. - * - $content: Node body or teaser depending on $teaser flag. - * - $picture: The authors picture of the node output from - * theme_user_picture(). - * - $date: Formatted creation date (use $created to reformat with - * format_date()). - * - $links: Themed links like "Read more", "Add new comment", etc. output - * from theme_links(). - * - $name: Themed username of node author output from theme_user(). + * - $content: An array of node items. Use render($content) to print them all, + * or print a subset such as render($content['field_example']). Use + * hide($content['field_example']) to temporarily suppress the printing of a + * given element. + * - $user_picture: The node author's picture from user-picture.tpl.php. + * - $date: Formatted creation date. Preprocess functions can reformat it by + * calling format_date() with the desired parameters on the $created variable. + * - $name: Themed username of node author output from theme_username(). * - $node_url: Direct url of the current node. - * - $terms: the themed list of taxonomy term links output from theme_links(). - * - $submitted: themed submission information output from - * theme_node_submitted(). + * - $display_submitted: whether submission information should be displayed. + * - $classes: String of classes that can be used to style contextually through + * CSS. It can be manipulated through the variable $classes_array from + * preprocess functions. The default values can be one or more of the + * following: + * - node: The current template type, i.e., "theming hook". + * - node-[type]: The current node type. For example, if the node is a + * "Blog entry" it would result in "node-blog". Note that the machine + * name will often be in a short form of the human readable label. + * - node-teaser: Nodes in teaser form. + * - node-preview: Nodes in preview mode. + * The following are controlled through the node publishing options. + * - node-promoted: Nodes promoted to the front page. + * - node-sticky: Nodes ordered above other non-sticky nodes in teaser + * listings. + * - node-unpublished: Unpublished nodes visible only to administrators. + * - $title_prefix (array): An array containing additional output populated by + * modules, intended to be displayed in front of the main title tag that + * appears in the template. + * - $title_suffix (array): An array containing additional output populated by + * modules, intended to be displayed after the main title tag that appears in + * the template. * * Other variables: * - $node: Full node object. Contains data that may not be safe. @@ -27,12 +45,15 @@ * - $comment_count: Number of comments attached to the node. * - $uid: User ID of the node author. * - $created: Time the node was published formatted in Unix timestamp. + * - $classes_array: Array of html class attribute values. It is flattened + * into a string within the variable $classes. * - $zebra: Outputs either "even" or "odd". Useful for zebra striping in * teaser listings. * - $id: Position of the node. Increments each time it's output. * * Node status variables: - * - $teaser: Flag for the teaser state. + * - $view_mode: View mode, e.g. 'full', 'teaser'... + * - $teaser: Flag for the teaser state (shortcut for $view_mode == 'teaser'). * - $page: Flag for the full page state. * - $promote: Flag for front page promotion state. * - $sticky: Flags for sticky post setting. @@ -44,27 +65,46 @@ * - $logged_in: Flags true when the current user is a logged-in member. * - $is_admin: Flags true when the current user is an administrator. * + * Field variables: for each field instance attached to the node a corresponding + * variable is defined, e.g. $node->body becomes $body. When needing to access + * a field's raw values, developers/themers are strongly encouraged to use these + * variables. Otherwise they will have to explicitly specify the desired field + * language, e.g. $node->body['en'], thus overriding any language negotiation + * rule that was previously applied. + * * @see template_preprocess() * @see template_preprocess_node() + * @see template_process() */ ?> -> +
> - + -

+ +

>

+ - - + + + +
> + +
+ +
+ + + - - -
- - - - + +
\ No newline at end of file diff --git a/page.tpl.php b/page.tpl.php index a144e206197079e979372ad3fe0369099b98cff3..17c02ee9b0f147d24661d29e8d38097a0cdce79b 100644 --- a/page.tpl.php +++ b/page.tpl.php @@ -1,26 +1,17 @@ - - - - - <?php print $head_title; ?> - - - - - -
- - - \ No newline at end of file +
\ No newline at end of file diff --git a/preprocess/preprocess-page.inc b/preprocess/preprocess-page.inc index cec9c0429147417be50643f038895f0617a97bfa..6ef9a54b0904ed8f0fa031677b13516b24622391 100644 --- a/preprocess/preprocess-page.inc +++ b/preprocess/preprocess-page.inc @@ -1,8 +1,6 @@ array( - 'data' => $vars['header_first'], - 'width' => $settings['omega_header_first_width'], + 'data' => $vars['page']['header_first'], + 'width' => theme_get_setting('omega_header_first_width'), ), 'header_last' => array( - 'data' => $vars['header_last'], - 'width' => $settings['omega_header_last_width'], + 'data' => $vars['page']['header_last'], + 'width' => theme_get_setting('omega_header_last_width'), ), ); -$vars = static_region_builder($header_regions, $settings['omega_header_wrapper_width'], $vars); +$vars = static_region_builder($header_regions, theme_get_setting('omega_header_wrapper_width'), $vars); /** * Preface Region * Same as above, preparing the preface regions to accept settings configurations */ -$vars['preface_wrapper_grids'] = $settings['omega_preface_wrapper_grids']; +$vars['preface_wrapper_grids'] = theme_get_setting('omega_preface_wrapper_grids'); $preface_regions = array( 'preface_first' => array( - 'data' => $vars['preface_first'], - 'width' => $settings['omega_preface_first_width'], + 'data' => $vars['page']['preface_first'], + 'width' => theme_get_setting('omega_preface_first_width'), 'spacing' => array( - 'prefix' => $settings['omega_preface_first_prefix'], - 'suffix' => $settings['omega_preface_first_suffix']), + 'prefix' => theme_get_setting('omega_preface_first_prefix'), + 'suffix' => theme_get_setting('omega_preface_first_suffix')), ), 'preface_middle' => array( - 'data' => $vars['preface_middle'], - 'width' => $settings['omega_preface_middle_width'], + 'data' => $vars['page']['preface_middle'], + 'width' => theme_get_setting('omega_preface_middle_width'), 'spacing' => array( - 'prefix' => $settings['omega_preface_middle_prefix'], - 'suffix' => $settings['omega_preface_middle_suffix']), + 'prefix' => theme_get_setting('omega_preface_middle_prefix'), + 'suffix' => theme_get_setting('omega_preface_middle_suffix')), ), 'preface_last' => array( - 'data' => $vars['preface_last'], - 'width' => $settings['omega_preface_last_width'], + 'data' => $vars['page']['preface_last'], + 'width' => theme_get_setting('omega_preface_last_width'), 'spacing' => array( - 'prefix' => $settings['omega_preface_last_prefix'], - 'suffix' => $settings['omega_preface_last_suffix']) + 'prefix' => theme_get_setting('omega_preface_last_prefix'), + 'suffix' => theme_get_setting('omega_preface_last_suffix')) ), ); -$vars = static_region_builder($preface_regions, $settings['preface_wrapper_grids'], $vars); +$vars = static_region_builder($preface_regions, theme_get_setting('preface_wrapper_grids'), $vars); /** * Body Region @@ -103,19 +101,19 @@ $vars = static_region_builder($preface_regions, $settings['preface_wrapper_grids * * @todo cleanup switch statement */ -$vars['content_container_width'] = $settings['omega_content_container_width']; +$vars['content_container_width'] = theme_get_setting('omega_content_container_width'); $content_regions = array( 'main_content' => array( - 'data' => $vars['content'], - 'width' => $settings['omega_content_main_width'], + 'data' => $vars['page']['content'], + 'width' => theme_get_setting('omega_content_main_width'), // primary defines which region will get all the extra space // should other regions be left out. 'primary' => TRUE, // we need to tell the "related" zones so that we can determine widths for this primary zone 'related' => array( - 'sidebar_first' => array('width' => $settings['omega_sidebar_first_width']), - 'sidebar_last' => array('width' => $settings['omega_sidebar_last_width']), + 'sidebar_first' => array('width' => theme_get_setting('omega_sidebar_first_width')), + 'sidebar_last' => array('width' => theme_get_setting('omega_sidebar_last_width')), ), 'push' => array( 'width' => '', @@ -131,8 +129,8 @@ $content_regions = array( ), ), 'sidebar_first' => array( - 'data' => $vars['sidebar_first'], - 'width' => $settings['omega_sidebar_first_width'], + 'data' => $vars['page']['sidebar_first'], + 'width' => theme_get_setting('omega_sidebar_first_width'), 'push' => array( 'width' => '', 'conditions' => array( @@ -151,8 +149,8 @@ $content_regions = array( ), ), 'sidebar_last' => array( - 'data' => $vars['sidebar_last'], - 'width' => $settings['omega_sidebar_last_width'], + 'data' => $vars['page']['sidebar_last'], + 'width' => theme_get_setting('omega_sidebar_last_width'), 'push' => array( 'width' => '', 'conditions' => array( @@ -172,13 +170,15 @@ $content_regions = array( * For panels and other modules that may set $show_blocks to false, we will need to * unset the sidebars in this case */ -if (!$vars['show_blocks']) { - unset($vars['sidebar_first']); - unset($vars['sidebar_last']); +/* +if (!$vars['page']['show_blocks']) { + unset($vars['page']['sidebar_first']); + unset($vars['page']['sidebar_last']); } +*/ // now we will be switching between our primary content layout types. -switch($settings['omega_content_layout']){ +switch(theme_get_setting('omega_content_layout')){ default: case 'first_content_last': // FIRST - CONTENT - LAST @@ -190,7 +190,7 @@ switch($settings['omega_content_layout']){ // if sidebar_last isn't present, we will pull the first sidebar the combined width of the content & sidebar last spacing // otherwise, - $sl_pull = $vars['sidebar_last'] ? $settings['omega_content_main_width'] : $settings['omega_content_main_width'] + $settings['omega_sidebar_last_width']; + $sl_pull = $vars['page']['sidebar_last'] ? theme_get_setting('omega_content_main_width') : theme_get_setting('omega_content_main_width') + theme_get_setting('omega_sidebar_last_width'); // let's assign some new data to our $content_regions array to assing pull classes @@ -204,18 +204,18 @@ switch($settings['omega_content_layout']){ // main_content will only be pushed in this layout $content_regions['main_content']['pull'] = FALSE; $content_regions['main_content']['push'] = array( - 'width' => $settings['omega_sidebar_first_width'], + 'width' => theme_get_setting('omega_sidebar_first_width'), 'conditions' => array( 'sidebar_first' => array( // type should either be TRUE or FALSE // false value here will use a ! operator in front of the variable in the ns() function 'type' => FALSE, - 'value' => $settings['omega_sidebar_first_width'], + 'value' => theme_get_setting('omega_sidebar_first_width'), ), ), ); // calling the dynamic region builder function to position these elements - $vars = dynamic_region_builder($content_regions, $settings['omega_content_container_width'], $vars); + $vars = dynamic_region_builder($content_regions, theme_get_setting('omega_content_container_width'), $vars); break; @@ -235,7 +235,7 @@ switch($settings['omega_content_layout']){ $content_regions['main_content']['pull'] = FALSE; $content_regions['main_content']['push'] = FALSE; // calling the dynamic region builder function to position these elements - $vars = dynamic_region_builder($content_regions, $settings['omega_content_container_width'], $vars); + $vars = dynamic_region_builder($content_regions, theme_get_setting('omega_content_container_width'), $vars); break; @@ -243,9 +243,9 @@ switch($settings['omega_content_layout']){ case 'first_last_content': // if sidebar_last isn't present, we will pull the first sidebar the combined width of the content & sidebar last spacing // otherwise, - $sl_pull = $vars['sidebar_last'] ? $settings['omega_content_main_width'] : $settings['omega_content_main_width'] + $settings['omega_sidebar_last_width']; - $sr_pull = $vars['sidebar_first'] ? $settings['omega_content_main_width'] : $settings['omega_content_main_width'] + $settings['omega_sidebar_first_width']; - $sc_max_push = $settings['omega_sidebar_first_width'] + $settings['omega_sidebar_last_width']; + $sl_pull = $vars['page']['sidebar_last'] ? theme_get_setting('omega_content_main_width') : theme_get_setting('omega_content_main_width') + theme_get_setting('omega_sidebar_last_width'); + $sr_pull = $vars['page']['sidebar_first'] ? theme_get_setting('omega_content_main_width') : theme_get_setting('omega_content_main_width') + theme_get_setting('omega_sidebar_first_width'); + $sc_max_push = theme_get_setting('omega_sidebar_first_width') + theme_get_setting('omega_sidebar_last_width'); // let's assign some new data to our $content_regions array to assing pull classes // sidebar_first will be pulled an exact amount assuming it exists in this layout @@ -265,18 +265,18 @@ switch($settings['omega_content_layout']){ // type should either be TRUE or FALSE // false value here will use a ! operator in front of the variable in the ns() function 'type' => FALSE, - 'value' => $settings['omega_sidebar_first_width'], + 'value' => theme_get_setting('omega_sidebar_first_width'), ), 'sidebar_last' => array( // type should either be TRUE or FALSE // false value here will use a ! operator in front of the variable in the ns() function 'type' => FALSE, - 'value' => $settings['omega_sidebar_last_width'], + 'value' => theme_get_setting('omega_sidebar_last_width'), ), ), ); // calling the dynamic region builder function to position these elements - $vars = dynamic_region_builder($content_regions, $settings['omega_content_container_width'], $vars); + $vars = dynamic_region_builder($content_regions, theme_get_setting('omega_content_container_width'), $vars); break; } @@ -285,95 +285,115 @@ switch($settings['omega_content_layout']){ * Postscript Region * Same as above, preparing the postscript regions to accept settings configurations */ -$vars['postscript_container_width'] = $settings['omega_postscript_container_width']; -$vars['preface_wrapper_grids'] = $settings['omega_preface_wrapper_grids']; +$vars['postscript_container_width'] = theme_get_setting('omega_postscript_container_width'); +$vars['preface_wrapper_grids'] = theme_get_setting('omega_preface_wrapper_grids'); $postscript_regions = array( 'postscript_one' => array( - 'data' => $vars['postscript_one'], - 'width' => $settings['omega_postscript_one_width'], + 'data' => $vars['page']['postscript_one'], + 'width' => theme_get_setting('omega_postscript_one_width'), 'spacing' => array( - 'prefix' => $settings['omega_postscript_one_prefix'], - 'suffix' => $settings['omega_postscript_one_suffix']), + 'prefix' => theme_get_setting('omega_postscript_one_prefix'), + 'suffix' => theme_get_setting('omega_postscript_one_suffix')), ), 'postscript_two' => array( - 'data' => $vars['postscript_two'], - 'width' => $settings['omega_postscript_two_width'], + 'data' => $vars['page']['postscript_two'], + 'width' => theme_get_setting('omega_postscript_two_width'), 'spacing' => array( - 'prefix' => $settings['omega_postscript_two_prefix'], - 'suffix' => $settings['omega_postscript_two_suffix']), + 'prefix' => theme_get_setting('omega_postscript_two_prefix'), + 'suffix' => theme_get_setting('omega_postscript_two_suffix')), ), 'postscript_three' => array( - 'data' => $vars['postscript_three'], - 'width' => $settings['omega_postscript_three_width'], + 'data' => $vars['page']['postscript_three'], + 'width' => theme_get_setting('omega_postscript_three_width'), 'spacing' => array( - 'prefix' => $settings['omega_postscript_three_prefix'], - 'suffix' => $settings['omega_postscript_three_suffix']) + 'prefix' => theme_get_setting('omega_postscript_three_prefix'), + 'suffix' => theme_get_setting('omega_postscript_three_suffix')) ), 'postscript_four' => array( - 'data' => $vars['postscript_four'], - 'width' => $settings['omega_postscript_four_width'], + 'data' => $vars['page']['postscript_four'], + 'width' => theme_get_setting('omega_postscript_four_width'), 'spacing' => array( - 'prefix' => $settings['omega_postscript_four_prefix'], - 'suffix' => $settings['omega_postscript_four_suffix']) + 'prefix' => theme_get_setting('omega_postscript_four_prefix'), + 'suffix' => theme_get_setting('omega_postscript_four_suffix')) ), ); -$vars = static_region_builder($postscript_regions, $settings['postscript_container_width'], $vars); +$vars = static_region_builder($postscript_regions, theme_get_setting('postscript_container_width'), $vars); /** * Footer Region */ -$vars['footer_container_width'] = $settings['omega_footer_container_width']; +$vars['footer_container_width'] = theme_get_setting('omega_footer_container_width'); $footer_regions = array( 'footer_first' => array( - 'data' => $vars['footer_first'], - 'width' => $settings['omega_footer_first_width'], + 'data' => $vars['page']['footer_first'], + 'width' => theme_get_setting('omega_footer_first_width'), ), 'footer_last' => array( - 'data' => $vars['footer_last'], - 'width' => $settings['omega_footer_last_width'], + 'data' => $vars['page']['footer_last'], + 'width' => theme_get_setting('omega_footer_last_width'), ), ); -$vars = static_region_builder($footer_regions, $settings['omega_footer_container_width'], $vars); +$vars = static_region_builder($footer_regions, theme_get_setting('omega_footer_container_width'), $vars); -// ZEN - BODY CLASSES -// Classes for body element. Allows advanced theming based on context -// (home page, node of certain type, etc.) -$classes = split(' ', $vars['body_classes']); -// Remove the mostly useless page-ARG0 class. -if ($index = array_search(preg_replace('![^abcdefghijklmnopqrstuvwxyz0-9-_]+!s', '', 'page-'. drupal_strtolower(arg(0))), $classes)) { - unset($classes[$index]); +// Set a variable for the site name title and logo alt attributes text. +$slogan_text = $vars['site_slogan']; +$site_name_text = $vars['site_name']; +$vars['site_name_and_slogan'] = $site_name_text . ' ' . $slogan_text; +if(isset($vars['logo'])) { + //$vars['logo_img'] = theme('image', substr($vars['logo'], strlen(base_path())), t($vars['site_name']), t($vars['site_name'])); + $vars['logo_img'] = ''; } -if (!$vars['is_front']) { - // Add unique class for each page. - $path = drupal_get_path_alias($_GET['q']); - $classes[] = omega_id_safe('page-' . $path); - // Add unique class for each website section. - list($section, ) = explode('/', $path, 2); - if (arg(0) == 'node') { - if (arg(1) == 'add') { - $section = 'node-add'; - } - elseif (is_numeric(arg(1)) && (arg(2) == 'edit' || arg(2) == 'delete')) { - $section = 'node-' . arg(2); - } - } - $classes[] = omega_id_safe('section-' . $section); -} -$vars['body_classes_array'] = $classes; -$vars['body_classes'] = implode(' ', $classes); // Concatenate with spaces. - -$vars['logo_img'] = $vars['logo'] ? theme('image', substr($vars['logo'], strlen(base_path())), t($vars['site_name']), t($vars['site_name'])) : ''; // NINESIXTY - For easy printing of variables. -$vars['linked_logo_img'] = $vars['logo_img'] ? l($vars['logo_img'], '', array('rel' => 'home', 'title' => t($vars['site_name']), 'html' => TRUE)) : ''; -$vars['linked_site_name'] = $vars['site_name'] ? l($vars['site_name'], '', array('rel' => 'home', 'title' => t('Home'))) : ''; -$vars['main_menu_links'] = theme('links', $vars['primary_links'], array('class' => 'links main-menu')); -$vars['secondary_menu_links'] = theme('links', $vars['secondary_links'], array('class' => 'links secondary-menu')); +if(isset($vars['logo_img'])) { + $vars['linked_logo_img'] = l($vars['logo_img'], '', array('rel' => 'home', 'title' => t($vars['site_name']), 'html' => TRUE)); +} +if(isset($vars['site_name'])) { + $vars['linked_site_name'] = l($vars['site_name'], '', array('rel' => 'home', 'title' => t('Home'))); +} +//$vars['main_menu_links'] = theme('links', $vars['primary_links'], array('class' => 'links main-menu')); +//$vars['secondary_menu_links'] = theme('links', $vars['secondary_links'], array('class' => 'links secondary-menu')); + +if (isset($vars['main_menu'])) { + $vars['main_menu_links'] = theme('links__system_main_menu', array( + 'links' => $vars['main_menu'], + 'attributes' => array( + 'class' => array('links', 'main-menu'), + ), + 'heading' => array( + 'text' => t('Main menu'), + 'level' => 'h2', + 'class' => array('element-invisible'), + ) + )); + } + else { + $vars['primary_nav'] = FALSE; + } + if (isset($vars['secondary_menu'])) { + $vars['secondary_menu_links'] = theme('links__system_secondary_menu', array( + 'links' => $vars['secondary_menu'], + 'attributes' => array( + 'class' => array('links', 'secondary-menu'), + ), + 'heading' => array( + 'text' => t('Secondary menu'), + 'level' => 'h2', + 'class' => array('element-invisible'), + ) + )); + } + else { + $vars['secondary_nav'] = FALSE; + } // NINESIXTY - Make sure framework styles are placed above all others. -$vars['css_alt'] = omega_css_reorder($vars['css']); -$vars['styles'] = drupal_get_css($vars['css_alt']); +if(isset($vars['css'])) { + $vars['css_alt'] = omega_css_reorder($vars['css']); + $vars['styles'] = drupal_get_css($vars['css_alt']); +} + // ACQUIA-MARINA // Set site title, slogan, mission, page title & separator (unless using Page Title module) @@ -424,12 +444,4 @@ if (!module_exists('page_title')) { } } $vars['head_title'] = strip_tags($vars['head_title']); // Remove any potential html tags -} -// implement mission statement settings -$vars['mission'] = t(variable_get('site_mission', '')); -if ($vars['mission'] && ($settings['mission_statement_pages'] == 'all' || $vars['is_front'] && $settings['mission_statement_pages'] == 'home') && $settings['mission_statement_pages'] != 'none') { - $vars['mission'] = '

' .$vars['mission']. '

'; -} -else { - unset($vars['mission']); } \ No newline at end of file diff --git a/template.php b/template.php index 5372bf12d054f49e609f3eab4081aa2c075905e4..61606474fe9ebd40238fe1470763c4f3ceb958d1 100644 --- a/template.php +++ b/template.php @@ -1,7 +1,7 @@ base_theme) { + if(isset($theme_info->base_theme)) { global $base_theme_info; foreach($base_theme_info as $base){ $themes_active[] = $base->name; @@ -52,6 +52,12 @@ function omega_preprocess_node(&$vars, $hook) { } // end preprocess_node +function omega_process_page(&$vars) { + //krumo($vars); +} +function omega_process_node(&$vars) { + +} /** * NINESIXTY - Contextually adds 960 Grid System classes. * @@ -156,7 +162,7 @@ function static_region_builder($region_data, $container_width, $vars) { if ($info['data']) { $vars[$region .'_classes'] = ns('grid-'. $info['width']); } - if (is_array($info['spacing'])) { + if (isset($info['spacing'])) { foreach ($info['spacing'] AS $attribute => $value) { if ($value) { $vars[$region .'_classes'] .= ' '. $attribute .'-'. $value; @@ -170,7 +176,7 @@ function static_region_builder($region_data, $container_width, $vars) { function _omega_dynamic_zones($width, $conditions, $vars) { foreach($conditions AS $variable => $reaction) { - if(($reaction['type'] && $vars[$variable]) || (!$reaction['type'] && !$vars[$variable])) { + if(($reaction['type'] && $vars['page'][$variable]) || (!$reaction['type'] && !$vars['page'][$variable])) { $width = $width - $reaction['value']; } } @@ -178,7 +184,7 @@ function _omega_dynamic_zones($width, $conditions, $vars) { } function _omega_dynamic_widths($width, $conditions, $vars) { foreach($conditions AS $variable => $zone) { - if(($vars[$variable])) { + if(($vars['page'][$variable])) { $width = $width - $zone['width']; } } @@ -196,10 +202,17 @@ function dynamic_region_builder($region_data, $container_width, $vars) { // let's cycle the region data, and determine what we have foreach ($region_data AS $region => $info) { // if we do have content for this region, let's create it. - if ($info['data']) { - - $width = $info['primary'] ? $container_width : $info['width']; - $vars[$region .'_classes'] = $info['primary'] ? ns('grid-'. _omega_dynamic_widths($width, $info['related'], $vars)) : ns('grid-'. $info['width']); + if (isset($info['data'])) { + if(isset($info['primary'])) { + $width = $container_width; + $vars[$region .'_classes'] = ns('grid-'. _omega_dynamic_widths($width, $info['related'], $vars)); + } + else { + $width = $info['width']; + $vars[$region .'_classes'] = ns('grid-'. $info['width']); + } + //$width = $info['primary'] ? $container_width : $info['width']; + //$vars[$region .'_classes'] = $info['primary'] ? ns('grid-'. _omega_dynamic_widths($width, $info['related'], $vars)) : ns('grid-'. $info['width']); // we know we have stuff to put here, so we can check for push & pull options if($info['pull']) { // looks like we do wanna pull, or this value would have been false, so let's boogie @@ -216,7 +229,7 @@ function dynamic_region_builder($region_data, $container_width, $vars) { } // currently ignored becuase we have not given prefix/suffix class options // to the primary content zones... this will become active again later - if (is_array($info['spacing'])) { + if (isset($info['spacing'])) { foreach ($info['spacing'] AS $attribute => $value) { if ($value) { $vars[$region .'_classes'] .= ' '. $attribute .'-'. $value; @@ -305,6 +318,7 @@ function omega_id_safe($string) { * @return * A string containing the breadcrumb output. */ +/* function omega_breadcrumb($breadcrumb) { // Determine if we are to display the breadcrumb. $show_breadcrumb = theme_get_setting('omega_breadcrumb'); @@ -333,6 +347,7 @@ function omega_breadcrumb($breadcrumb) { // Otherwise, return an empty string. return ''; } +*/ /** * Create a string of attributes form a provided array. * @@ -359,13 +374,10 @@ function omega_render_attributes($attributes) { * @return */ function omega_theme(&$existing, $type, $theme, $path) { - if (!db_is_active()) { - return array(); - } - include_once './' . drupal_get_path('theme', 'omega') . '/theme-functions.inc'; + //include_once './' . drupal_get_path('theme', 'omega') . '/theme-functions.inc'; // 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); + //omega_theme_get_default_settings($theme); return array( 'id_safe' => array( 'arguments' => array('string'), diff --git a/theme-functions.inc b/theme-functions.inc index 4ca62d3d0e52088c91a59590d9ebea77c39e3541..13bb990c402e41fc1232a92361bde3761cd4b861 100644 --- a/theme-functions.inc +++ b/theme-functions.inc @@ -1,36 +1,2 @@ info); - // 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; -} \ No newline at end of file diff --git a/theme-settings.php b/theme-settings.php index d39b912a7204275caf083dd419a932b4cd97450c..f5dfb8d5a2e5e2108e8d618436f654fd3d605cb9 100644 --- a/theme-settings.php +++ b/theme-settings.php @@ -14,24 +14,13 @@ include_once './' . drupal_get_path('theme', 'omega') . '/theme-functions.inc'; * @return * array A form array. */ -function omega_settings($saved_settings, $subtheme_defaults = array()) { +function omega_form_system_theme_settings_alter(&$form, &$form_state) { // 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'); drupal_add_css(drupal_get_path('theme', 'omega'). '/css/omega_theme_settings.css', 'theme', 'all', TRUE); - // Get the default values from the .info file. - if (count($subtheme_defaults) > 0) { - // Allow a subtheme to override the default values. - $settings = array_merge($subtheme_defaults, $saved_settings); - } - else { - // Merge the saved variables and their default values. - $defaults = omega_theme_get_default_settings('omega'); - $settings = array_merge($defaults, $saved_settings); - } - for ($i = 1; $i <= 24; $i++){ $grids[$i] = $i; } @@ -81,7 +70,7 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { '#title' => t('Set text of front page title'), '#collapsible' => TRUE, '#collapsed' => FALSE, - '#default_value' => $saved_settings['front_page_title_display'], + '#default_value' => theme_get_setting('front_page_title_display'), '#options' => array( 'title_slogan' => t('Site title | Site slogan'), 'slogan_title' => t('Site slogan | Site title'), @@ -93,7 +82,7 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { '#type' => 'textfield', '#title' => t('Custom'), '#size' => 60, - '#default_value' => $saved_settings['page_title_display_custom'], + '#default_value' => theme_get_setting('page_title_display_custom'), '#description' => t('Enter a custom page title for your front page'), ); @@ -109,7 +98,7 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { '#title' => t('Set text of other page titles'), '#collapsible' => TRUE, '#collapsed' => FALSE, - '#default_value' => $saved_settings['other_page_title_display'], + '#default_value' => theme_get_setting('other_page_title_display'), '#options' => array( 'ptitle_slogan' => t('Page title | Site slogan'), 'ptitle_stitle' => t('Page title | Site title'), @@ -122,7 +111,7 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { '#type' => 'textfield', '#title' => t('Custom'), '#size' => 60, - '#default_value' => $saved_settings['other_page_title_display_custom'], + '#default_value' => theme_get_setting('other_page_title_display_custom'), '#description' => t('Enter a custom page title for all other pages'), ); // SEO configurable separator @@ -131,7 +120,7 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { '#title' => t('Title separator'), '#description' => t('Customize the separator character used in the page title'), '#size' => 60, - '#default_value' => $saved_settings['configurable_separator'], + '#default_value' => theme_get_setting('configurable_separator'), ); } else { @@ -150,7 +139,7 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_general']['breadcrumb']['omega_breadcrumb'] = array( '#type' => 'select', '#title' => t('Display breadcrumb'), - '#default_value' => $saved_settings['omega_breadcrumb'], + '#default_value' => theme_get_setting('omega_breadcrumb'), '#options' => array( 'yes' => t('Yes'), 'admin' => t('Only in admin section'), @@ -161,46 +150,28 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { '#type' => 'textfield', '#title' => t('Breadcrumb separator'), '#description' => t('Text only. Don’t forget to include spaces.'), - '#default_value' => $saved_settings['omega_breadcrumb_separator'], + '#default_value' => theme_get_setting('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' => $saved_settings['omega_breadcrumb_home'], + '#default_value' => theme_get_setting('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' => $saved_settings['omega_breadcrumb_trailing'], + '#default_value' => theme_get_setting('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' => $saved_settings['omega_breadcrumb_title'], + '#default_value' => theme_get_setting('omega_breadcrumb_title'), '#description' => t('Useful when the breadcrumb is not placed just before the title.'), ); - // Mission Statement - $form['omega_container']['omega_general']['mission_statement'] = array( - '#type' => 'fieldset', - '#title' => t('Mission statement'), - '#collapsible' => TRUE, - '#collapsed' => TRUE, - ); - $form['omega_container']['omega_general']['mission_statement']['mission_statement_pages'] = array( - '#type' => 'radios', - '#title' => t('Where should your mission statement be displayed?'), - '#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.'), - 'none'=> t('Do not display the mission statement on any pages.'), - ), - ); - // Region Settings $form['omega_container']['omega_regions'] = array( '#type' => 'fieldset', @@ -212,7 +183,7 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['omega_default_container_width'] = array( '#type' => 'select', '#title' => t('Default container width'), - '#default_value' => $saved_settings['omega_default_container_width'], + '#default_value' => theme_get_setting('omega_default_container_width'), '#options' => $containers, '#weight' => -50, '#description' => t('This width is used for regions like $help, $messages and other non-important regions in page.tpl.php'), @@ -229,63 +200,63 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['headers']['omega_branding_wrapper_width'] = array( '#type' => 'select', '#title' => t('Wrapper Area width for Logo/Navigation Elements'), - '#default_value' => $saved_settings['omega_branding_wrapper_width'], + '#default_value' => theme_get_setting('omega_branding_wrapper_width'), '#options' => $containers, '#description' => t('Container Grid width for the branding (logo) area and navigation menus.'), ); $form['omega_container']['omega_regions']['headers']['omega_header_logo_width'] = array( '#type' => 'select', '#title' => t('Width for Logo/Branding area'), - '#default_value' => $saved_settings['omega_header_logo_width'], + '#default_value' => theme_get_setting('omega_header_logo_width'), '#options' => $grids, '#description' => t('Grid width of the logo/branding area. This number should be less than or equal to the container width defined above.'), ); $form['omega_container']['omega_regions']['headers']['omega_header_menu_width'] = array( '#type' => 'select', '#title' => t('Wrapper Area width for Menu Elements'), - '#default_value' => $saved_settings['omega_header_menu_width'], + '#default_value' => theme_get_setting('omega_header_menu_width'), '#options' => $grids, '#description' => t('Grid width of the primary/secondary menu elements. This number should be less than or equal to the container width defined above.'), ); $form['omega_container']['omega_regions']['headers']['omega_header_wrapper_width'] = array( '#type' => 'select', '#title' => t('Wrapper Area width for Header Elements'), - '#default_value' => $saved_settings['omega_header_wrapper_width'], + '#default_value' => theme_get_setting('omega_header_wrapper_width'), '#options' => $containers, '#description' => t('Container Grid width for the header region areas.'), ); $form['omega_container']['omega_regions']['headers']['omega_header_first_width'] = array( '#type' => 'select', '#title' => t('Contextual Width for Header First'), - '#default_value' => $saved_settings['omega_header_first_width'], + '#default_value' => theme_get_setting('omega_header_first_width'), '#options' => $grids, '#description' => t('Grid width of the first header region. This number should be less than or equal to the container width defined above.'), ); $form['omega_container']['omega_regions']['headers']['omega_header_last_width'] = array( '#type' => 'select', '#title' => t('Contextual Width for Header Last'), - '#default_value' => $saved_settings['omega_header_last_width'], + '#default_value' => theme_get_setting('omega_header_last_width'), '#options' => $grids, '#description' => t('Grid width of the last header region. This number should be less than or equal to the container width defined above.'), ); $form['omega_container']['omega_regions']['headers']['omega_internal_nav_wrapper_width'] = array( '#type' => 'select', '#title' => t('Wrapper Area width for Breadcrumb/Slogan/Search'), - '#default_value' => $saved_settings['omega_internal_nav_wrapper_width'], + '#default_value' => theme_get_setting('omega_internal_nav_wrapper_width'), '#options' => $containers, '#description' => t('Container Grid width for the breadcrumb/search/slogan area.'), ); $form['omega_container']['omega_regions']['headers']['omega_breadcrumb_slogan_width'] = array( '#type' => 'select', '#title' => t('Wrapper Area width for Breadcrumb/Slogan'), - '#default_value' => $saved_settings['omega_breadcrumb_slogan_width'], + '#default_value' => theme_get_setting('omega_breadcrumb_slogan_width'), '#options' => $grids, '#description' => t('Grid width for the slogan/breadcrumb area. By default, the slogan will only appear in the zone if there is no breadcrumb avaiable.'), ); $form['omega_container']['omega_regions']['headers']['omega_search_width'] = array( '#type' => 'select', '#title' => t('Wrapper Area width for Search'), - '#default_value' => $saved_settings['omega_search_width'], + '#default_value' => theme_get_setting('omega_search_width'), '#options' => $grids, '#description' => t('Grid width for the search zone, which appears inline with the breadcrumb/slogan zone.'), ); @@ -301,21 +272,21 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['preface']['omega_preface_wrapper_grids'] = array( '#type' => 'select', '#title' => t('Preface Wrapper Container Grids'), - '#default_value' => $saved_settings['omega_preface_wrapper_grids'], + '#default_value' => theme_get_setting('omega_preface_wrapper_grids'), '#options' => $containers, '#description' => t('Container Grid width for the preface regions.'), ); $form['omega_container']['omega_regions']['preface']['omega_preface_first_width'] = array( '#type' => 'select', '#title' => t('Contextual Width for Preface First'), - '#default_value' => $saved_settings['omega_preface_first_width'], + '#default_value' => theme_get_setting('omega_preface_first_width'), '#options' => $grids, '#description' => t('Grid width of the first preface region. This number should be less than or equal to the container width defined above.'), ); $form['omega_container']['omega_regions']['preface']['omega_preface_first_prefix'] = array( '#type' => 'select', '#title' => t('Prefix Spacing for Preface First'), - '#default_value' => $saved_settings['omega_preface_first_prefix'], + '#default_value' => theme_get_setting('omega_preface_first_prefix'), '#options' => $spacing, '#prefix' => '
', '#suffix' => '
', @@ -324,7 +295,7 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['preface']['omega_preface_first_suffix'] = array( '#type' => 'select', '#title' => t('Suffix Spacing for Preface First'), - '#default_value' => $saved_settings['omega_preface_first_suffix'], + '#default_value' => theme_get_setting('omega_preface_first_suffix'), '#options' => $spacing, '#prefix' => '
', '#suffix' => '
', @@ -333,14 +304,14 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['preface']['omega_preface_middle_width'] = array( '#type' => 'select', '#title' => t('Contextual Width for Preface Middle'), - '#default_value' => $saved_settings['omega_preface_middle_width'], + '#default_value' => theme_get_setting('omega_preface_middle_width'), '#options' => $grids, '#description' => t('Grid width of the middle preface region. This number should be less than or equal to the container width defined above.'), ); $form['omega_container']['omega_regions']['preface']['omega_preface_middle_prefix'] = array( '#type' => 'select', '#title' => t('Prefix Spacing for Preface Middle'), - '#default_value' => $saved_settings['omega_preface_middle_prefix'], + '#default_value' => theme_get_setting('omega_preface_middle_prefix'), '#options' => $spacing, '#prefix' => '
', '#suffix' => '
', @@ -349,7 +320,7 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['preface']['omega_preface_middle_suffix'] = array( '#type' => 'select', '#title' => t('Suffix Spacing for Preface Middle'), - '#default_value' => $saved_settings['omega_preface_middle_suffix'], + '#default_value' => theme_get_setting('omega_preface_middle_suffix'), '#options' => $spacing, '#prefix' => '
', '#suffix' => '
', @@ -358,14 +329,14 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['preface']['omega_preface_last_width'] = array( '#type' => 'select', '#title' => t('Contextual Width for Preface Last'), - '#default_value' => $saved_settings['omega_preface_last_width'], + '#default_value' => theme_get_setting('omega_preface_last_width'), '#options' => $grids, '#description' => t('Grid width of the last preface region. This number should be less than or equal to the container width defined above.'), ); $form['omega_container']['omega_regions']['preface']['omega_preface_last_prefix'] = array( '#type' => 'select', '#title' => t('Prefix Spacing for Preface Last'), - '#default_value' => $saved_settings['omega_preface_last_prefix'], + '#default_value' => theme_get_setting('omega_preface_last_prefix'), '#options' => $spacing, '#prefix' => '
', '#suffix' => '
', @@ -374,7 +345,7 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['preface']['omega_preface_last_suffix'] = array( '#type' => 'select', '#title' => t('Suffix Spacing for Preface Last'), - '#default_value' => $saved_settings['omega_preface_last_suffix'], + '#default_value' => theme_get_setting('omega_preface_last_suffix'), '#options' => $spacing, '#prefix' => '
', '#suffix' => '
', @@ -392,7 +363,7 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { '#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' => $saved_settings['omega_content_layout'], + '#default_value' => theme_get_setting('omega_content_layout'), '#options' => array( 'first_content_last' => t('Sidebar First - Content - Sidebar Last'), 'content_first_last' => t('Content - Sidebar First - Sidebar Last'), @@ -402,28 +373,28 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['main']['omega_content_container_width'] = array( '#type' => 'select', '#title' => t('Container width for content zone'), - '#default_value' => $saved_settings['omega_content_container_width'], + '#default_value' => theme_get_setting('omega_content_container_width'), '#options' => $containers, '#description' => t('Container Grid width for the main content regions. This includes the content_top, content_bottom, and primary content zone.'), ); $form['omega_container']['omega_regions']['main']['omega_sidebar_first_width'] = array( '#type' => 'select', '#title' => t('Contextual Width for Sidebar First'), - '#default_value' => $saved_settings['omega_sidebar_first_width'], + '#default_value' => theme_get_setting('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' => $saved_settings['omega_content_main_width'], + '#default_value' => theme_get_setting('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' => $saved_settings['omega_sidebar_last_width'], + '#default_value' => theme_get_setting('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.'), ); @@ -434,12 +405,12 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { '#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 $sidebar_first and $sidebar_last to create one sidebar from the content of both.'), '#options' => $options, - '#default_value' => $saved_settings['sidebar_combine'], + '#default_value' => theme_get_setting('sidebar_combine'), ); $form['omega_container']['omega_regions']['main']['sidebar_contain_pages'] = array( '#type' => 'textarea', '#title' => t('Pages'), - '#default_value' => $saved_settings['sidebar_contain_pages'], + '#default_value' => theme_get_setting('sidebar_contain_pages'), '#description' => $description, ); @@ -454,21 +425,21 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['postscript']['omega_postscript_container_width'] = array( '#type' => 'select', '#title' => t('Container width for postscript regions'), - '#default_value' => $saved_settings['omega_postscript_container_width'], + '#default_value' => theme_get_setting('omega_postscript_container_width'), '#options' => $containers, '#description' => t('Container Grid width for the postscript regions.'), ); $form['omega_container']['omega_regions']['postscript']['omega_postscript_one_width'] = array( '#type' => 'select', '#title' => t('Contextual Width for Postscript 1'), - '#default_value' => $saved_settings['omega_postscript_one_width'], + '#default_value' => theme_get_setting('omega_postscript_one_width'), '#options' => $grids, '#description' => t('Grid width of the first postscript region. This number should be less than or equal to the container width defined above.'), ); $form['omega_container']['omega_regions']['postscript']['omega_postscript_one_prefix'] = array( '#type' => 'select', '#title' => t('Prefix Spacing for Postscript 1'), - '#default_value' => $saved_settings['omega_postscript_one_prefix'], + '#default_value' => theme_get_setting('omega_postscript_one_prefix'), '#options' => $spacing, '#prefix' => '
', '#suffix' => '
', @@ -477,7 +448,7 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['postscript']['omega_postscript_one_suffix'] = array( '#type' => 'select', '#title' => t('Suffix Spacing for Postscript 1'), - '#default_value' => $saved_settings['omega_postscript_one_suffix'], + '#default_value' => theme_get_setting('omega_postscript_one_suffix'), '#options' => $spacing, '#prefix' => '
', '#suffix' => '
', @@ -486,14 +457,14 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['postscript']['omega_postscript_two_width'] = array( '#type' => 'select', '#title' => t('Contextual Width for Postscript 2'), - '#default_value' => $saved_settings['omega_postscript_two_width'], + '#default_value' => theme_get_setting('omega_postscript_two_width'), '#options' => $grids, '#description' => t('Grid width of the second postscript region. This number should be less than or equal to the container width defined above.'), ); $form['omega_container']['omega_regions']['postscript']['omega_postscript_two_prefix'] = array( '#type' => 'select', '#title' => t('Prefix Spacing for Postscript 2'), - '#default_value' => $saved_settings['omega_postscript_two_prefix'], + '#default_value' => theme_get_setting('omega_postscript_two_prefix'), '#options' => $spacing, '#prefix' => '
', '#suffix' => '
', @@ -502,7 +473,7 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['postscript']['omega_postscript_two_suffix'] = array( '#type' => 'select', '#title' => t('Suffix Spacing for Postscript 2'), - '#default_value' => $saved_settings['omega_postscript_two_suffix'], + '#default_value' => theme_get_setting('omega_postscript_two_suffix'), '#options' => $spacing, '#prefix' => '
', '#suffix' => '
', @@ -511,14 +482,14 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['postscript']['omega_postscript_three_width'] = array( '#type' => 'select', '#title' => t('Contextual Width for Postscript 3'), - '#default_value' => $saved_settings['omega_postscript_three_width'], + '#default_value' => theme_get_setting('omega_postscript_three_width'), '#options' => $grids, '#description' => t('Grid width of the third postscript region. This number should be less than or equal to the container width defined above.'), ); $form['omega_container']['omega_regions']['postscript']['omega_postscript_three_prefix'] = array( '#type' => 'select', '#title' => t('Prefix Spacing for Postscript 3'), - '#default_value' => $saved_settings['omega_postscript_three_prefix'], + '#default_value' => theme_get_setting('omega_postscript_three_prefix'), '#options' => $spacing, '#prefix' => '
', '#suffix' => '
', @@ -527,7 +498,7 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['postscript']['omega_postscript_three_suffix'] = array( '#type' => 'select', '#title' => t('Suffix Spacing for Postscript 3'), - '#default_value' => $saved_settings['omega_postscript_three_suffix'], + '#default_value' => theme_get_setting('omega_postscript_three_suffix'), '#options' => $spacing, '#prefix' => '
', '#suffix' => '
', @@ -536,14 +507,14 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['postscript']['omega_postscript_four_width'] = array( '#type' => 'select', '#title' => t('Contextual Width for Postscript 4'), - '#default_value' => $saved_settings['omega_postscript_four_width'], + '#default_value' => theme_get_setting('omega_postscript_four_width'), '#options' => $grids, '#description' => t('Grid width of the fourth postscript region. This number should be less than or equal to the container width defined above.'), ); $form['omega_container']['omega_regions']['postscript']['omega_postscript_four_prefix'] = array( '#type' => 'select', '#title' => t('Prefix Spacing for Postscript 4'), - '#default_value' => $saved_settings['omega_postscript_four_prefix'], + '#default_value' => theme_get_setting('omega_postscript_four_prefix'), '#options' => $spacing, '#prefix' => '
', '#suffix' => '
', @@ -552,7 +523,7 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['postscript']['omega_postscript_four_suffix'] = array( '#type' => 'select', '#title' => t('Suffix Spacing for Postscript 4'), - '#default_value' => $saved_settings['omega_postscript_four_suffix'], + '#default_value' => theme_get_setting('omega_postscript_four_suffix'), '#options' => $spacing, '#prefix' => '
', '#suffix' => '
', @@ -569,21 +540,21 @@ function omega_settings($saved_settings, $subtheme_defaults = array()) { $form['omega_container']['omega_regions']['footer']['omega_footer_container_width'] = array( '#type' => 'select', '#title' => t('Container width for footer regions'), - '#default_value' => $saved_settings['omega_footer_container_width'], + '#default_value' => theme_get_setting('omega_footer_container_width'), '#options' => $containers, '#description' => t('Container Grid width for the footer regions.'), ); $form['omega_container']['omega_regions']['footer']['omega_footer_first_width'] = array( '#type' => 'select', '#title' => t('Contextual Width for Footer First'), - '#default_value' => $saved_settings['omega_footer_first_width'], + '#default_value' => theme_get_setting('omega_footer_first_width'), '#options' => $grids, '#description' => t('Grid width of the first footer region. This number should be less than or equal to the container width defined above.'), ); $form['omega_container']['omega_regions']['footer']['omega_footer_last_width'] = array( '#type' => 'select', '#title' => t('Contextual Width for Footer Last'), - '#default_value' => $saved_settings['omega_footer_last_width'], + '#default_value' => theme_get_setting('omega_footer_last_width'), '#options' => $grids, '#description' => t('Grid width of the last footer region. This number should be less than or equal to the container width defined above.'), );