summaryrefslogtreecommitdiffstats
path: root/wp-admin/edit-comments.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin/edit-comments.php')
-rw-r--r--wp-admin/edit-comments.php24
1 files changed, 9 insertions, 15 deletions
diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php
index c761e8c..ab1bdbc 100644
--- a/wp-admin/edit-comments.php
+++ b/wp-admin/edit-comments.php
@@ -102,27 +102,24 @@ if ('view' == $mode) {
$offset = $offset + 1;
$start = " start='$offset'";
- echo "<ol id='the-comment-list' class='list:comment commentlist' $start>\n";
+ echo "<ol id='the-comment-list' class='commentlist' $start>\n";
$i = 0;
foreach ( $comments as $comment ) {
+ get_comment( $comment ); // Cache it
_wp_comment_list_item( $comment->comment_ID, ++$i );
}
echo "</ol>\n\n";
if ( $extra_comments ) : ?>
<div id="extra-comments" style="display:none">
-<ol id="the-extra-comment-list" class="list:comment commentlist" style="color:red">
+<ul id="the-extra-comment-list" class="commentlist">
<?php
foreach ( $extra_comments as $comment ) {
get_comment( $comment ); // Cache it
- _wp_comment_list_item( $comment->comment_ID, 0 );
+ _wp_comment_list_item( $comment->comment_ID, ++$i );
}
?>
-</ol>
-<form action="" method="get" id="get-extra-comments" class="add:the-extra-comment-list:">
-<input type="hidden" name="page" value="<?php echo $page; ?>" />
-<input type="hidden" name="s" value="<?php echo attribute_escape(@$_GET['s']); ?>" />
-<?php wp_nonce_field( 'add-comment', '_ajax_nonce', false ); ?>
+</ul>
</div>
<?php endif; // $extra_comments ?>
@@ -152,8 +149,7 @@ if ( $extra_comments ) : ?>
<th scope="col">' . __('Comment Excerpt') . '</th>
<th scope="col" colspan="3" style="text-align: center">' . __('Actions') . '</th>
</tr>
-</thead>
-<tbody id="the-comment-list" class="list:comment">';
+</thead>';
foreach ($comments as $comment) {
$post = get_post($comment->comment_post_ID);
$authordata = get_userdata($post->post_author);
@@ -163,7 +159,7 @@ if ( $extra_comments ) : ?>
?>
<tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $class; ?>'>
<td style="text-align: center"><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /><?php } ?></td>
- <td class="comment-author"><?php comment_author_link() ?></td>
+ <td><?php comment_author_link() ?></td>
<td><?php comment_author_email_link() ?></td>
<td><a href="edit-comments.php?s=<?php comment_author_IP() ?>&amp;mode=edit"><?php comment_author_IP() ?></a></td>
<td><?php comment_excerpt(); ?></td>
@@ -177,14 +173,12 @@ if ( $extra_comments ) : ?>
<td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
echo "<a href='comment.php?action=editcomment&amp;c=$comment->comment_ID' class='edit'>" . __('Edit') . "</a>"; } ?></td>
<td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
- $url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) );
- echo "<a href='$url' class='delete:the-comment-list:comment-$comment->comment_ID delete'>" . __('Delete') . "</a> ";
+ echo "<a href=\"comment.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;c=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to delete this comment by '%s'. \n 'Cancel' to stop, 'OK' to delete."), $comment->comment_author )) . "', theCommentList );\" class='delete'>" . __('Delete') . "</a> ";
} ?></td>
</tr>
<?php
} // end foreach
- ?></tbody>
-</table>
+ ?></table>
<p class="submit"><input type="submit" name="delete_button" class="delete" value="<?php _e('Delete Checked Comments &raquo;') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php echo js_escape(__("Please select some comments to delete")); ?>'); return false } return confirm('<?php echo sprintf(js_escape(__("You are about to delete %s comments permanently \n 'Cancel' to stop, 'OK' to delete.")), "' + numchecked + '"); ?>')" />
<input type="submit" name="spam_button" value="<?php _e('Mark Checked Comments as Spam &raquo;') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php echo js_escape(__("Please select some comments to mark as spam")); ?>'); return false } return confirm('<?php echo sprintf(js_escape(__("You are about to mark %s comments as spam \n 'Cancel' to stop, 'OK' to mark as spam.")), "' + numchecked + '"); ?>')" /></p>
</form>