Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions themes/commerce_kickstart_theme/preprocess/preprocess-html.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

/**
* Preprocess variables for html.tpl.php
*
* @see system_elements()
* @see html.tpl.php
*/
function commerce_kickstart_theme_alpha_preprocess_html(&$variables) {
// Add conditional stylesheets for IE
drupal_add_css(path_to_theme() . '/css/commerce-kickstart-theme-ie-lte-8.css', array('group' => CSS_THEME, 'weight' => 23, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'preprocess' => FALSE));
drupal_add_css(path_to_theme() . '/css/commerce-kickstart-theme-ie-lte-7.css', array('group' => CSS_THEME, 'weight' => 24, 'browsers' => array('IE' => 'lte IE 7', '!IE' => FALSE), 'preprocess' => FALSE));

// Add external libraries.
drupal_add_library('commerce_kickstart_theme', 'selectnav');
}
11 changes: 11 additions & 0 deletions themes/commerce_kickstart_theme/preprocess/preprocess-node.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

/**
* Override the submitted variable.
*/
function commerce_kickstart_theme_alpha_preprocess_node(&$variables) {
$variables['submitted'] = $variables['date'] . ' - ' . $variables['name'];
if ($variables['type'] == 'blog_post') {
$variables['submitted'] = t('By') . ' ' . $variables['name'] . ', ' . $variables['date'];
}
}
25 changes: 0 additions & 25 deletions themes/commerce_kickstart_theme/template.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
<?php

/**
* Preprocess variables for html.tpl.php
*
* @see system_elements()
* @see html.tpl.php
*/
function commerce_kickstart_theme_preprocess_html(&$variables) {
// Add conditional stylesheets for IE
drupal_add_css(path_to_theme() . '/css/commerce-kickstart-theme-ie-lte-8.css', array('group' => CSS_THEME, 'weight' => 23, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'preprocess' => FALSE));
drupal_add_css(path_to_theme() . '/css/commerce-kickstart-theme-ie-lte-7.css', array('group' => CSS_THEME, 'weight' => 24, 'browsers' => array('IE' => 'lte IE 7', '!IE' => FALSE), 'preprocess' => FALSE));

// Add external libraries.
drupal_add_library('commerce_kickstart_theme', 'selectnav');
}

/**
* Implements hook_library().
*/
Expand All @@ -28,13 +13,3 @@ function commerce_kickstart_theme_library() {
);
return $libraries;
}

/**
* Override the submitted variable.
*/
function commerce_kickstart_theme_preprocess_node(&$variables) {
$variables['submitted'] = $variables['date'] . ' - ' . $variables['name'];
if ($variables['type'] == 'blog_post') {
$variables['submitted'] = t('By') . ' ' . $variables['name'] . ', ' . $variables['date'];
}
}