我只是想分享我用来获取Drupal 5.2中当前主题名称的步骤。我从theme.inc。
中的theme_get_function()中获取了一段代码global $theme, $theme_engine;
// Because theme() is called a lot, calling init_theme() only to have it
// smartly return is a noticeable performance hit. Don't do it.
if (!isset($theme)) {
init_theme();
}
var_dump($theme);
也许有人可能像我一样需要这个提示。
谢谢!