template.php

  1. cis7 sites/all/themes/ulmus/omega/starterkits/alpha-xhtml/template.php
  2. cis7 sites/all/themes/ulmus/rubik/template.php
  3. cis7 sites/all/themes/local_contrib/zurb-foundation/template.php
  4. cis7 sites/all/themes/ulmus/skeletontheme/template.php
  5. cis7 sites/all/themes/ulmus/corolla/template.php
  6. cis7 sites/all/themes/ulmus/ember/template.php
  7. cis7 sites/all/themes/ulmus/respond/template.php
  8. cis7 sites/all/themes/ulmus/aurora/template.php
  9. cis7 sites/all/themes/ulmus/tao/template.php
  10. cis7 sites/all/themes/ulmus/fontfolio/template.php
  11. cis7 modules/simpletest/tests/themes/test_theme/template.php
  12. cis7 profiles/cis/themes/cis-theme/template.php
  13. cis7 sites/all/themes/local_contrib/zurb-foundation/STARTER/template.php
  14. cis7 sites/all/themes/ulmus/omega/alpha/template.php
  15. cis7 sites/all/themes/ulmus/omega/omega/template.php
  16. cis7 sites/all/themes/ulmus/adaptivetheme/at_subtheme/template.php
  17. cis7 sites/all/themes/ulmus/adaptivetheme/at_core/template.php
  18. cis7 sites/all/themes/ulmus/adaptivetheme/at_admin/template.php
  19. cis7 sites/all/themes/ulmus/omega/starterkits/omega-html5/template.php
  20. cis7 sites/all/themes/ulmus/omega/starterkits/omega-xhtml/template.php
  21. cis7 sites/all/modules/ulmus/libraries/tests/themes/libraries_test_theme/template.php
  22. cis7 sites/all/themes/elmsln_contrib/chamfer/template.php
  23. cis7 themes/garland/template.php
  24. cis7 themes/bartik/template.php
  25. cis7 themes/seven/template.php
  26. cis7 sites/all/themes/elmsln_contrib/foundation_access/template.php
  27. cle7 sites/all/themes/ulmus/omega/omega/template.php
  28. cle7 sites/all/themes/local_contrib/zurb_foundation/STARTER/template.php
  29. cle7 sites/all/modules/ulmus/libraries/tests/themes/libraries_test_theme/template.php
  30. cle7 sites/all/themes/ulmus/omega/starterkits/omega-xhtml/template.php
  31. cle7 sites/all/themes/ulmus/skeletontheme/template.php
  32. cle7 sites/all/themes/ulmus/omega/starterkits/omega-html5/template.php
  33. cle7 sites/all/themes/ulmus/omega/starterkits/alpha-xhtml/template.php
  34. cle7 sites/all/themes/ulmus/adaptivetheme/at_admin/template.php
  35. cle7 sites/all/themes/ulmus/adaptivetheme/at_core/template.php
  36. cle7 sites/all/themes/ulmus/adaptivetheme/at_subtheme/template.php
  37. cle7 sites/all/themes/local_contrib/bootstrap/bootstrap_subtheme/template.php
  38. cle7 sites/all/themes/ulmus/omega/alpha/template.php
  39. cle7 sites/all/themes/elmsln_contrib/chamfer/template.php
  40. cle7 modules/simpletest/tests/themes/test_theme/template.php
  41. cle7 sites/all/themes/ulmus/rubik/template.php
  42. cle7 sites/all/themes/ulmus/fontfolio/template.php
  43. cle7 sites/all/themes/ulmus/tao/template.php
  44. cle7 sites/all/themes/ulmus/aurora/template.php
  45. cle7 sites/all/themes/ulmus/respond/template.php
  46. cle7 sites/all/themes/ulmus/ember/template.php
  47. cle7 sites/all/themes/ulmus/corolla/template.php
  48. cle7 sites/all/themes/local_contrib/bootstrap/template.php
  49. cle7 sites/all/themes/local_contrib/zurb_foundation/STARTER/template.php
  50. cle7 themes/garland/template.php
  51. cle7 themes/bartik/template.php
  52. cle7 sites/all/themes/local_contrib/zurb_foundation/template.php
  53. cle7 sites/all/themes/elmsln_contrib/foundation_access/template.php
  54. cle7 themes/seven/template.php
  55. ecd7 sites/all/themes/ulmus/adaptivetheme/at_admin/template.php
  56. ecd7 sites/all/themes/ulmus/adaptivetheme/at_core/template.php
  57. ecd7 sites/all/themes/ulmus/omega/omega/template.php
  58. ecd7 sites/all/themes/ulmus/omega/alpha/template.php
  59. ecd7 sites/all/themes/local_contrib/zurb_foundation/STARTER/template.php
  60. ecd7 modules/simpletest/tests/themes/test_theme/template.php
  61. ecd7 sites/all/themes/ulmus/rubik/template.php
  62. ecd7 sites/all/themes/ulmus/fontfolio/template.php
  63. ecd7 sites/all/themes/ulmus/tao/template.php
  64. ecd7 sites/all/themes/ulmus/aurora/template.php
  65. ecd7 sites/all/themes/ulmus/respond/template.php
  66. ecd7 sites/all/themes/ulmus/ember/template.php
  67. ecd7 sites/all/modules/ulmus/libraries/tests/themes/libraries_test_theme/template.php
  68. ecd7 themes/garland/template.php
  69. ecd7 themes/bartik/template.php
  70. ecd7 themes/seven/template.php
  71. ecd7 sites/all/themes/ulmus/omega/starterkits/omega-xhtml/template.php
  72. ecd7 sites/all/themes/ulmus/omega/starterkits/omega-html5/template.php
  73. ecd7 sites/all/themes/ulmus/omega/starterkits/alpha-xhtml/template.php
  74. ecd7 sites/all/themes/elmsln_contrib/chamfer/template.php
  75. ecd7 sites/all/themes/elmsln_contrib/foundation_access/template.php
  76. ecd7 sites/all/themes/local_contrib/zurb_foundation/template.php
  77. ecd7 sites/all/themes/ulmus/skeletontheme/template.php
  78. ecd7 sites/all/themes/ulmus/corolla/template.php
  79. ecd7 sites/all/themes/ulmus/adaptivetheme/at_subtheme/template.php
  80. elmsmedia7 sites/all/themes/ulmus/omega/starterkits/omega-xhtml/template.php
  81. elmsmedia7 sites/all/themes/ulmus/omega/starterkits/omega-html5/template.php
  82. elmsmedia7 sites/all/modules/ulmus/libraries/tests/themes/libraries_test_theme/template.php
  83. elmsmedia7 sites/all/themes/elmsln_contrib/foundation_access/template.php
  84. elmsmedia7 sites/all/themes/local_contrib/zurb_foundation/template.php
  85. elmsmedia7 sites/all/themes/ulmus/adaptivetheme/at_admin/template.php
  86. elmsmedia7 sites/all/themes/local_contrib/zurb_foundation/STARTER/template.php
  87. elmsmedia7 sites/all/themes/ulmus/omega/starterkits/alpha-xhtml/template.php
  88. elmsmedia7 sites/all/themes/ulmus/respond/template.php
  89. elmsmedia7 sites/all/themes/ulmus/adaptivetheme/at_core/template.php
  90. elmsmedia7 themes/seven/template.php
  91. elmsmedia7 themes/garland/template.php
  92. elmsmedia7 sites/all/themes/elmsln_contrib/chamfer/template.php
  93. elmsmedia7 sites/all/themes/ulmus/rubik/template.php
  94. elmsmedia7 sites/all/themes/ulmus/skeletontheme/template.php
  95. elmsmedia7 sites/all/themes/ulmus/fontfolio/template.php
  96. elmsmedia7 sites/all/themes/ulmus/tao/template.php
  97. elmsmedia7 sites/all/themes/ulmus/aurora/template.php
  98. elmsmedia7 sites/all/themes/ulmus/ember/template.php
  99. elmsmedia7 sites/all/themes/ulmus/corolla/template.php
  100. elmsmedia7 sites/all/themes/ulmus/adaptivetheme/at_subtheme/template.php
  101. elmsmedia7 modules/simpletest/tests/themes/test_theme/template.php
  102. elmsmedia7 sites/all/themes/ulmus/omega/alpha/template.php
  103. elmsmedia7 sites/all/themes/ulmus/omega/omega/template.php
  104. elmsmedia7 themes/bartik/template.php
  105. harmony7 sites/all/themes/elmsln_contrib/foundation_access/template.php
  106. harmony7 sites/all/themes/local_contrib/zurb_foundation/template.php
  107. harmony7 sites/all/themes/elmsln_contrib/chamfer/template.php
  108. harmony7 sites/all/themes/local_contrib/bootstrap/template.php
  109. harmony7 sites/all/themes/local_contrib/bootstrap/bootstrap_subtheme/template.php
  110. harmony7 modules/simpletest/tests/themes/test_theme/template.php
  111. harmony7 sites/all/themes/local_contrib/zurb_foundation/STARTER/template.php
  112. harmony7 sites/all/themes/ulmus/corolla/template.php
  113. harmony7 sites/all/themes/ulmus/omega/alpha/template.php
  114. harmony7 sites/all/themes/ulmus/omega/omega/template.php
  115. harmony7 sites/all/themes/ulmus/adaptivetheme/at_subtheme/template.php
  116. harmony7 sites/all/themes/ulmus/adaptivetheme/at_core/template.php
  117. harmony7 sites/all/themes/ulmus/adaptivetheme/at_admin/template.php
  118. harmony7 sites/all/themes/ulmus/omega/starterkits/alpha-xhtml/template.php
  119. harmony7 sites/all/themes/ulmus/omega/starterkits/omega-html5/template.php
  120. harmony7 sites/all/themes/ulmus/omega/starterkits/omega-xhtml/template.php
  121. harmony7 sites/all/modules/ulmus/libraries/tests/themes/libraries_test_theme/template.php
  122. harmony7 themes/seven/template.php
  123. harmony7 themes/bartik/template.php
  124. harmony7 themes/garland/template.php
  125. harmony7 sites/all/themes/ulmus/skeletontheme/template.php
  126. harmony7 sites/all/themes/ulmus/tao/template.php
  127. harmony7 sites/all/themes/ulmus/ember/template.php
  128. harmony7 sites/all/themes/ulmus/aurora/template.php
  129. harmony7 sites/all/themes/ulmus/fontfolio/template.php
  130. harmony7 sites/all/themes/ulmus/rubik/template.php
  131. harmony7 sites/all/themes/ulmus/respond/template.php
  132. icor7 sites/all/themes/ulmus/respond/template.php
  133. icor7 sites/all/themes/local_contrib/zurb_foundation/STARTER/template.php
  134. icor7 sites/all/themes/local_contrib/zurb_foundation/template.php
  135. icor7 themes/seven/template.php
  136. icor7 themes/bartik/template.php
  137. icor7 themes/garland/template.php
  138. icor7 sites/all/themes/elmsln_contrib/foundation_access/template.php
  139. icor7 sites/all/themes/elmsln_contrib/chamfer/template.php
  140. icor7 sites/all/themes/ulmus/skeletontheme/template.php
  141. icor7 sites/all/themes/ulmus/corolla/template.php
  142. icor7 sites/all/themes/ulmus/ember/template.php
  143. icor7 sites/all/themes/ulmus/fontfolio/template.php
  144. icor7 sites/all/themes/ulmus/aurora/template.php
  145. icor7 sites/all/themes/ulmus/tao/template.php
  146. icor7 modules/simpletest/tests/themes/test_theme/template.php
  147. icor7 sites/all/themes/ulmus/omega/alpha/template.php
  148. icor7 sites/all/themes/ulmus/omega/omega/template.php
  149. icor7 sites/all/themes/ulmus/adaptivetheme/at_subtheme/template.php
  150. icor7 sites/all/themes/ulmus/adaptivetheme/at_core/template.php
  151. icor7 sites/all/themes/ulmus/adaptivetheme/at_admin/template.php
  152. icor7 sites/all/themes/ulmus/omega/starterkits/alpha-xhtml/template.php
  153. icor7 sites/all/themes/ulmus/omega/starterkits/omega-html5/template.php
  154. icor7 sites/all/themes/ulmus/omega/starterkits/omega-xhtml/template.php
  155. icor7 sites/all/modules/ulmus/libraries/tests/themes/libraries_test_theme/template.php
  156. icor7 sites/all/themes/ulmus/rubik/template.php
  157. meedjum_blog7 themes/seven/template.php
  158. meedjum_blog7 themes/bartik/template.php
  159. meedjum_blog7 sites/all/themes/ulmus/fontfolio/template.php
  160. meedjum_blog7 sites/all/modules/ulmus/libraries/tests/themes/libraries_test_theme/template.php
  161. meedjum_blog7 sites/all/themes/ulmus/omega/starterkits/omega-xhtml/template.php
  162. meedjum_blog7 sites/all/themes/ulmus/omega/starterkits/omega-html5/template.php
  163. meedjum_blog7 sites/all/themes/ulmus/omega/starterkits/alpha-xhtml/template.php
  164. meedjum_blog7 sites/all/themes/ulmus/adaptivetheme/at_admin/template.php
  165. meedjum_blog7 sites/all/themes/ulmus/adaptivetheme/at_core/template.php
  166. meedjum_blog7 sites/all/themes/ulmus/adaptivetheme/at_subtheme/template.php
  167. meedjum_blog7 sites/all/themes/ulmus/omega/omega/template.php
  168. meedjum_blog7 sites/all/themes/ulmus/omega/alpha/template.php
  169. meedjum_blog7 modules/simpletest/tests/themes/test_theme/template.php
  170. meedjum_blog7 sites/all/themes/ulmus/rubik/template.php
  171. meedjum_blog7 sites/all/themes/ulmus/tao/template.php
  172. meedjum_blog7 sites/all/themes/ulmus/aurora/template.php
  173. meedjum_blog7 sites/all/themes/ulmus/respond/template.php
  174. meedjum_blog7 sites/all/themes/ulmus/ember/template.php
  175. meedjum_blog7 sites/all/themes/ulmus/corolla/template.php
  176. meedjum_blog7 sites/all/themes/ulmus/skeletontheme/template.php
  177. meedjum_blog7 sites/all/themes/elmsln_contrib/chamfer/template.php
  178. meedjum_blog7 sites/all/themes/elmsln_contrib/foundation_access/template.php
  179. meedjum_blog7 sites/all/themes/local_contrib/zurb_foundation/template.php
  180. meedjum_blog7 sites/all/themes/local_contrib/meedjum/template.php
  181. meedjum_blog7 sites/all/themes/local_contrib/zurb_foundation/STARTER/template.php
  182. meedjum_blog7 themes/garland/template.php
  183. mooc7 themes/seven/template.php
  184. mooc7 sites/all/themes/local_contrib/zurb_foundation/STARTER/template.php
  185. mooc7 sites/all/themes/elmsln_contrib/chamfer/template.php
  186. mooc7 themes/bartik/template.php
  187. mooc7 sites/all/themes/ulmus/omega/alpha/template.php
  188. mooc7 sites/all/themes/elmsln_contrib/foundation_access/template.php
  189. mooc7 sites/all/modules/ulmus/libraries/tests/themes/libraries_test_theme/template.php
  190. mooc7 sites/all/themes/ulmus/omega/starterkits/omega-xhtml/template.php
  191. mooc7 sites/all/themes/ulmus/omega/starterkits/omega-html5/template.php
  192. mooc7 sites/all/themes/ulmus/omega/starterkits/alpha-xhtml/template.php
  193. mooc7 sites/all/themes/ulmus/adaptivetheme/at_admin/template.php
  194. mooc7 sites/all/themes/ulmus/adaptivetheme/at_core/template.php
  195. mooc7 sites/all/themes/ulmus/adaptivetheme/at_subtheme/template.php
  196. mooc7 sites/all/themes/ulmus/omega/omega/template.php
  197. mooc7 modules/simpletest/tests/themes/test_theme/template.php
  198. mooc7 themes/garland/template.php
  199. mooc7 sites/all/themes/ulmus/rubik/template.php
  200. mooc7 sites/all/themes/ulmus/fontfolio/template.php
  201. mooc7 sites/all/themes/ulmus/tao/template.php
  202. mooc7 sites/all/themes/ulmus/aurora/template.php
  203. mooc7 sites/all/themes/ulmus/respond/template.php
  204. mooc7 sites/all/themes/ulmus/ember/template.php
  205. mooc7 sites/all/themes/ulmus/corolla/template.php
  206. mooc7 sites/all/themes/ulmus/skeletontheme/template.php
  207. mooc7 sites/all/themes/local_contrib/zurb_foundation/template.php
  208. mooc7 sites/all/modules/local_contrib/omega_tools/default/template.php

