diff options
Diffstat (limited to 'includes/theme.inc')
-rw-r--r-- | includes/theme.inc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index b77e35854..57989cc5b 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -624,7 +624,9 @@ function theme() { } if (isset($info['function'])) { // The theme call is a function. - $output = call_user_func_array($info['function'], $args); + if (drupal_function_exists($info['function'])) { + $output = call_user_func_array($info['function'], $args); + } } else { // The theme call is a template. @@ -2004,7 +2006,11 @@ function template_preprocess_node(&$variables) { } // Clean up name so there are no underscores. $variables['template_files'][] = 'node-' . str_replace('_', '-', $node->type); - $variables['template_files'][] = 'node-' . $node->nid; + $variables['template_files'][] = 'node-' . $node->nid;
+
+ // Add $FIELD_NAME_rendered variables for fields.
+ drupal_function_exists('field_attach_preprocess');
+ $variables += field_attach_preprocess('node', $node); } /** |