Projet

Général

Profil

Paste
Télécharger (2,25 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / bootstrap / template.php @ 7547bb19

1
<?php
2
/**
3
 * @file
4
 * The primary PHP file for the Drupal Bootstrap base theme.
5
 *
6
 * This file should only contain light helper functions and point to stubs in
7
 * other files containing more complex functions.
8
 *
9
 * The stubs should point to files within the `./includes` folder named after
10
 * the 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 files lives inside
15
 * the `./templates` 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
 *
18
 * Visit this project's official documentation site, http://drupal-bootstrap.org
19
 * or the markdown files inside the `./docs` folder.
20
 *
21
 * @see _bootstrap_theme()
22
 */
23

    
24
/**
25
 * Include common functions used through out theme.
26
 */
27
include_once dirname(__FILE__) . '/includes/common.inc';
28

    
29
/**
30
 * Include any deprecated functions.
31
 */
32
bootstrap_include('bootstrap', 'includes/deprecated.inc');
33

    
34
/**
35
 * Implements hook_theme().
36
 *
37
 * Register theme hook implementations.
38
 *
39
 * The implementations declared by this hook have two purposes: either they
40
 * specify how a particular render array is to be rendered as HTML (this is
41
 * usually the case if the theme function is assigned to the render array's
42
 * #theme property), or they return the HTML that should be returned by an
43
 * invocation of theme().
44
 *
45
 * @see _bootstrap_theme()
46
 */
47
function bootstrap_theme(&$existing, $type, $theme, $path) {
48
  bootstrap_include($theme, 'includes/registry.inc');
49
  return _bootstrap_theme($existing, $type, $theme, $path);
50
}
51

    
52
/**
53
 * Clear any previously set element_info() static cache.
54
 *
55
 * If element_info() was invoked before the theme was fully initialized, this
56
 * can cause the theme's alter hook to not be invoked.
57
 *
58
 * @see https://www.drupal.org/node/2351731
59
 */
60
drupal_static_reset('element_info');
61

    
62
/**
63
 * Declare various hook_*_alter() hooks.
64
 *
65
 * hook_*_alter() implementations must live (via include) inside this file so
66
 * they are properly detected when drupal_alter() is invoked.
67
 */
68
bootstrap_include('bootstrap', 'includes/alter.inc');