You are here

function vote_up_down_comment in Vote Up/Down 6

Same name and namespace in other branches
  1. 5 vote_up_down.module \vote_up_down_comment()

Implementation of hook_comment().

File

./vote_up_down.module, line 247

Code

function vote_up_down_comment(&$comment, $op) {
  switch ($op) {
    case 'view':
      if (variable_get('vote_up_down_widget_comment', 1)) {
        if (user_access('view up/down votes')) {
          $style = variable_get('vote_up_down_widget_style_comment', 0) == 1 ? '_alt' : '';
          $comment->comment = theme("vote_up_down_widget{$style}", $comment->cid, 'comment') . $comment->comment;
        }
      }
      break;
  }
}