Make WordPress Core


Ignore:
Timestamp:
08/20/2008 11:48:09 PM (17 years ago)
Author:
ryan
Message:

comment_class(). Props sandbox theme. see #7560

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/default/comments.php

    r7888 r8695  
    1515
    1616    /* This variable is for alternating comment background */
    17     $oddcomment = 'class="alt" ';
     17    $oddcomment = 'alt';
    1818?>
    1919
     
    2727    <?php foreach ($comments as $comment) : ?>
    2828
    29         <li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">
     29        <li <?php comment_class($oddcomment) ?>id="comment-<?php comment_ID() ?>">
    3030            <?php echo get_avatar( $comment, 32 ); ?>
    3131            <cite><?php comment_author_link() ?></cite> Says:
     
    4343    <?php
    4444        /* Changes every other comment to a different class */
    45         $oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : '';
     45        $oddcomment = ( empty( $oddcomment ) ) ? 'alt' : '';
    4646    ?>
    4747
Note: See TracChangeset for help on using the changeset viewer.