summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhimerus2010-05-09 20:59:54 (GMT)
committer himerus2010-05-09 20:59:54 (GMT)
commit97d780ac435c4b3545d1eeb98465c3c32087a661 (patch)
tree7f9713f5b223b8a940dd238c0d46fe2c75f01c4f
parent4023fe5ac7c45b58fc983ac4c6c1d2057e428b62 (diff)
Working D7 Copy of the Omega themecvs status
-rwxr-xr-xnode.tpl.php94
-rw-r--r--page.tpl.php132
-rw-r--r--preprocess/preprocess-page.inc262
-rw-r--r--template.php44
-rw-r--r--theme-functions.inc34
-rw-r--r--theme-settings.php137
6 files changed, 347 insertions, 356 deletions
diff --git a/node.tpl.php b/node.tpl.php
index a688442..feee68a 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()
*/
?>
-<div<?php print $attributes; ?>>
+<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>>
- <?php print $picture ?>
+ <?php print $user_picture; ?>
<?php if (!$page && $title): ?>
- <h2><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
+ <?php print render($title_prefix); ?>
+ <h2 <?php print $title_attributes; ?>><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
+ <?php print render($title_suffix); ?>
<?php endif; ?>
- <?php if ($submitted):?>
- <div class="submitted"><?php print $submitted ?></div>
+ <?php if ($display_submitted):?>
+ <div class="submitted"><?php print $date; ?> -- <?php print $name; ?></div>
<?php endif; ?>
+
+ <div class="content clearfix"<?php print $content_attributes; ?>>
+ <?php
+ // We hide the comments and links now so that we can render them later.
+ hide($content['comments']);
+ hide($content['links']);
+ print render($content);
+ ?>
+ </div>
+
+ <div class="clearfix">
+ <?php if (!empty($content['links'])): ?>
+ <div class="links"><?php print render($content['links']); ?></div>
+ <?php endif; ?>
- <?php print $content ?>
- <?php if ($terms):?>
- <div class="taxonomy"><?php print $terms; ?></div>
- <?php endif; ?>
- <?php if ($links):?>
- <div class="node-links"><?php print $links; ?></div>
- <?php endif; ?>
+ <?php print render($content['comments']); ?>
+ </div>
</div> \ No newline at end of file
diff --git a/page.tpl.php b/page.tpl.php
index a144e20..17c02ee 100644
--- a/page.tpl.php
+++ b/page.tpl.php
@@ -1,26 +1,17 @@
<?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="clearfix">
<div id="site-header" class="container-<?php print $branding_wrapper_width; ?> clearfix">
<div id="branding" class="grid-<?php print $header_logo_width; ?>">
- <?php if ($linked_logo_img): ?>
+
+
+ <?php if (isset($linked_logo_img)): ?>
<?php print $linked_logo_img; ?>
<?php endif; ?>
- <?php if ($linked_site_name): ?>
+
+ <?php if (isset($linked_site_name)): ?>
<?php if ($title): ?>
<h2 id="site-name" class=""><?php print $linked_site_name; ?></h2>
<?php else: ?>
@@ -41,22 +32,32 @@
<?php endif; ?>
</div><!-- /#site-header -->
- <?php if($header_first || $header_last): ?>
+ <?php if($page['header_first'] || $page['header_last']): ?>
<div id="header-regions" class="container-<?php print $header_wrapper_width; ?> clearfix">
- <?php if($header_first): ?>
+ <?php if($page['header_first']): ?>
<div id="header-first" class="<?php print $header_first_classes; ?>">
- <?php print $header_first; ?>
+ <?php print render($page['header_first']); ?>
</div><!-- /#header-first -->
<?php endif; ?>
- <?php if($header_last): ?>
+ <?php if($page['header_last']): ?>
<div id="header-last" class="<?php print $header_last_classes; ?>">
- <?php print $header_last; ?>
+ <?php print render($page['header_last']); ?>
</div><!-- /#header-last -->
<?php endif; ?>
</div><!-- /#header-regions -->
<?php endif; ?>
- <?php if($site_slogan && $is_front || $search_box || $breadcrumb): ?>
+
+
+
+
+
+
+
+
+
+
+ <?php if($site_slogan && $is_front || $breadcrumb): ?>
<div id="internal-nav" class="container-<?php print $internal_nav_wrapper_width; ?> clearfix">
<div id="slogan-bcrumb" class="grid-<?php print $breadcrumb_slogan_width; ?>">
<?php if ($site_slogan && $is_front): ?>
@@ -66,48 +67,49 @@
<div id="bcrumb"><?php print $breadcrumb; ?></div><!-- /#bcrumb -->
<?php endif; ?>
</div>
- <?php if ($search_box): ?>
- <div id="search-box" class="grid-<?php print $search_width; ?>"><?php print $search_box; ?></div><!-- /#search-box -->
- <?php endif; ?>
</div><!-- /#internal-nav -->
<?php endif; ?>
- <?php if($preface_first || $preface_middle || $preface_last): ?>
+
+
+
+
+
+
+
+
+
+ <?php if($page['preface_first'] || $page['preface_middle'] || $page['preface_last']): ?>
<div id="preface-wrapper" class="container-<?php print $preface_wrapper_grids; ?> clearfix">
- <?php if($preface_first): ?>
+ <?php if($page['preface_first']): ?>
<div id="preface-first" class="preface <?php print $preface_first_classes; ?>">
- <?php print $preface_first; ?>
+ <?php print render($page['preface_first']); ?>
</div><!-- /#preface-first -->
<?php endif; ?>
- <?php if($preface_middle): ?>
+ <?php if($page['preface_middle']): ?>
<div id="preface-middle" class="preface <?php print $preface_middle_classes; ?>">
- <?php print $preface_middle; ?>
+ <?php print render($page['preface_middle']); ?>
</div><!-- /#preface-middle -->
<?php endif; ?>
- <?php if($preface_last): ?>
+ <?php if($page['preface_last']): ?>
<div id="preface-last" class="preface <?php print $preface_last_classes; ?>">
- <?php print $preface_last; ?>
+ <?php print render($page['preface_last']); ?>
</div><!-- /#preface-last -->
<?php endif; ?>
</div><!-- /#preface-wrapper -->
<?php endif; ?>
- <?php if($help || $messages): ?>
+ <?php if($messages): ?>
<div class="container-<?php print $default_container_width; ?> clearfix">
<div class="grid-<?php print $default_container_width; ?>">
- <?php print $help; ?><?php print $messages; ?>
+ <?php print $messages; ?>
</div>
</div><!-- /.container-xx -->
<?php endif; ?>
<div id="main-content-container" class="container-<?php print $content_container_width; ?> clearfix">
<div id="main-wrapper" class="column <?php print $main_content_classes; ?>">
- <?php print $mission; ?>
- <?php if($content_top): ?>
- <div id="content-top">
- <?php print $content_top; ?>
- </div><!-- /#content-top -->
- <?php endif; ?>
+
<?php if ($tabs): ?>
<div id="content-tabs" class=""><?php print $tabs; ?></div><!-- /#content-tabs -->
<?php endif; ?>
@@ -117,74 +119,62 @@
<?php endif; ?>
<div id="main-content" class="region clearfix">
- <?php print $content; ?>
+ <?php print render($page['content']); ?>
</div><!-- /#main-content -->
- <?php if($content_bottom): ?>
- <div id="content-bottom">
- <?php print $content_bottom; ?>
- </div><!-- /#content-bottom -->
- <?php endif; ?>
+
</div><!-- /#main-wrapper -->
- <?php if ($sidebar_first): ?>
+ <?php if ($page['sidebar_first']): ?>
<div id="sidebar-first" class="column sidebar region <?php print $sidebar_first_classes; ?>">
- <?php print $sidebar_first; ?>
+ <?php print render($page['sidebar_first']); ?>
</div><!-- /#sidebar-first -->
<?php endif; ?>
- <?php if ($sidebar_last): ?>
+ <?php if ($page['sidebar_last']): ?>
<div id="sidebar-last" class="column sidebar region <?php print $sidebar_last_classes; ?>">
- <?php print $sidebar_last; ?>
+ <?php print render($page['sidebar_last']); ?>
</div><!-- /#sidebar-last -->
<?php endif; ?>
</div><!-- /#main-content-container -->
- <?php if($postscript_one || $postscript_two || $postscript_three || $postscript_four): ?>
+ <?php if($page['postscript_one'] || $page['postscript_two'] || $page['postscript_three'] || $page['postscript_four']): ?>
<div id="postscript-wrapper" class="container-<?php print $postscript_container_width; ?> clearfix">
- <?php if($postscript_one): ?>
+ <?php if($page['postscript_one']): ?>
<div id="postscript-one" class="postscript <?php print $postscript_one_classes; ?>">
- <?php print $postscript_one; ?>
+ <?php print render($page['postscript_one']); ?>
</div><!-- /#postscript-one -->
<?php endif; ?>
- <?php if($postscript_two): ?>
+ <?php if($page['postscript_two']): ?>
<div id="postscript-two" class="postscript <?php print $postscript_two_classes; ?>">
- <?php print $postscript_two; ?>
+ <?php print render($page['postscript_two']); ?>
</div><!-- /#postscript-two -->
<?php endif; ?>
- <?php if($postscript_three): ?>
+ <?php if($page['postscript_three']): ?>
<div id="postscript-three" class="postscript <?php print $postscript_three_classes; ?>">
- <?php print $postscript_three; ?>
+ <?php print render($page['postscript_three']); ?>
</div><!-- /#postscript-three -->
<?php endif; ?>
- <?php if($postscript_four): ?>
+ <?php if($page['postscript_four']): ?>
<div id="postscript-four" class="postscript <?php print $postscript_four_classes; ?>">
- <?php print $postscript_four; ?>
+ <?php print render($page['postscript_four']); ?>
</div><!-- /#postscript-four -->
<?php endif; ?>
</div><!-- /#postscript-wrapper -->
<?php endif; ?>
- <?php if($footer_first || $footer_last || $footer_message): ?>
+ <?php if($page['footer_first'] || $page['footer_last']): ?>
<div id="footer-wrapper" class="container-<?php print $footer_container_width; ?> clearfix">
- <?php if($footer_first): ?>
+ <?php if($page['footer_first']): ?>
<div id="footer-first" class="<?php print $footer_first_classes; ?>">
- <?php print $footer_first; ?>
+ <?php print render($page['footer_first']); ?>
</div><!-- /#footer-first -->
<?php endif; ?>
- <?php if($footer_last || $footer_message): ?>
+ <?php if($page['footer_last']): ?>
<div id="footer-last" class="<?php print $footer_last_classes; ?>">
- <?php print $footer_last; ?>
- <?php if ($footer_message): ?>
- <div id="footer-message">
- <?php print $footer_message; ?>
- </div><!-- /#footer-message -->
- <?php endif; ?>
+ <?php print render($page['footer_last']); ?>
</div><!-- /#footer-last -->
<?php endif; ?>
</div><!-- /#footer-wrapper -->
<?php endif; ?>
- </div><!-- /#page -->
- <?php print $closure; ?>
-</body>
-</html> \ No newline at end of file
+ </div><!-- /#page --> \ No newline at end of file
diff --git a/preprocess/preprocess-page.inc b/preprocess/preprocess-page.inc
index cec9c04..6ef9a54 100644
--- a/preprocess/preprocess-page.inc
+++ b/preprocess/preprocess-page.inc
@@ -1,8 +1,6 @@
<?php
// $Id$
global $theme_key;
-//include_once './' . drupal_get_path('theme', 'omega') . '/theme-functions.inc';
-$settings = theme_get_settings($theme_key);
/**
* Adding in the ability to combine the sidebars on certain paths in order to adjust
@@ -13,17 +11,17 @@ $settings = theme_get_settings($theme_key);
* unset the sidebar_last variable. This resets the layout to act like only one
* sidebar is present in certain paths
*/
-if ($settings['sidebar_contain_pages']) {
+if (theme_get_setting('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, $settings['sidebar_contain_pages']);
+ $page_match = drupal_match_path($path, theme_get_setting('sidebar_contain_pages'));
if ($path != $_GET['q']) {
- $page_match = $page_match || drupal_match_path($_GET['q'], $settings['sidebar_contain_pages']);
+ $page_match = $page_match || drupal_match_path($_GET['q'], theme_get_setting('sidebar_contain_pages'));
}
- $page_match = !($settings['sidebar_combine'] xor $page_match);
+ $page_match = !(theme_get_setting('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']);
+ $vars['page']['sidebar_first'] = $vars['page']['sidebar_first']. $vars['page']['sidebar_last'];
+ unset($vars['page']['sidebar_last']);
}
}
@@ -37,61 +35,61 @@ if ($settings['sidebar_contain_pages']) {
// the width of the wrapper item around the navigation menus & header block regions
// This width plus the logo width should total the width of your grid.
-$vars['header_wrapper_width'] = $settings['omega_header_wrapper_width'];
+$vars['header_wrapper_width'] = theme_get_setting('omega_header_wrapper_width');
// The width of the logo element.
// This width plus the logo width should total the width of your grid.
-$vars['default_container_width'] = $settings['omega_default_container_width'];
-$vars['branding_wrapper_width'] = $settings['omega_branding_wrapper_width'];
-$vars['header_logo_width'] = $settings['omega_header_logo_width'];
-$vars['header_menu_width'] = $settings['omega_header_menu_width'];
-$vars['internal_nav_wrapper_width'] = $settings['omega_internal_nav_wrapper_width'];
-$vars['breadcrumb_slogan_width'] = $settings['omega_breadcrumb_slogan_width'];
-$vars['search_width'] = $settings['omega_search_width'];
+$vars['default_container_width'] = theme_get_setting('omega_default_container_width');
+$vars['branding_wrapper_width'] = theme_get_setting('omega_branding_wrapper_width');
+$vars['header_logo_width'] = theme_get_setting('omega_header_logo_width');
+$vars['header_menu_width'] = theme_get_setting('omega_header_menu_width');
+$vars['internal_nav_wrapper_width'] = theme_get_setting('omega_internal_nav_wrapper_width');
+$vars['breadcrumb_slogan_width'] = theme_get_setting('omega_breadcrumb_slogan_width');
+$vars['search_width'] = theme_get_setting('omega_search_width');
$header_regions = array(
'header_first' => 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'] = '<img src="'. $vars['logo'] .'" alt="'. $vars['site_name_and_slogan'] .'" id="logo" />';
}
-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'], '<front>', array('rel' => 'home', 'title' => t($vars['site_name']), 'html' => TRUE)) : '';
-$vars['linked_site_name'] = $vars['site_name'] ? l($vars['site_name'], '<front>', 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'], '<front>', array('rel' => 'home', 'title' => t($vars['site_name']), 'html' => TRUE));
+}
+if(isset($vars['site_name'])) {
+ $vars['linked_site_name'] = l($vars['site_name'], '<front>', 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'] = '<div id="mission" class=""><p>' .$vars['mission']. '</p></div>';
-}
-else {
- unset($vars['mission']);
} \ No newline at end of file
diff --git a/template.php b/template.php
index 5372bf1..6160647 100644
--- a/template.php
+++ b/template.php
@@ -1,7 +1,7 @@
<?php
//$Id$
// Report all PHP errors (see changelog)
-//ini_set('error_reporting', E_ALL);
+
/**
* Implementation of hook_preprocess()
*
@@ -21,10 +21,10 @@ function omega_preprocess(&$vars, $hook) {
// Collect all information for the active theme.
$themes_active = array();
global $theme_info;
-
+ //krumo($theme_info);
// If there is a base theme, collect the names of all themes that may have
// preprocess files to load.
- if($theme_info->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 4ca62d3..13bb990 100644
--- a/theme-functions.inc
+++ b/theme-functions.inc
@@ -1,36 +1,2 @@
<?php
// $Id$
-/**
- * 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();
- //krumo($themes[$theme]->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 d39b912..f5dfb8d 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' => '<div class="prefix_config">',
'#suffix' => '</div>',
@@ -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' => '<div class="suffix_config">',
'#suffix' => '</div>',
@@ -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' => '<div class="prefix_config">',
'#suffix' => '</div>',
@@ -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' => '<div class="suffix_config">',
'#suffix' => '</div>',
@@ -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' => '<div class="prefix_config">',
'#suffix' => '</div>',
@@ -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' => '<div class="suffix_config">',
'#suffix' => '</div>',
@@ -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 <strong>$sidebar_first</strong> and <strong>$sidebar_last</strong> 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' => '<div class="prefix_config">',
'#suffix' => '</div>',
@@ -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' => '<div class="suffix_config">',
'#suffix' => '</div>',
@@ -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' => '<div class="prefix_config">',
'#suffix' => '</div>',
@@ -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' => '<div class="suffix_config">',
'#suffix' => '</div>',
@@ -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' => '<div class="prefix_config">',
'#suffix' => '</div>',
@@ -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' => '<div class="suffix_config">',
'#suffix' => '</div>',
@@ -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' => '<div class="prefix_config">',
'#suffix' => '</div>',
@@ -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' => '<div class="suffix_config">',
'#suffix' => '</div>',
@@ -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.'),
);