forked from govCMS/govstrap
/
template.php
53 lines (44 loc) · 1.31 KB
/
template.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* @file
* template.php
*/
// Auto-rebuild the theme registry during theme development.
if (theme_get_setting('govstrap_rebuild_registry') && !defined('MAINTENANCE_MODE')) {
// Rebuild .info data.
system_rebuild_theme_data();
// Rebuild theme registry.
drupal_theme_rebuild();
}
/**
* Implements HOOK_theme().
*/
function govstrap_theme(&$existing, $type, $theme, $path) {
include_once './' . drupal_get_path('theme', 'govstrap') . '/includes/registry.inc';
return _govstrap_theme($existing, $type, $theme, $path);
}
/**
* Clear any previously set element_info() static cache.
*
* If element_info() was invoked before the theme was fully initialized, this
* can cause the theme's alter hook to not be invoked.
*
* @see https://www.drupal.org/node/2351731
*/
drupal_static_reset('element_info');
/**
* Include hook_preprocess_*() hooks.
*/
include_once './' . drupal_get_path('theme', 'govstrap') . '/includes/preprocess.inc';
/**
* Include hook_process_*() hooks.
*/
include_once './' . drupal_get_path('theme', 'govstrap') . '/includes/process.inc';
/**
* Include hook_*_alter() hooks.
*/
include_once './' . drupal_get_path('theme', 'govstrap') . '/includes/alter.inc';
/**
* Include normal theme overwrite.
*/
include_once './' . drupal_get_path('theme', 'govstrap') . '/includes/theme.inc';