Changeset 9807 for trunk/wp-admin/edit.php
- Timestamp:
- 11/20/2008 04:51:47 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/edit.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit.php
r9779 r9807 9 9 /** WordPress Administration Bootstrap */ 10 10 require_once('admin.php'); 11 12 // Back-compat for viewing comments of an entry 13 if ( $_redirect = intval( max( @$_GET['p'], @$_GET['attachment_id'], @$_GET['page_id'] ) ) ) { 14 wp_redirect( admin_url('edit-comments.php?p=' . $_redirect ) ); 15 exit; 16 } else { 17 unset( $_redirect ); 18 } 11 19 12 20 // Handle bulk actions … … 73 81 list($post_stati, $avail_post_stati) = wp_edit_posts_query(); 74 82 75 if ( 1 == count($posts) && is_singular() ) {76 wp_enqueue_script( 'admin-comments' );77 enqueue_comment_hotkeys_js();78 }79 80 83 require_once('admin-header.php'); 81 84 … … 269 272 270 273 <br class="clear" /> 271 272 <?php273 274 if ( 1 == count($posts) && is_singular() ) :275 276 $comments = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved != 'spam' ORDER BY comment_date", $id) );277 if ( $comments ) :278 // Make sure comments, post, and post_author are cached279 update_comment_cache($comments);280 $post = get_post($id);281 $authordata = get_userdata($post->post_author);282 ?>283 284 <br class="clear" />285 286 <table class="widefat fixed" cellspacing="0">287 <thead>288 <tr>289 <th scope="col" class="column-comment"><?php _e('Comment') ?></th>290 <th scope="col" class="column-author"><?php _e('Author') ?></th>291 <th scope="col" class="column-date"><?php _e('Submitted') ?></th>292 </tr>293 </thead>294 295 <tfoot>296 <tr>297 <th scope="col" class="column-comment"><?php _e('Comment') ?></th>298 <th scope="col" class="column-author"><?php _e('Author') ?></th>299 <th scope="col" class="column-date"><?php _e('Submitted') ?></th>300 </tr>301 </tfoot>302 303 <tbody id="the-comment-list" class="list:comment">304 <?php305 foreach ($comments as $comment)306 _wp_comment_row( $comment->comment_ID, 'single', false, false );307 ?>308 </tbody>309 </table>310 311 <?php312 wp_comment_reply();313 endif; // comments314 endif; // posts;315 316 ?>317 274 318 275 </div>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)