root / drupal7 / sites / all / themes / bootstrap / template.php @ b6b9edaa
1 |
<?php
|
---|---|
2 |
|
3 |
/**
|
4 |
* @file
|
5 |
* The primary PHP file for the Drupal Bootstrap base theme.
|
6 |
*
|
7 |
* This file should only contain light helper functions and point to stubs in
|
8 |
* other files containing more complex functions.
|
9 |
*
|
10 |
* The stubs should point to files within the `./includes` folder named after
|
11 |
* the function itself minus the theme prefix. If the stub contains a group of
|
12 |
* functions, then please organize them so they are related in some way and name
|
13 |
* the file appropriately to at least hint at what it contains.
|
14 |
*
|
15 |
* All [pre]process functions, theme functions and template files lives inside
|
16 |
* the `./templates` folder. This is a highly automated and complex system
|
17 |
* designed to only load the necessary files when a given theme hook is invoked.
|
18 |
*
|
19 |
* Visit this project's official documentation site https://drupal-bootstrap.org
|
20 |
* or the markdown files inside the `./docs` folder.
|
21 |
*
|
22 |
* @see _bootstrap_theme()
|
23 |
*/
|
24 |
|
25 |
/**
|
26 |
* Include common functions used through out theme.
|
27 |
*/
|
28 |
include_once dirname(__FILE__) . '/includes/common.inc'; |
29 |
|
30 |
/**
|
31 |
* Include any deprecated functions.
|
32 |
*/
|
33 |
bootstrap_include('bootstrap', 'includes/deprecated.inc'); |
34 |
|
35 |
/**
|
36 |
* Implements hook_theme().
|
37 |
*
|
38 |
* Register theme hook implementations.
|
39 |
*
|
40 |
* The implementations declared by this hook have two purposes: either they
|
41 |
* specify how a particular render array is to be rendered as HTML (this is
|
42 |
* usually the case if the theme function is assigned to the render array's
|
43 |
* #theme property), or they return the HTML that should be returned by an
|
44 |
* invocation of theme().
|
45 |
*
|
46 |
* @see _bootstrap_theme()
|
47 |
*/
|
48 |
function bootstrap_theme(&$existing, $type, $theme, $path) { |
49 |
bootstrap_include($theme, 'includes/registry.inc'); |
50 |
return _bootstrap_theme($existing, $type, $theme, $path); |
51 |
} |
52 |
|
53 |
/**
|
54 |
* Clear any previously set element_info() static cache.
|
55 |
*
|
56 |
* If element_info() was invoked before the theme was fully initialized, this
|
57 |
* can cause the theme's alter hook to not be invoked.
|
58 |
*
|
59 |
* @see https://www.drupal.org/node/2351731
|
60 |
*/
|
61 |
drupal_static_reset('element_info');
|
62 |
|
63 |
/**
|
64 |
* Declare various hook_*_alter() hooks.
|
65 |
*
|
66 |
* All hook_*_alter() implementations must live (via include) inside this file
|
67 |
* so they are properly detected when drupal_alter() is invoked.
|
68 |
*/
|
69 |
bootstrap_include('bootstrap', 'includes/alter.inc'); |