root / drupal7 / sites / all / themes / adaptivetheme / at_subtheme / template.php @ a84ddea4
1 |
<?php
|
---|---|
2 |
|
3 |
/**
|
4 |
* @file
|
5 |
* Process theme data.
|
6 |
*
|
7 |
* Use this file to run your theme specific implimentations of theme functions,
|
8 |
* such preprocess, process, alters, and theme function overrides.
|
9 |
*
|
10 |
* Preprocess and process functions are used to modify or create variables for
|
11 |
* templates and theme functions. They are a common theming tool in Drupal, often
|
12 |
* used as an alternative to directly editing or adding code to templates. Its
|
13 |
* worth spending some time to learn more about these functions - they are a
|
14 |
* powerful way to easily modify the output of any template variable.
|
15 |
*
|
16 |
* Preprocess and Process Functions SEE: http://drupal.org/node/254940#variables-processor
|
17 |
* 1. Rename each function and instance of "adaptivetheme_subtheme" to match
|
18 |
* your subthemes name, e.g. if your theme name is "footheme" then the function
|
19 |
* name will be "footheme_preprocess_hook". Tip - you can search/replace
|
20 |
* on "adaptivetheme_subtheme".
|
21 |
* 2. Uncomment the required function to use.
|
22 |
*/
|
23 |
|
24 |
|
25 |
/**
|
26 |
* Preprocess variables for the html template.
|
27 |
*/
|
28 |
/* -- Delete this line to enable.
|
29 |
function adaptivetheme_subtheme_preprocess_html(&$vars) {
|
30 |
global $theme_key;
|
31 |
|
32 |
// Two examples of adding custom classes to the body.
|
33 |
|
34 |
// Add a body class for the active theme name.
|
35 |
// $vars['classes_array'][] = drupal_html_class($theme_key);
|
36 |
|
37 |
// Browser/platform sniff - adds body classes such as ipad, webkit, chrome etc.
|
38 |
// $vars['classes_array'][] = css_browser_selector();
|
39 |
|
40 |
}
|
41 |
// */
|
42 |
|
43 |
|
44 |
/**
|
45 |
* Process variables for the html template.
|
46 |
*/
|
47 |
/* -- Delete this line if you want to use this function
|
48 |
function adaptivetheme_subtheme_process_html(&$vars) {
|
49 |
}
|
50 |
// */
|
51 |
|
52 |
|
53 |
/**
|
54 |
* Override or insert variables for the page templates.
|
55 |
*/
|
56 |
/* -- Delete this line if you want to use these functions
|
57 |
function adaptivetheme_subtheme_preprocess_page(&$vars) {
|
58 |
}
|
59 |
function adaptivetheme_subtheme_process_page(&$vars) {
|
60 |
}
|
61 |
// */
|
62 |
|
63 |
|
64 |
/**
|
65 |
* Override or insert variables into the node templates.
|
66 |
*/
|
67 |
/* -- Delete this line if you want to use these functions
|
68 |
function adaptivetheme_subtheme_preprocess_node(&$vars) {
|
69 |
}
|
70 |
function adaptivetheme_subtheme_process_node(&$vars) {
|
71 |
}
|
72 |
// */
|
73 |
|
74 |
|
75 |
/**
|
76 |
* Override or insert variables into the comment templates.
|
77 |
*/
|
78 |
/* -- Delete this line if you want to use these functions
|
79 |
function adaptivetheme_subtheme_preprocess_comment(&$vars) {
|
80 |
}
|
81 |
function adaptivetheme_subtheme_process_comment(&$vars) {
|
82 |
}
|
83 |
// */
|
84 |
|
85 |
|
86 |
/**
|
87 |
* Override or insert variables into the block templates.
|
88 |
*/
|
89 |
/* -- Delete this line if you want to use these functions
|
90 |
function adaptivetheme_subtheme_preprocess_block(&$vars) {
|
91 |
}
|
92 |
function adaptivetheme_subtheme_process_block(&$vars) {
|
93 |
}
|
94 |
// */
|