summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.26/themes/engines/phptemplate/phptemplate.engine
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.26/themes/engines/phptemplate/phptemplate.engine')
-rw-r--r--kolab.org/www/drupal-7.26/themes/engines/phptemplate/phptemplate.engine25
1 files changed, 25 insertions, 0 deletions
diff --git a/kolab.org/www/drupal-7.26/themes/engines/phptemplate/phptemplate.engine b/kolab.org/www/drupal-7.26/themes/engines/phptemplate/phptemplate.engine
new file mode 100644
index 0000000..d293b85
--- /dev/null
+++ b/kolab.org/www/drupal-7.26/themes/engines/phptemplate/phptemplate.engine
@@ -0,0 +1,25 @@
+<?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;
+}