Projet

Général

Profil

Paste
Télécharger (572 octets) Statistiques
| Branche: | Révision:

root / drupal7 / themes / engines / phptemplate / phptemplate.engine @ 76597ebf

1
<?php
2

    
3
/**
4
 * @file
5
 * Handles integration of PHP templates with the Drupal theme system.
6
 */
7

    
8
/**
9
 * Implements hook_init().
10
 */
11
function phptemplate_init($template) {
12
  $file = dirname($template->filename) . '/template.php';
13
  if (file_exists($file)) {
14
    include_once DRUPAL_ROOT . '/' . $file;
15
  }
16
}
17

    
18
/**
19
 * Implements hook_theme().
20
 */
21
function phptemplate_theme($existing, $type, $theme, $path) {
22
  $templates = drupal_find_theme_functions($existing, array($theme));
23
  $templates += drupal_find_theme_templates($existing, '.tpl.php', $path);
24
  return $templates;
25
}