diff --git a/core/modules/php/php.module b/core/modules/php/php.module
index 8e885e4..c6b9bef 100644
--- a/core/modules/php/php.module
+++ b/core/modules/php/php.module
@@ -105,7 +105,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/8'))) . '</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 theme rather than embedding it directly into a node 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/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php
index a77218b..925f785 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php
@@ -195,7 +195,7 @@ function testBreadCrumbs() {
     // Do this separately for Main menu and Tools menu, since only the
     // latter is a preferred menu by default.
     // @todo Also test all themes? Manually testing led to the suspicion that
-    //   breadcrumbs may differ, possibly due to template.php overrides.
+    //   breadcrumbs may differ, possibly due to theme overrides.
     $menus = array('main', 'tools');
     // Alter node type menu settings.
     variable_set("menu_options_$type", $menus);
diff --git a/core/modules/system/tests/themes/test_theme/template.php b/core/modules/system/tests/themes/test_theme/test_theme.theme
similarity index 100%
rename from core/modules/system/tests/themes/test_theme/template.php
rename to core/modules/system/tests/themes/test_theme/test_theme.theme
diff --git a/core/themes/bartik/template.php b/core/themes/bartik/bartik.theme
similarity index 100%
rename from core/themes/bartik/template.php
rename to core/themes/bartik/bartik.theme
diff --git a/core/themes/engines/phptemplate/phptemplate.engine b/core/themes/engines/phptemplate/phptemplate.engine
index d293b85..88c09c7 100644
--- a/core/themes/engines/phptemplate/phptemplate.engine
+++ b/core/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/core/themes/engines/twig/twig.engine b/core/themes/engines/twig/twig.engine
index e7de4cf..be89e7e 100644
--- a/core/themes/engines/twig/twig.engine
+++ b/core/themes/engines/twig/twig.engine
@@ -24,7 +24,7 @@ function twig_extension() {
  * Implements hook_init().
  */
 function twig_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/core/themes/seven/template.php b/core/themes/seven/seven.theme
similarity index 100%
rename from core/themes/seven/template.php
rename to core/themes/seven/seven.theme
