Current implementation of alpha's alpha_get_theme() get's invoked prior to the inclusion of a sub-theme's /template.php.

This means that if a user wanted to override

class alpha_theme_container { // ...
} 

they would be unable to do so by simply including the class definition in their template.php, which is counter-intuitive, as alpha's own template.php simply does:

require_once dirname(__FILE__) . '/includes/base.inc';

Worse, because of caching, alpha never rechecks later once the subtheme(s)' template.php's have been loaded.

I plan to add a minor tweak to the function, making sure that the subtheme template.php's are incorporated prior to the test for class_exists.

Essentially i want to roll a patch that includes this code:

$template_php = DRUPAL_ROOT . '/' . drupal_get_path('theme', $item) . "/template.php";
if (file_exists($template_php)) {
  include_once $template_php;
}

I hope to roll the patch this weekend :)

CommentFileSizeAuthor
#1 include_subtheme_templates-1653120-1.patch794 bytesjefkin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jefkin’s picture

Let's see if this works.

jefkin’s picture

Issue summary: View changes

forgot the '/' to separate the DRUPAL_ROOT from the drupal_get_path() path.