root / drupal7 / sites / all / themes / bootstrap / template.php @ 87dbc3bf
1 | 87dbc3bf | Benjamin Luce | <?php
|
---|---|---|---|
2 | /**
|
||
3 | * @file
|
||
4 | * template.php
|
||
5 | *
|
||
6 | * This file should only contain light helper functions and stubs pointing to
|
||
7 | * other files containing more complex functions.
|
||
8 | *
|
||
9 | * The stubs should point to files within the `theme` folder named after the
|
||
10 | * function itself minus the theme prefix. If the stub contains a group of
|
||
11 | * functions, then please organize them so they are related in some way and name
|
||
12 | * the file appropriately to at least hint at what it contains.
|
||
13 | *
|
||
14 | * All [pre]process functions, theme functions and template implementations also
|
||
15 | * live in the 'theme' folder. This is a highly automated and complex system
|
||
16 | * designed to only load the necessary files when a given theme hook is invoked.
|
||
17 | * @see _bootstrap_theme()
|
||
18 | * @see theme/registry.inc
|
||
19 | *
|
||
20 | * Due to a bug in Drush, these includes must live inside the 'theme' folder
|
||
21 | * instead of something like 'includes'. If a module or theme has an 'includes'
|
||
22 | * folder, Drush will think it is trying to bootstrap core when it is invoked
|
||
23 | * from inside the particular extension's directory.
|
||
24 | * @see https://drupal.org/node/2102287
|
||
25 | */
|
||
26 | |||
27 | /**
|
||
28 | * Include common functions used through out theme.
|
||
29 | */
|
||
30 | include_once dirname(__FILE__) . '/theme/common.inc'; |
||
31 | |||
32 | /**
|
||
33 | * Implements hook_theme().
|
||
34 | *
|
||
35 | * Register theme hook implementations.
|
||
36 | *
|
||
37 | * The implementations declared by this hook have two purposes: either they
|
||
38 | * specify how a particular render array is to be rendered as HTML (this is
|
||
39 | * usually the case if the theme function is assigned to the render array's
|
||
40 | * #theme property), or they return the HTML that should be returned by an
|
||
41 | * invocation of theme().
|
||
42 | *
|
||
43 | * @see _bootstrap_theme()
|
||
44 | */
|
||
45 | function bootstrap_theme(&$existing, $type, $theme, $path) { |
||
46 | bootstrap_include($theme, 'theme/registry.inc'); |
||
47 | return _bootstrap_theme($existing, $type, $theme, $path); |
||
48 | } |
||
49 | |||
50 | /**
|
||
51 | * Declare various hook_*_alter() hooks.
|
||
52 | *
|
||
53 | * hook_*_alter() implementations must live (via include) inside this file so
|
||
54 | * they are properly detected when drupal_alter() is invoked.
|
||
55 | */
|
||
56 | bootstrap_include('bootstrap', 'theme/alter.inc'); |