Contains functions to alter Drupal's markup for the Aurora theme.

_d^^^^^^^^^b_ .d'' ``b. .p' @ @ `q. NOTHING TO DO HERE .d' ---------- `b. .d' `b. :: :: :: :: :: :: `p. .q' `p. .q' `b. .d'\ / ^q...........p^ \ / ''''bbbbbbb \ / __ __ \bbbbbbbb / \_bbbbbbbb__\________/ bb bbbbbbbbbbbbbbb bb|bbbbbbb *** b|bbbbb ****** _______ | **000*** / \ | **00000** __|__________\/ *** ** / | * * | \ | \__ \ \__

The Aurora theme is a base theme designed to be easily extended by sub themes. You should not modify this or any other file in the Aurora theme folder. Instead, you should create a sub-theme and make your changes there. In fact, if you're reading this, you may already off on the wrong foot.

See the project page for more information: http://drupal.org/project/aurora

Functions

Namesort descending Description
aurora_breadcrumb Return a themed breadcrumb trail.
aurora_css_alter Implements hook_css_alter().
aurora_panels_default_style_render_region
aurora_preprocess_block
aurora_preprocess_comment Implements the hook_preprocess_comment().
aurora_preprocess_html Implements hook_preprocess_html()
aurora_preprocess_maintenance_page
aurora_preprocess_node Implements hook_preprocess_node().
aurora_preprocess_panels_pane
aurora_preprocess_user_profile_category Implements hook_preprocess_user_profile_category().
aurora_process_html Implements hook_process_html().
aurora_process_html_tag Implements hook_process_html_tag
aurora_process_maintenance_page

File

sites/all/themes/ulmus/aurora/template.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Contains functions to alter Drupal's markup for the Aurora theme.
  5. *
  6. * _d^^^^^^^^^b_
  7. * .d'' ``b.
  8. * .p' @ @ `q. NOTHING TO DO HERE
  9. * .d' ---------- `b.
  10. * .d' `b.
  11. * :: ::
  12. * :: ::
  13. * :: ::
  14. * `p. .q'
  15. * `p. .q'
  16. * `b. .d'\
  17. * / ^q...........p^ \
  18. * / ''''bbbbbbb \
  19. * / __ __ \bbbbbbbb /
  20. * \_bbbbbbbb__\________/
  21. * bb bbbbbbbbbbbbbbb
  22. * bb|bbbbbbb ***
  23. * b|bbbbb ******
  24. * _______ | **000***
  25. * / \ | **00000**
  26. * __|__________\/ *** **
  27. * / | * *
  28. * | \
  29. * | \__
  30. * \
  31. * \__
  32. *
  33. * The Aurora theme is a base theme designed to be easily extended by sub
  34. * themes. You should not modify this or any other file in the Aurora theme
  35. * folder. Instead, you should create a sub-theme and make your changes there.
  36. * In fact, if you're reading this, you may already off on the wrong foot.
  37. *
  38. * See the project page for more information:
  39. * http://drupal.org/project/aurora
  40. */
  41. //////////////////////////////
  42. // Includes
  43. //////////////////////////////
  44. require_once dirname(__FILE__) . '/includes/theme.inc';
  45. require_once dirname(__FILE__) . '/includes/pager.inc';
  46. require_once dirname(__FILE__) . '/includes/messages.inc';
  47. function aurora_preprocess_maintenance_page(&$vars, $hook) {
  48. // When a variable is manipulated or added in preprocess_html or
  49. // preprocess_page, that same work is probably needed for the maintenance page
  50. // as well, so we can just re-use those functions to do that work here.
  51. aurora_preprocess_html($vars);
  52. }
  53. function aurora_process_maintenance_page(&$vars, $hook) {
  54. // When a variable is manipulated or added in preprocess_html or
  55. // preprocess_page, that same work is probably needed for the maintenance page
  56. // as well, so we can just re-use those functions to do that work here.
  57. aurora_process_html($vars);
  58. }
  59. //////////////////////////////
  60. // HTML5 Project Sideport
  61. //////////////////////////////
  62. /**
  63. * Implements hook_preprocess_html()
  64. */
  65. function aurora_preprocess_html(&$vars) {
  66. // Viewport!
  67. $viewport = array(
  68. '#tag' => 'meta',
  69. '#attributes' => array(
  70. 'name' => 'viewport',
  71. 'content' => 'initial-scale=1.0',
  72. ),
  73. );
  74. drupal_add_html_head($viewport, 'viewport');
  75. // Force IE to use most up-to-date render engine.
  76. $xua = array(
  77. '#tag' => 'meta',
  78. '#attributes' => array(
  79. 'http-equiv' => 'X-UA-Compatible',
  80. 'content' => 'IE=edge',
  81. ),
  82. );
  83. drupal_add_html_head($xua, 'x-ua-compatible');
  84. $vars['minie'] = theme_get_setting('aurora_min_ie_support');
  85. //////////////////////////////
  86. // HTML5 Base Theme Forwardport
  87. //
  88. // Backports the following changes made to Drupal 8:
  89. // - #1077566: Convert html.tpl.php to HTML5.
  90. //////////////////////////////
  91. // Initializes attributes which are specific to the html and body elements.
  92. $vars['html_attributes_array'] = array();
  93. $vars['rdf_attributes_array'] = array();
  94. $vars['body_attributes_array'] = array();
  95. // HTML element attributes.
  96. $vars['html_attributes_array']['lang'] = $GLOBALS['language']->language;
  97. $vars['html_attributes_array']['dir'] = $GLOBALS['language']->direction ? 'rtl' : 'ltr';
  98. // Update RDF Namespacing
  99. if (module_exists('rdf')) {
  100. // Adds RDF namespace prefix bindings in the form of an RDFa 1.1 prefix
  101. // attribute inside the html element.
  102. $prefixes = array();
  103. foreach (rdf_get_namespaces() as $prefix => $uri) {
  104. $vars['rdf_attributes_array']['prefix'][] = $prefix . ': ' . $uri . "\n";
  105. }
  106. }
  107. //////////////////////////////
  108. // LiveReload Integration
  109. //////////////////////////////
  110. $livereload_port = theme_get_setting('aurora_livereload');
  111. if ($livereload_port) {
  112. if ($livereload_port == 'snugug') {
  113. $livereload_port = theme_get_setting('aurora_livereload_port');
  114. if (is_null($livereload_port)) {
  115. $livereload_port = 35729;
  116. }
  117. }
  118. drupal_add_js("document.write('<script src=\"http://' + (location.host || 'localhost').split(':')[0] + ':$livereload_port/livereload.js?snipver=1\"></' + 'script>')", array('type' => 'inline', 'scope' => 'footer', 'weight' => 9999));
  119. }
  120. //////////////////////////////
  121. // Add in TypeKit Code.
  122. //////////////////////////////
  123. if (theme_get_setting('aurora_typekit_id')) {
  124. drupal_add_js('(function(){var e={kitId:"' . theme_get_setting('aurora_typekit_id') . '",scriptTimeout:3e3},t=document.getElementsByTagName("html")[0];t.className+=" wf-loading";var n=setTimeout(function(){t.className=t.className.replace(/(\s|^)wf-loading(\s|$)/g," "),t.className+=" wf-inactive"},e.scriptTimeout),r=document.createElement("script"),i=!1;r.src="//use.typekit.net/"+e.kitId+".js",r.type="text/javascript",r.async="true",r.onload=r.onreadystatechange=function(){var t=this.readyState;if(i||t&&t!="complete"&&t!="loaded")return;i=!0,clearTimeout(n);try{Typekit.load(e)}catch(r){}};var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(r,s)})()', array('type' => 'inline', 'force header' => true));
  125. }
  126. }
  127. /**
  128. * Implements hook_process_html().
  129. */
  130. function aurora_process_html(&$vars) {
  131. //////////////////////////////
  132. // RWD Debug Integration
  133. //////////////////////////////
  134. if (theme_get_setting('aurora_viewport_width') || theme_get_setting('aurora_modernizr_debug')) {
  135. $debug_output = '<div id="aurora-debug">';
  136. if (theme_get_setting('aurora_viewport_width')) {
  137. $debug_output .= '<div id="aurora-viewport-width"></div>';
  138. }
  139. if (theme_get_setting('aurora_modernizr_debug')) {
  140. $debug_output .= '<div id="aurora-modernizr-debug" class="open"></div>';
  141. }
  142. $debug_output .= '</div>';
  143. if (!empty($vars['page_bottom'])) {
  144. $vars['page_bottom'] .= $debug_output;
  145. }
  146. else {
  147. $vars['page_bottom'] = $debug_output;
  148. }
  149. }
  150. //////////////////////////////
  151. // HTML5 Base Theme Forwardport
  152. //
  153. // Backports the following changes made to Drupal 8:
  154. // - #1077566: Convert html.tpl.php to HTML5.
  155. //////////////////////////////
  156. // Flatten out html_attributes and body_attributes.
  157. $vars['html_attributes'] = drupal_attributes($vars['html_attributes_array']);
  158. $vars['rdf_attributes'] = drupal_attributes($vars['rdf_attributes_array']);
  159. $vars['body_attributes'] = drupal_attributes($vars['body_attributes_array']);
  160. }
  161. /**
  162. * Return a themed breadcrumb trail.
  163. *
  164. * @param $vars
  165. * - title: An optional string to be used as a navigational heading to give
  166. * context for breadcrumb links to screen-reader users.
  167. * - title_attributes_array: Array of HTML attributes for the title. It is
  168. * flattened into a string within the theme function.
  169. * - breadcrumb: An array containing the breadcrumb links.
  170. * @return
  171. * A string containing the breadcrumb output.
  172. *
  173. * Lifted from Zen, because John is the man.
  174. */
  175. function aurora_breadcrumb(&$vars) {
  176. return theme_breadcrumb($vars);
  177. }
  178. /**
  179. * Implements hook_process_html_tag
  180. *
  181. * - From http://sonspring.com/journal/html5-in-drupal-7#_pruning
  182. */
  183. function aurora_process_html_tag(&$vars) {
  184. if (theme_get_setting('aurora_html_tags')) {
  185. $el = &$vars['element'];
  186. // Remove type="..." and CDATA prefix/suffix.
  187. unset($el['#attributes']['type'], $el['#value_prefix'], $el['#value_suffix']);
  188. // Remove media="all" but leave others unaffected.
  189. if (isset($el['#attributes']['media']) && $el['#attributes']['media'] === 'all') {
  190. unset($el['#attributes']['media']);
  191. }
  192. }
  193. }
  194. //////////////////////////////
  195. // HTML5 Base Theme Forwardport
  196. //////////////////////////////
  197. /**
  198. * Implements the hook_preprocess_comment().
  199. *
  200. * Backports the following variable changes to Drupal 8:
  201. * - #1189816: Convert comment.tpl.php to HTML5.
  202. */
  203. function aurora_preprocess_comment(&$variables) {
  204. $variables['user_picture'] = theme_get_setting('toggle_comment_user_picture') ? theme('user_picture', array('account' => $variables['comment'])) : '';
  205. }
  206. /**
  207. * Implements hook_preprocess_user_profile_category().
  208. *
  209. * Backports the following changes to made Drupal 8:
  210. * - #1190218: Convert user-profile-category.tpl.php to HTML5.
  211. */
  212. function aurora_preprocess_user_profile_category(&$variables) {
  213. $variables['classes_array'][] = 'user-profile-category-' . drupal_html_class($variables['title']);
  214. }
  215. /**
  216. * Implements hook_css_alter().
  217. *
  218. * Backports the following CSS changes made to Drupal 8:
  219. * - #1216950: Clean up the CSS for Block module.
  220. * - #1216948: Clean up the CSS for Aggregator module.
  221. * - #1216972: Clean up the CSS for Color module.
  222. *
  223. */
  224. function aurora_css_alter(&$css) {
  225. // Path to the theme's CSS directory.
  226. $dir = drupal_get_path('theme', 'aurora') . '/css';
  227. // Swap out aggregator.css with the aggregator.theme.css provided by this
  228. // theme.
  229. $aggregator = drupal_get_path('module', 'aggregator');
  230. if (isset($css[$aggregator . '/aggregator.css'])) {
  231. $css[$aggregator . '/aggregator.css']['data'] = $dir . '/aggregator/aggregator.theme.css';
  232. }
  233. if (isset($css[$aggregator . '/aggregator-rtl.css'])) {
  234. $css[$aggregator . '/aggregator-rtl.css']['data'] = $dir . '/aggregator/aggregator.theme-rtl.css';
  235. }
  236. // Swap out block.css with the block.admin.css provided by this theme.
  237. $block = drupal_get_path('module', 'block');
  238. if (isset($css[$block . '/block.css'])) {
  239. $css[$block . '/block.css']['data'] = $dir . '/block/block.admin.css';
  240. }
  241. // Swap out color.css with the color.admin.css provided by this theme.
  242. $color = drupal_get_path('module', 'color');
  243. if (isset($css[$color . '/color.css'])) {
  244. $css[$color . '/color.css']['data'] = $dir . '/color/color.admin.css';
  245. }
  246. if (isset($css[$color . '/color-rtl.css'])) {
  247. $css[$color . '/color-rtl.css']['data'] = $dir . '/color/color.admin-rtl.css';
  248. }
  249. }
  250. /**
  251. * Implements hook_preprocess_node().
  252. *
  253. * Backports the following changes made to Drupal 8:
  254. * - #1077602: Convert node.tpl.php to HTML5.
  255. */
  256. function aurora_preprocess_node(&$variables) {
  257. // Add article ARIA role.
  258. $variables['attributes_array']['role'] = 'article';
  259. }
  260. function aurora_preprocess_panels_pane(&$vars) {
  261. $subtype = $vars['pane']->subtype;
  262. $layout = $vars['display']->layout;
  263. $vars['theme_hook_suggestions'][] = 'panels_pane__' . $layout;
  264. $vars['theme_hook_suggestions'][] = 'panels_pane__' . $subtype;
  265. $vars['theme_hook_suggestions'][] = 'panels_pane__' . $layout . '__' . $subtype;
  266. }
  267. function aurora_panels_default_style_render_region($vars) {
  268. $output = '';
  269. $output .= implode("\n", $vars['panes']);
  270. return $output;
  271. }
  272. //////////////////////////////
  273. // Blockify Theme Overrides
  274. //////////////////////////////
  275. // /**
  276. // * Implements theme_blockify_logo
  277. // */
  278. // function aurora_blockify_logo(&$vars) {
  279. // return '';
  280. // }
  281. function aurora_preprocess_block(&$vars) {
  282. // Logo Block
  283. if ($vars['block']->delta == 'blockify-logo') {
  284. $vars['theme_hook_suggestions'][] = 'block__logo';
  285. $site_name = filter_xss_admin(variable_get('site_name', 'Drupal'));
  286. // Strip the base_path from the beginning of the logo path.
  287. $path = preg_replace('|^' . base_path() . '|', '', theme_get_setting('logo'));
  288. $image = array(
  289. '#theme' => 'image',
  290. '#path' => $path,
  291. '#alt' => t('!site_name Logo', array(
  292. '!site_name' => $site_name,
  293. ))
  294. );
  295. $vars['logo'] = $image;
  296. $vars['sitename'] = $site_name;
  297. }
  298. // Site Name Block
  299. else if ($vars['block']->delta == 'blockify-site-name') {
  300. $vars['theme_hook_suggestions'][] = 'block__site_name';
  301. $site_name = filter_xss_admin(variable_get('site_name', 'Drupal'));
  302. $vars['sitename'] = $site_name;
  303. }
  304. // Site Slogan Block
  305. else if ($vars['block']->delta == 'blockify-site-slogan') {
  306. $vars['theme_hook_suggestions'][] = 'block__site_slogan';
  307. $slogan = filter_xss_admin(variable_get('site_slogan', 'Drupal'));
  308. $vars['slogan'] = $slogan;
  309. }
  310. // Page Title
  311. else if ($vars['block']->delta == 'blockify-page-title') {
  312. $vars['theme_hook_suggestions'][] = 'block__page_title';
  313. $vars['title'] = drupal_get_title();
  314. }
  315. else if ($vars['block']->delta == 'blockify-messages') {
  316. $vars['theme_hook_suggestions'][] = 'block__messages';
  317. }
  318. // Breadcrumbs
  319. else if ($vars['block']->delta == 'blockify-breadcrumb') {
  320. $vars['theme_hook_suggestions'][] = 'block__breadcrumbs';
  321. $breadcrumbs = drupal_get_breadcrumb();
  322. $vars['breadcrumbs'] = theme('breadcrumb', array('breadcrumb' => $breadcrumbs));
  323. }
  324. // Tabs
  325. else if ($vars['block']->delta == 'blockify-tabs') {
  326. $vars['theme_hook_suggestions'][] = 'block__tabs';
  327. $primary = menu_primary_local_tasks();
  328. $secondary = menu_secondary_local_tasks();
  329. $tabs = array(
  330. 'primary' => $primary,
  331. 'secondary' => $secondary,
  332. );
  333. $tabs = theme('menu_local_tasks', $tabs);
  334. $vars['tabs'] = $tabs;
  335. }
  336. // Actions
  337. else if ($vars['block']->delta == 'blockify-actions') {
  338. $vars['theme_hook_suggestions'][] = 'block__actions';
  339. $actions = menu_local_actions();
  340. $vars['actions'] = $actions;
  341. }
  342. // Feed Icons
  343. else if ($vars['block']->delta == 'blockify-feed-icons') {
  344. $vars['theme_hook_suggestions'][] = 'block__feed_icons';
  345. $icons = drupal_get_feeds();
  346. $vars['icons'] = $icons;
  347. }
  348. }