Changes from branches/2.7/wp-admin/edit-comments.php at r10439 to trunk/wp-admin/edit-comments.php at r10162
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-comments.php
r10439 r10162 19 19 20 20 $delete_time = $wpdb->escape( $_REQUEST['pagegen_timestamp'] ); 21 if ( current_user_can('moderate_comments')) { 22 $deleted_spam = $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam' AND '$delete_time' > comment_date_gmt" ); 23 } else { 24 $deleted_spam = 0; 25 } 21 $deleted_spam = $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam' AND '$delete_time' > comment_date_gmt" ); 22 26 23 $redirect_to = 'edit-comments.php?comment_status=spam&deleted=' . (int) $deleted_spam; 27 24 if ( $post_id ) … … 276 273 277 274 if ( 'spam' == $comment_status ) { 278 wp_nonce_field('bulk-spam-delete', '_spam_nonce'); 279 if ( current_user_can ('moderate_comments')) { ?> 280 <input type="submit" name="delete_all_spam" value="<?php _e('Delete All Spam'); ?>" class="button-secondary apply" /> 281 <?php } 282 } ?> 275 wp_nonce_field('bulk-spam-delete', '_spam_nonce'); ?> 276 <input type="submit" name="delete_all_spam" value="<?php _e('Delete All Spam'); ?>" class="button-secondary apply" /> 277 <?php } ?> 283 278 <?php do_action('manage_comments_nav', $comment_status); ?> 284 279 </div> … … 330 325 <option value="unapprove"><?php _e('Unapprove'); ?></option> 331 326 <?php endif; ?> 332 <?php if ( empty($comment_status) || 'moderated' == $comment_status || 'spam' == $comment_status): ?>327 <?php if ( empty($comment_status) || 'moderated' == $comment_status ): ?> 333 328 <option value="approve"><?php _e('Approve'); ?></option> 334 329 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.