Commit b4cc0cc5 authored by alexpott's avatar alexpott

Issue #1033116 by eojthebrave, c4rl, brianV, tim.plunkett | webchick: Rename...

Issue #1033116 by eojthebrave, c4rl, brianV, tim.plunkett | webchick: Rename template.php to THEMENAME.theme to elimnate ambiguity around 'the template file' vs. 'template files'.
parent e45b1a76
......@@ -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 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>
......
......@@ -197,7 +197,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);
......
......@@ -3053,20 +3053,12 @@ function _system_rebuild_theme_data() {
if (!empty($themes[$key]->info['base theme'])) {
$sub_themes[] = $key;
}
if ($themes[$key]->info['engine'] == 'theme') {
$filename = dirname($themes[$key]->uri) . '/' . $themes[$key]->name . '.theme';
if (file_exists($filename)) {
$themes[$key]->owner = $filename;
$themes[$key]->prefix = $key;
}
}
else {
$engine = $themes[$key]->info['engine'];
if (isset($engines[$engine])) {
$themes[$key]->owner = $engines[$engine]->uri;
$themes[$key]->prefix = $engines[$engine]->name;
$themes[$key]->template = TRUE;
}
$engine = $themes[$key]->info['engine'];
if (isset($engines[$engine])) {
$themes[$key]->owner = $engines[$engine]->uri;
$themes[$key]->prefix = $engines[$engine]->name;
$themes[$key]->template = TRUE;
}
// Prefix stylesheets and scripts with module path.
......
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment