Changeset 9807
- Timestamp:
- 11/20/2008 04:51:47 AM (16 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/comment.php
r8697 r9807 184 184 wp_redirect( wp_get_referer() ); 185 185 else 186 wp_redirect( admin_url('edit .php?p=' . absint( $comment->comment_post_ID ) . '#comments') );186 wp_redirect( admin_url('edit-comments.php?p=' . absint( $comment->comment_post_ID ) . '#comments') ); 187 187 188 188 exit(); … … 209 209 wp_redirect( wp_get_referer() ); 210 210 else 211 wp_redirect( admin_url('edit .php?p=' . absint( $comment->comment_post_ID ) . '#comments') );211 wp_redirect( admin_url('edit-comments.php?p=' . absint( $comment->comment_post_ID ) . '#comments') ); 212 212 213 213 exit(); … … 223 223 edit_comment(); 224 224 225 $location = ( empty( $_POST['referredby'] ) ? "edit .php?p=$comment_post_id" : $_POST['referredby'] ) . '#comment-' . $comment_id;225 $location = ( empty( $_POST['referredby'] ) ? "edit-comments.php?p=$comment_post_id" : $_POST['referredby'] ) . '#comment-' . $comment_id; 226 226 $location = apply_filters( 'comment_edit_redirect', $location, $comment_id ); 227 227 wp_redirect( $location ); -
trunk/wp-admin/edit-attachment-rows.php
r9772 r9807 170 170 if ( $left ) 171 171 echo '<strong>'; 172 comments_number("<a href=' upload.php?attachment_id=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='upload.php?attachment_id=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='upload.php?attachment_id=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('%') . '</span></a>');172 comments_number("<a href='edit-comments.php?p=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='edit-comments.php?p=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='edit-comments.php?p=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('%') . '</span></a>'); 173 173 if ( $left ) 174 174 echo '</strong>'; -
trunk/wp-admin/edit-comments.php
r9799 r9807 10 10 require_once('admin.php'); 11 11 12 $title = __('Edit Comments');13 12 wp_enqueue_script('admin-comments'); 14 13 enqueue_comment_hotkeys_js(); … … 68 67 } 69 68 69 $post_id = isset($_GET['p']) ? (int) $_GET['p'] : 0; 70 71 if ( $post_id ) 72 $title = sprintf(__('Edit Comments on “%s”'), wp_html_excerpt(_draft_or_post_title($post_id), 50)); 73 else 74 $title = __('Edit Comments'); 75 70 76 require_once('admin-header.php'); 71 77 … … 75 81 76 82 $comment_type = !empty($_GET['comment_type']) ? attribute_escape($_GET['comment_type']) : ''; 77 78 $post_id = isset($_GET['p']) ? (int) $_GET['p'] : 0;79 83 80 84 $search_dirty = ( isset($_GET['s']) ) ? $_GET['s'] : ''; -
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> -
trunk/wp-admin/includes/template.php
r9788 r9807 1424 1424 if ( $pending_comments ) 1425 1425 echo '<strong>'; 1426 comments_number("<a href='edit .php?p=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='edit.php?p=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='edit.php?p=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('%') . '</span></a>');1426 comments_number("<a href='edit-comments.php?p=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='edit-comments.php?p=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='edit-comments.php?p=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('%') . '</span></a>'); 1427 1427 if ( $pending_comments ) 1428 1428 echo '</strong>'; … … 1575 1575 if ( $left ) 1576 1576 echo '<strong>'; 1577 comments_number("<a href='edit-comments.php?p age_id=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='edit-comments.php?page_id=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='edit-comments.php?page_id=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('%') . '</span></a>');1577 comments_number("<a href='edit-comments.php?p=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='edit-comments.php?p=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='edit-comments.php?p=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('%') . '</span></a>'); 1578 1578 if ( $left ) 1579 1579 echo '</strong>'; -
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.