Repoint and redirect edit.php?p=X to edit-comments.php?p=X

git-svn-id: https://develop.svn.wordpress.org/trunk@9807 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2008-11-20 04:51:47 +00:00
parent f6e1881137
commit 99c24ed34b
6 changed files with 21 additions and 102 deletions

View File

@@ -136,11 +136,6 @@ if ( isset($_GET['detached']) ) {
list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
}
if ( is_singular() ) {
wp_enqueue_script( 'admin-comments' );
enqueue_comment_hotkeys_js();
}
require_once('admin-header.php'); ?>
<?php
@@ -409,43 +404,6 @@ if ( $page_links )
</form>
<br class="clear" />
<?php
if ( 1 == count($posts) && is_singular() ) :
$comments = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved != 'spam' ORDER BY comment_date", $id) );
if ( $comments ) :
// Make sure comments, post, and post_author are cached
update_comment_cache($comments);
$post = get_post($id);
$authordata = get_userdata($post->post_author);
?>
<br class="clear" />
<table class="widefat" cellspacing="0">
<thead>
<tr>
<th scope="col" class="column-comment"><?php _e('Comment') ?></th>
<th scope="col" class="column-author"><?php _e('Author') ?></th>
<th scope="col" class="column-date"><?php _e('Submitted') ?></th>
</tr>
</thead>
<tbody id="the-comment-list" class="list:comment">
<?php
foreach ($comments as $comment)
_wp_comment_row( $comment->comment_ID, 'single', false, false );
?>
</tbody>
</table>
<?php
wp_comment_reply();
endif; // comments
endif; // posts;
?>
</div>
<script type="text/javascript">