summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/comment/comment.module4
-rw-r--r--modules/user/user.pages.inc4
2 files changed, 8 insertions, 0 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 2c093fc47..b8e9a2a64 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -2120,6 +2120,10 @@ function template_preprocess_comment(&$variables) {
$variables['signature'] = $comment->signature;
$variables['title'] = l($comment->subject, 'comment/' . $comment->cid, array('fragment' => "comment-$comment->cid"));
$variables['permalink'] = l('#', 'comment/' . $comment->cid, array('fragment' => "comment-$comment->cid"));
+
+ // Preprocess fields.
+ field_attach_preprocess('comment', $comment, $variables['elements'], $variables);
+
$variables['template_files'][] = 'comment-' . $variables['node']->type;
// Helpful $content variable for templates.
diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc
index 949a9fcef..33fe8a48a 100644
--- a/modules/user/user.pages.inc
+++ b/modules/user/user.pages.inc
@@ -169,10 +169,14 @@ function user_logout() {
*/
function template_preprocess_user_profile(&$variables) {
$account = $variables['elements']['#account'];
+
// Helpful $user_profile variable for templates.
foreach (element_children($variables['elements']) as $key) {
$variables['user_profile'][$key] = $variables['elements'][$key];
}
+
+ // Preprocess fields.
+ field_attach_preprocess('user', $account, $variables['elements'], $variables);
}
/**