All pastes #793576 Raw Edit

Stuff

public text v1 · immutable
·published 2007-11-22 12:05 UTC
rendered paste body
@@ -580,8 +580,10 @@ function theme() {
   $info = $hooks[$hook];
   global $theme_path;
   $temp = $theme_path;
-  // point path_to_theme() to the currently used theme path:
-  $theme_path = $hooks[$hook]['theme path'];
+  // point path_to_theme() to the currently used theme path when not in preview mode:
+  if ($hook != 'node_preview') {
+    $theme_path = $hooks[$hook]['theme path'];
+  }
 
   // Include a file if the theme function or preprocess function is held elsewhere.
   if (!empty($info['file'])) {