blob: 4d638d18f20666d3bf1fda17302edc9791bab56c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<?php
// $Id$
/**
* @file
* Handles integration of templates written in pure php with the Drupal theme system.
*/
function phptemplate_init($template) {
$file = dirname($template->filename) .'/template.php';
if (file_exists($file)) {
include_once "./$file";
}
}
/**
* Implementation of hook_theme to tell Drupal what templates the engine
* and the current theme use. The $existing argument will contain hooks
* pre-defined by Drupal so that we can use that information if
* we need to.
*/
function phptemplate_theme($existing, $type, $theme, $path) {
$templates = drupal_find_theme_functions($existing, array('phptemplate', $theme));
$templates += drupal_find_theme_templates($existing, '.tpl.php', $path);
return $templates;
}
|