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

git-svn-id: https://develop.svn.wordpress.org/trunk@4922 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-02-23 00:55:52 +00:00
parent 1162b64000
commit 983c92db53
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 */ ?>