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.php

    r7057 r7082  
    185185    echo "<div class='tablenav-pages'>$page_links</div>";
    186186?>
    187 <br style="clear:both;" />
    188 </div>
    189 
    190 <?php
    191 
    192 if ( 1 == count($posts) && isset( $_GET['p'] ) ) {
     187<br class="clear" />
     188</div>
     189
     190<?php
     191
     192if ( 1 == count($posts) && isset( $_GET['p'] ) ) :
    193193
    194194    $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date");
    195     if ($comments) {
     195    if ( $comments ) :
    196196        // Make sure comments, post, and post_author are cached
    197197        update_comment_cache($comments);
     
    199199        $authordata = get_userdata($post->post_author);
    200200    ?>
    201 <h3 id="comments"><?php _e('Comments') ?></h3>
    202 <ol id="the-comment-list" class="list:comment commentlist">
    203 <?php
    204         $i = 0;
    205         foreach ( $comments as $comment ) {
    206             _wp_comment_list_item( $comment->comment_ID, ++$i );
    207         }
    208     echo '</ol>';
    209     } // end if comments
    210 ?>
    211 <?php } ?>
     201
     202<br class="clear" />
     203
     204<table class="widefat" style="margin-top: .5em">
     205<thead>
     206  <tr>
     207    <th scope="col"><?php _e('Comment') ?></th>
     208    <th scope="col"><?php _e('Date') ?></th>
     209    <th scope="col"><?php _e('Actions') ?></th>
     210  </tr>
     211</thead>
     212<tbody id="the-comment-list" class="list:comment">
     213<?php
     214    foreach ($comments as $comment)
     215        _wp_comment_row( $comment->comment_ID, 'detail', false );
     216?>
     217</tbody>
     218</table>
     219
     220<?php
     221
     222endif; // comments
     223endif; // posts;
     224
     225?>
     226
    212227</div>
    213228
Note: See TracChangeset for help on using the changeset viewer.