Changeset 9807 for trunk/wp-admin/upload.php
- Timestamp:
- 11/20/2008 04:51:47 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upload.php
r9746 r9807 135 135 } else { 136 136 list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); 137 }138 139 if ( is_singular() ) {140 wp_enqueue_script( 'admin-comments' );141 enqueue_comment_hotkeys_js();142 137 } 143 138 … … 410 405 <br class="clear" /> 411 406 412 <?php413 414 if ( 1 == count($posts) && is_singular() ) :415 416 $comments = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved != 'spam' ORDER BY comment_date", $id) );417 if ( $comments ) :418 // Make sure comments, post, and post_author are cached419 update_comment_cache($comments);420 $post = get_post($id);421 $authordata = get_userdata($post->post_author);422 ?>423 424 <br class="clear" />425 426 <table class="widefat" cellspacing="0">427 <thead>428 <tr>429 <th scope="col" class="column-comment"><?php _e('Comment') ?></th>430 <th scope="col" class="column-author"><?php _e('Author') ?></th>431 <th scope="col" class="column-date"><?php _e('Submitted') ?></th>432 </tr>433 </thead>434 <tbody id="the-comment-list" class="list:comment">435 <?php436 foreach ($comments as $comment)437 _wp_comment_row( $comment->comment_ID, 'single', false, false );438 ?>439 </tbody>440 </table>441 442 <?php443 wp_comment_reply();444 endif; // comments445 endif; // posts;446 447 ?>448 449 407 </div> 450 408
Note: See TracChangeset
for help on using the changeset viewer.