mirror of
https://github.com/tag1consulting/d7_to_d10_migration.git
synced 2024-11-25 15:43:25 +00:00
26 lines
572 B
Text
26 lines
572 B
Text
|
<?php
|
||
|
|
||
|
/**
|
||
|
* @file
|
||
|
* Handles integration of PHP templates with the Drupal theme system.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* Implements hook_init().
|
||
|
*/
|
||
|
function phptemplate_init($template) {
|
||
|
$file = dirname($template->filename) . '/template.php';
|
||
|
if (file_exists($file)) {
|
||
|
include_once DRUPAL_ROOT . '/' . $file;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Implements hook_theme().
|
||
|
*/
|
||
|
function phptemplate_theme($existing, $type, $theme, $path) {
|
||
|
$templates = drupal_find_theme_functions($existing, array($theme));
|
||
|
$templates += drupal_find_theme_templates($existing, '.tpl.php', $path);
|
||
|
return $templates;
|
||
|
}
|