FINAL suepr merge step : added all modules to this super repos
This commit is contained in:
63
sites/all/themes/gui/materiobasetheme/template.php
Normal file
63
sites/all/themes/gui/materiobasetheme/template.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file template.php
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implementation of hook_theme
|
||||
*/
|
||||
function materiobasetheme_theme() {
|
||||
$path = drupal_get_path('theme', 'materiobasetheme');
|
||||
# Register theme function for the system_settings_form.
|
||||
return array(
|
||||
'system_settings_form' => array(
|
||||
'arguments' => array('form' => NULL, 'key' => 'materiobasetheme'),
|
||||
),
|
||||
);
|
||||
|
||||
# Include the theme settings.
|
||||
include($path .'/inc/template.theme-settings.inc');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_preprocess()
|
||||
*
|
||||
* This function checks to see if a hook has a preprocess file associated with
|
||||
* it, and if so, loads it.
|
||||
*
|
||||
* @param $vars
|
||||
* An array of variables to pass to the theme template.
|
||||
* @param $hook
|
||||
* The name of the template being rendered.
|
||||
*/
|
||||
function materiobasetheme_preprocess(&$vars, $hook) {
|
||||
global $theme, $theme_info, $user, $language;
|
||||
|
||||
$vars['is_admin'] = in_array('admin', $user->roles);
|
||||
$vars['logged_in'] = ($user->uid > 0) ? TRUE : FALSE;
|
||||
$vars['theme_path'] = base_path() . path_to_theme() .'/';
|
||||
|
||||
// $vars['classes_array'][] = $hook.' '.$hook.'-'.$vars['zebra'];
|
||||
|
||||
// dsm($hook, 'hook');
|
||||
|
||||
# Include preprocess functions if and when required.
|
||||
$path = drupal_get_path('theme', 'materiobasetheme');
|
||||
$file = $path .'/preprocess/'. str_replace('_', '-', $hook) .'.pre.php';
|
||||
if (is_file($file)) {
|
||||
include($file);
|
||||
}
|
||||
}
|
||||
|
||||
$path = drupal_get_path('theme', 'materiobasetheme');
|
||||
|
||||
# Include custom functions.
|
||||
include_once($path .'/inc/template.custom-functions.inc');
|
||||
|
||||
# Include theme overrides.
|
||||
include_once($path .'/inc/template.theme-overrides.inc');
|
||||
|
||||
# Include some jQuery.
|
||||
// include_once(drupal_get_path('theme', 'materiobasetheme') .'/inc/template.theme-js.inc');
|
Reference in New Issue
Block a user