Ticket #1810: 1810.2.diff
| File 1810.2.diff, 3.6 KB (added by davidhouse, 6 years ago) |
|---|
-
wp-admin/edit-comments.php
121 121 | <a href="<?php echo get_permalink($comment->comment_post_ID); ?>"><?php _e('View Post') ?></a></p> 122 122 </li> 123 123 124 <?php } // end foreach ?>124 <?php } // end foreach($comment) ?> 125 125 </ol> 126 126 127 127 <div id="ajax-response"></div> 128 128 129 129 <?php 130 } else { 130 } else { //no comments to show 131 131 132 132 ?> 133 133 <p> … … 150 150 </tr>'; 151 151 foreach ($comments as $comment) { 152 152 $authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID")); 153 $comment_status = wp_get_comment_status($comment->comment_ID); 153 154 $class = ('alternate' == $class) ? '' : 'alternate'; 155 $class .= ('unapproved' == $comment_status) ? ' unapproved' : ''; 154 156 ?> 155 <tr class='<?php echo $class; ?>'>157 <tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $class; ?>'> 156 158 <td><?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> 157 159 <td><?php comment_author_link() ?></td> 158 160 <td><?php comment_author_email_link() ?></td> 159 161 <td><a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></td> 160 162 <td><?php comment_excerpt(); ?></td> 161 <td><a href="<?php echo get_permalink($comment->comment_post_ID); ?>#comment-<?php comment_ID() ?>" class="edit"><?php _e('View') ?></a></td> 163 <td> 164 <?php if ('unapproved' == $comment_status) { ?> 165 (Unapproved) 166 <?php } else { ?> 167 <a href="<?php echo get_permalink($comment->comment_post_ID); ?>#comment-<?php comment_ID() ?>" class="edit"><?php _e('View') ?></a> 168 <?php } ?> 169 </td> 162 170 <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 163 171 echo "<a href='comment.php?action=editcomment&comment=$comment->comment_ID' class='edit'>" . __('Edit') . "</a>"; } ?></td> 164 172 <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 165 echo "<a href=\"comment.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), $comment->comment_author) . "')\" class='delete'>" . __('Delete') . "</a>"; } ?></td> 173 echo "<a href=\"comment.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), wp_specialchars( $comment->comment_author, 1 )) . "' );\" class='edit'>" . __('Delete') . "</a> "; 174 } ?></td> 166 175 </tr> 167 176 <?php 168 177 } // end foreach … … 171 180 <p class="submit"><input type="submit" name="delete_button" 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.") ?>')" /> 172 181 <input type="submit" name="spam_button" value="<?php _e('Mark Checked Comments as Spam »') ?>" onclick="return confirm('<?php _e("You are about to mark these comments as spam \\n \'Cancel\' to stop, \'OK\' to mark as spam.") ?>')" /></p> 173 182 </form> 183 <div id="ajax-response"></div> 174 184 <?php 175 185 } else { 176 186 ?>
