Don't emit empty class. Props rob1n. fixes #3787

git-svn-id: http://svn.automattic.com/wordpress/trunk@4922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-02-23 00:55:52 +00:00
parent beb4deb90c
commit 0b5ea4a956
1 changed files with 5 additions and 5 deletions

View File

@ -14,7 +14,7 @@
}
/* This variable is for alternating comment background */
$oddcomment = 'alt';
$oddcomment = 'class="alt" ';
?>
<!-- You can start editing here. -->
@ -26,7 +26,7 @@
<?php foreach ($comments as $comment) : ?>
<li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>">
<li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">
<cite><?php comment_author_link() ?></cite> Says:
<?php if ($comment->comment_approved == '0') : ?>
<em>Your comment is awaiting moderation.</em>
@ -39,9 +39,9 @@
</li>
<?php /* Changes every other comment to a different class */
if ('alt' == $oddcomment) $oddcomment = '';
else $oddcomment = 'alt';
<?php
/* Changes every other comment to a different class */
$oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : '';
?>
<?php endforeach; /* end for each comment */ ?>