From 349384ea5ae4456b50d0429b99f8cfe8d474b564 Mon Sep 17 00:00:00 2001
From: joe <eojthebrave@gmail.com>
Date: Tue, 19 Jul 2011 23:30:45 -0400
Subject: [PATCH] Rename template.php to .theme

---
 modules/php/php.module                             |    2 +-
 themes/bartik/{template.php => bartik.theme}       |    0
 themes/engines/phptemplate/phptemplate.engine      |    2 +-
 themes/garland/{template.php => garland.theme}     |    0
 themes/seven/{template.php => seven.theme}         |    0
 .../test_theme/{template.php => test_theme.theme}  |    0
 6 files changed, 2 insertions(+), 2 deletions(-)
 rename themes/bartik/{template.php => bartik.theme} (100%)
 rename themes/garland/{template.php => garland.theme} (100%)
 rename themes/seven/{template.php => seven.theme} (100%)
 rename themes/tests/test_theme/{template.php => test_theme.theme} (100%)

diff --git a/modules/php/php.module b/modules/php/php.module
index 37bf9a1..6a1b93e 100644
--- a/modules/php/php.module
+++ b/modules/php/php.module
@@ -97,7 +97,7 @@ function _php_filter_tips($filter, $format, $long = FALSE) {
     $output .= '<li>' . t('<code>register_globals</code> is <strong>turned off</strong>. If you need to use forms, understand and use the functions in <a href="@formapi">the Drupal Form API</a>.', array('@formapi' => url('http://api.drupal.org/api/group/form_api/7'))) . '</li>';
     $output .= '<li>' . t('Use a <code>print</code> or <code>return</code> statement in your code to output content.') . '</li>';
     $output .= '<li>' . t('Develop and test your PHP code using a separate test script and sample database before deploying on a production site.') . '</li>';
-    $output .= '<li>' . t('Consider including your custom PHP code within a site-specific module or <code>template.php</code> file rather than embedding it directly into a post or block.') . '</li>';
+    $output .= '<li>' . t('Consider including your custom PHP code within a site-specific module or <code>$THEME_NAME.theme</code> file rather than embedding it directly into a post or block.') . '</li>';
     $output .= '<li>' . t('Be aware that the ability to embed PHP code within content is provided by the PHP Filter module. If this module is disabled or deleted, then blocks and posts with embedded PHP may display, rather than execute, the PHP code.') . '</li></ul>';
     $output .= '<p>' . t('A basic example: <em>Creating a "Welcome" block that greets visitors with a simple message.</em>') . '</p>';
     $output .= '<ul><li>' . t('<p>Add a custom block to your site, named "Welcome" . With its text format set to "PHP code" (or another format supporting PHP input), add the following in the Block body:</p>
diff --git a/themes/bartik/template.php b/themes/bartik/bartik.theme
similarity index 100%
rename from themes/bartik/template.php
rename to themes/bartik/bartik.theme
diff --git a/themes/engines/phptemplate/phptemplate.engine b/themes/engines/phptemplate/phptemplate.engine
index d293b85..88c09c7 100644
--- a/themes/engines/phptemplate/phptemplate.engine
+++ b/themes/engines/phptemplate/phptemplate.engine
@@ -9,7 +9,7 @@
  * Implements hook_init().
  */
 function phptemplate_init($template) {
-  $file = dirname($template->filename) . '/template.php';
+  $file = dirname($template->filename) . '/' . $template->name . '.theme';
   if (file_exists($file)) {
     include_once DRUPAL_ROOT . '/' . $file;
   }
diff --git a/themes/garland/template.php b/themes/garland/garland.theme
similarity index 100%
rename from themes/garland/template.php
rename to themes/garland/garland.theme
diff --git a/themes/seven/template.php b/themes/seven/seven.theme
similarity index 100%
rename from themes/seven/template.php
rename to themes/seven/seven.theme
diff --git a/themes/tests/test_theme/template.php b/themes/tests/test_theme/test_theme.theme
similarity index 100%
rename from themes/tests/test_theme/template.php
rename to themes/tests/test_theme/test_theme.theme
-- 
1.7.3

