root / drupal7 / sites / all / themes / bootstrap / template.php @ 5024cef7
1 | 87dbc3bf | Benjamin Luce | <?php
|
---|---|---|---|
2 | eefc2ac0 | Assos Assos | |
3 | 87dbc3bf | Benjamin Luce | /**
|
4 | * @file
|
||
5 | caf16a48 | Assos Assos | * The primary PHP file for the Drupal Bootstrap base theme.
|
6 | 87dbc3bf | Benjamin Luce | *
|
7 | caf16a48 | Assos Assos | * This file should only contain light helper functions and point to stubs in
|
8 | 87dbc3bf | Benjamin Luce | * other files containing more complex functions.
|
9 | *
|
||
10 | caf16a48 | Assos Assos | * 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 | 87dbc3bf | Benjamin Luce | * 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 | caf16a48 | Assos Assos | * All [pre]process functions, theme functions and template files lives inside
|
16 | * the `./templates` folder. This is a highly automated and complex system
|
||
17 | 87dbc3bf | Benjamin Luce | * designed to only load the necessary files when a given theme hook is invoked.
|
18 | *
|
||
19 | eefc2ac0 | Assos Assos | * Visit this project's official documentation site https://drupal-bootstrap.org
|
20 | caf16a48 | Assos Assos | * or the markdown files inside the `./docs` folder.
|
21 | *
|
||
22 | * @see _bootstrap_theme()
|
||
23 | 87dbc3bf | Benjamin Luce | */
|
24 | |||
25 | /**
|
||
26 | * Include common functions used through out theme.
|
||
27 | */
|
||
28 | caf16a48 | Assos Assos | include_once dirname(__FILE__) . '/includes/common.inc'; |
29 | |||
30 | /**
|
||
31 | * Include any deprecated functions.
|
||
32 | */
|
||
33 | bootstrap_include('bootstrap', 'includes/deprecated.inc'); |
||
34 | 87dbc3bf | Benjamin Luce | |
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 | caf16a48 | Assos Assos | bootstrap_include($theme, 'includes/registry.inc'); |
50 | 87dbc3bf | Benjamin Luce | return _bootstrap_theme($existing, $type, $theme, $path); |
51 | } |
||
52 | |||
53 | caf16a48 | Assos Assos | /**
|
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 | 87dbc3bf | Benjamin Luce | /**
|
64 | * Declare various hook_*_alter() hooks.
|
||
65 | *
|
||
66 | eefc2ac0 | Assos Assos | * All hook_*_alter() implementations must live (via include) inside this file
|
67 | * so they are properly detected when drupal_alter() is invoked.
|
||
68 | 87dbc3bf | Benjamin Luce | */
|
69 | caf16a48 | Assos Assos | bootstrap_include('bootstrap', 'includes/alter.inc'); |