Make WordPress Core


Ignore:
Timestamp:
02/28/2008 06:50:25 AM (17 years ago)
Author:
ryan
Message:

Unify comment display. Props mdawaffe. fixes #6025

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-pages.php

    r7079 r7082  
    165165
    166166<?php
    167 if ( 1 == count($posts) && isset( $_GET['page_id'] ) ) {
     167
     168if ( 1 == count($posts) && isset( $_GET['page_id'] ) ) :
    168169
    169170    $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date");
    170     if ($comments) {
     171    if ( $comments ) :
    171172        // Make sure comments, post, and post_author are cached
    172173        update_comment_cache($comments);
     
    174175        $authordata = get_userdata($post->post_author);
    175176    ?>
    176 <h3 id="comments"><?php _e('Comments') ?></h3>
    177 <ol id="the-comment-list" class="list:comment commentlist">
    178 <?php
    179         $i = 0;
    180         foreach ( $comments as $comment ) {
    181             _wp_comment_list_item( $comment->comment_ID, ++$i );
    182         }
    183     echo '</ol>';
    184     } // end if comments
    185 ?>
    186 <?php } ?>
     177
     178<br class="clear" />
     179
     180<table class="widefat" style="margin-top: .5em">
     181<thead>
     182  <tr>
     183    <th scope="col"><?php _e('Comment') ?></th>
     184    <th scope="col"><?php _e('Date') ?></th>
     185    <th scope="col"><?php _e('Actions') ?></th>
     186  </tr>
     187</thead>
     188<tbody id="the-comment-list" class="list:comment">
     189<?php
     190    foreach ($comments as $comment)
     191        _wp_comment_row( $comment->comment_ID, 'detail', false );
     192?>
     193</tbody>
     194</table>
     195
     196<?php
     197
     198endif; // comments
     199endif; // posts;
     200
     201?>
    187202
    188203</div>
Note: See TracChangeset for help on using the changeset viewer.