You are here

function ajax_comments_preprocess_comment in AJAX Comments 7

Same name and namespace in other branches
  1. 8 ajax_comments.module \ajax_comments_preprocess_comment()
  2. 6 ajax_comments.module \ajax_comments_preprocess_comment()

Implements template_preprocess_comment() Wrap comments and their replies in a #comment-wrapper-(cid) div

File

./ajax_comments.module, line 534
AJAX comments module file.

Code

function ajax_comments_preprocess_comment(&$variables) {
  $element = $variables['elements'];
  $comment = $element['#comment'];
  if (ajax_comments_node_type_active(substr($comment->node_type, strlen('comment_node_')))) {
    $variables['classes_array'][] = 'ajax-comment-wrapper';
    $variables['classes_array'][] = 'comment-wrapper-' . $comment->cid;
  }
}