WordPress.org

Make WordPress Core

Ticket #3787: 3787.diff

File 3787.diff, 1.1 KB (added by rob1n, 7 years ago)
  • wp-content/themes/default/comments.php

     
    1414        } 
    1515 
    1616        /* This variable is for alternating comment background */ 
    17         $oddcomment = 'alt'; 
     17        $oddcomment = 'class="alt" '; 
    1818?> 
    1919 
    2020<!-- You can start editing here. --> 
     
    2626 
    2727        <?php foreach ($comments as $comment) : ?> 
    2828 
    29                 <li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>"> 
     29                <li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>"> 
    3030                        <cite><?php comment_author_link() ?></cite> Says: 
    3131                        <?php if ($comment->comment_approved == '0') : ?> 
    3232                        <em>Your comment is awaiting moderation.</em> 
     
    4040                </li> 
    4141 
    4242        <?php /* Changes every other comment to a different class */ 
    43                 if ('alt' == $oddcomment) $oddcomment = ''; 
    44                 else $oddcomment = 'alt'; 
     43                if ('class="alt" ' == $oddcomment) $oddcomment = ''; 
     44                else $oddcomment = 'class="alt" '; 
    4545        ?> 
    4646 
    4747        <?php endforeach; /* end for each comment */ ?>