=== wp-admin/edit-comments.php
==================================================================
|
|
|
|
| 98 | 98 | <p><?php _e('Posted'); echo ' '; comment_date('M j, g:i A'); |
| 99 | 99 | if ( current_user_can('edit_post', $comment->comment_post_ID) ) { |
| 100 | 100 | echo " | <a href=\"post.php?action=editcomment&comment=".$comment->comment_ID."\">" . __('Edit Comment') . "</a>"; |
| 101 | | echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&p=' . $post->ID . '&comment=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . __("You are about to delete this comment.\\n"Cancel" to stop, "OK" to delete.") . "' );\">" . __('Delete Comment') . '</a> '; |
| | 101 | echo ' | <a href="' . wp_nonce_url('post.php?action=deletecomment&p=' . $post->ID . '&comment=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . __("You are about to delete this comment.\\n"Cancel" to stop, "OK" to delete.") . "' );\">" . __('Delete Comment') . '</a> '; |
| 102 | 102 | } // end if any comments to show |
| 103 | 103 | // Get post title |
| 104 | 104 | if ( current_user_can('edit_post', $comment->comment_post_ID) ) { |
| 105 | 105 | $post_title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID = $comment->comment_post_ID"); |
| 106 | 106 | $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title; |
| 107 | | ?> <a href="post.php?action=edit&post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Post “%s”'), stripslashes($post_title)); ?></a> |
| | 107 | ?> | <a href="post.php?action=edit&post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Post “%s”'), stripslashes($post_title)); ?></a> |
| 108 | 108 | <?php } ?> |
| 109 | 109 | | <a href="<?php echo get_permalink($comment->comment_post_ID); ?>"><?php _e('View Post') ?></a></p> |
| 110 | 110 | </li> |
| … |
… |
|
| 151 | 151 | <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { |
| 152 | 152 | echo "<a href='post.php?action=editcomment&comment=$comment->comment_ID' class='edit'>" . __('Edit') . "</a>"; } ?></td> |
| 153 | 153 | <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { |
| 154 | | echo "<a href=\"post.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('" . __("You are about to delete this comment\\n \'Cancel\' to stop, \'OK\' to delete.") . "')\" class='delete'>" . __('Delete') . "</a>"; } ?></td> |
| | 154 | echo "<a href=\"" . wp_nonce_url("post.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return confirm('" . __("You are about to delete this comment.\\n \'Cancel\' to stop, \'OK\' to delete.") . "')\" class='delete'>" . __('Delete') . "</a>"; } ?></td> |
| 155 | 155 | </tr> |
| 156 | 156 | <?php |
| 157 | 157 | } // end foreach |
| 158 | 158 | ?></table> |
| 159 | 159 | <p><a href="javascript:;" onclick="checkAll(document.getElementById('deletecomments')); return false; "><?php _e('Invert Checkbox Selection') ?></a></p> |
| 160 | | <p class="submit"><input type="submit" name="Submit" value="<?php _e('Delete Checked Comments') ?> »" onclick="return confirm('<?php _e("You are about to delete these comments permanently \\n \'Cancel\' to stop, \'OK\' to delete.") ?>')" /> </p> |
| | 160 | <p class="submit"><input type="submit" name="Submit" value="<?php _e('Delete Checked Comments') ?> »" onclick="return confirm('<?php _e("You are about to delete these comments permanently.\\n \'Cancel\' to stop, \'OK\' to delete.") ?>')" /> </p> |
| 161 | 161 | </form> |
| 162 | 162 | <?php |
| 163 | 163 | } else { |
=== wp-admin/list-manipulation.php
==================================================================
|
|
|
|
| 2 | 2 | require_once('../wp-config.php'); |
| 3 | 3 | require_once('admin-functions.php'); |
| 4 | 4 | require_once('admin-db.php'); |
| | 5 | header("Content-type: text/plain", true); |
| 5 | 6 | |
| 6 | 7 | if ( !is_user_logged_in() ) |
| 7 | 8 | die('-1'); |
=== wp-admin/moderation.php
==================================================================
|
|
|
|
| 151 | 151 | echo '<a href="post.php?action=editcomment&comment='.$comment->comment_ID.'">' . __('Edit') . '</a> | ';?> |
| 152 | 152 | <a href="<?php echo get_permalink($comment->comment_post_ID); ?>"><?php _e('View Post') ?></a> | |
| 153 | 153 | <?php |
| 154 | | echo " <a href=\"post.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . __("You are about to delete this comment.\\n"Cancel" to stop, "OK" to delete.") . "' );\">" . __('Delete just this comment') . "</a> | "; ?> <?php _e('Bulk action:') ?> |
| | 154 | echo " <a href=\"" . wp_nonce_url("post.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . __("You are about to delete this comment.\\n"Cancel" to stop, "OK" to delete.") . "' );\">" . __('Delete just this comment') . "</a> | "; ?> <?php _e('Bulk action:') ?> |
| 155 | 155 | <input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment[<?php echo $comment->comment_ID; ?>]-approve" value="approve" /> <label for="comment[<?php echo $comment->comment_ID; ?>]-approve"><?php _e('Approve') ?></label> |
| 156 | 156 | <input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment[<?php echo $comment->comment_ID; ?>]-spam" value="spam" /> <label for="comment[<?php echo $comment->comment_ID; ?>]-spam"><?php _e('Spam') ?></label> |
| 157 | 157 | <input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment[<?php echo $comment->comment_ID; ?>]-delete" value="delete" /> <label for="comment[<?php echo $comment->comment_ID; ?>]-delete"><?php _e('Delete') ?></label> |
=== wp-admin/post.php
==================================================================
|
|
|
|
| 203 | 203 | echo "<input type='hidden' name='p' value='$p' />\n"; |
| 204 | 204 | echo "<input type='hidden' name='comment' value='{$comment->comment_ID}' />\n"; |
| 205 | 205 | echo "<input type='hidden' name='noredir' value='1' />\n"; |
| | 206 | wp_nonce_field('delete-comment_' . $comment->comment_ID); |
| 206 | 207 | echo "<input type='submit' value='" . __('Yes') . "' />"; |
| 207 | 208 | echo " "; |
| 208 | 209 | echo "<input type='button' value='" . __('No') . "' onclick=\"self.location='". get_settings('siteurl') ."/wp-admin/edit.php?p=$p&c=1#comments';\" />\n"; |