From 002c8b13aa24687189f586315b3f77790f49f564 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?B=C3=B8rge=20Warvik?= <bowarv@gmail.com>
Date: Wed, 5 Jun 2013 15:25:41 +0200
Subject: [PATCH] Removing hook_theme_registry() and theme_comment_wrapper()
 implementation and implemented
 template_preprocess_comment_wrapper() as  replacement.

---
 support.module | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/support.module b/support.module
index 48917d8..6374386 100644
--- a/support.module
+++ b/support.module
@@ -291,24 +291,14 @@ function support_theme() {
 }
 
 /**
- * Implementation of hook_theme_registry_alter().
- */
-function support_theme_registry_alter(&$theme_registry) {
-  if (!empty($theme_registry['comment_wrapper'])) {
-    $theme_registry['comment_wrapper']['function'] = 'support_comment_wrapper';
-  }
-}
-
-/**
- * Implementation of theme_content_wrapper().
+ * Implementation of template_preprocess_comment_wrapper().
  *
  * Remove 'post new comment' heading from support tickets.
  */
-function support_comment_wrapper($content, $node) {
-  if ($node->type == 'support_ticket' && variable_get('support_disable_post_comment', FALSE)) {
-    $content = str_replace(t('Post new comment'), '', $content);
+function support_preprocess_comment_wrapper($variables) {
+  if ($variables['node']->type == 'support_ticket' && variable_get('support_disable_post_comment', FALSE)) {
+    $variables['content'] = str_replace(t('Post new comment'), '', $variables['content']);
   }
-  return $content;
 }
 
 /**
-- 
1.7.12.4 (Apple Git-37)

