WordPress.org

Make WordPress Core

Ticket #4529: delete-comment.11.diff

File delete-comment.11.diff, 5.4 KB (added by caesarsgrunt, 6 years ago)

Terminology changes

  • wp-admin/edit-comments.php

     
    250250<?php if ( 'all' == $comment_status || 'approved' == $comment_status ): ?> 
    251251<option value="unapprove"><?php _e('Unapprove'); ?></option> 
    252252<?php endif; ?> 
    253 <?php if ( 'approved' != $comment_status ): ?> 
     253<?php if ( 'all' == $comment_status || 'moderated' == $comment_status || 'spam' == $comment_status ): ?> 
    254254<option value="approve"><?php _e('Approve'); ?></option> 
    255255<?php endif; ?> 
    256 <?php if ( 'spam' != $comment_status ): ?> 
     256<?php if ( 'all' == $comment_status || 'approved' == $comment_status || 'moderated' == $comment_status ): ?> 
    257257<option value="markspam"><?php _e('Mark as Spam'); ?></option> 
    258258<?php endif; ?> 
     259<?php if ( 'deleted' == $comment_status ): ?> 
     260<option value="unapprove"><?php _e('Return to Pending'); ?></option> 
     261<?php endif; ?> 
    259262<?php if ( 'deleted' == $comment_status || 'spam' == $comment_status ): ?> 
    260263<option value="destroy"><?php _e('Delete Permanently'); ?></option> 
    261264<?php else: ?> 
    262 <option value="delete"><?php _e('Delete'); ?></option> 
     265<option value="delete"><?php _e('Move to Trash'); ?></option> 
    263266<?php endif; ?> 
    264267</select> 
    265268<input type="submit" name="doaction" id="doaction" value="<?php esc_attr_e('Apply'); ?>" class="button-secondary apply" /> 
     
    286289        <input type="hidden" name="apage" value="<?php echo esc_attr( absint( $_GET['apage'] ) ); ?>" /> 
    287290<?php } 
    288291 
    289 if ( 'spam' == $comment_status || 'deleted' == $comment_status ) { 
     292if ( ( 'spam' == $comment_status || 'deleted' == $comment_status) && current_user_can ('moderate_comments') ) { 
    290293        wp_nonce_field('bulk-destroy', '_destroy_nonce'); 
    291         if ( current_user_can ('moderate_comments')) { ?> 
    292                 <input type="submit" name="destroy_all" id="destroy_all" value="<?php esc_attr_e('Permanently Delete All'); ?>" class="button-secondary apply" /> 
     294    if ( 'spam' == $comment_status ) { ?> 
     295                <input type="submit" name="destroy_all" id="destroy_all" value="<?php esc_attr_e('Empty Quarantine'); ?>" class="button-secondary apply" /> 
     296<?php } elseif ( 'deleted' == $comment_status ) { ?> 
     297                <input type="submit" name="destroy_all" id="destroy_all" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" /> 
    293298<?php } 
    294299} ?> 
    295300<?php do_action('manage_comments_nav', $comment_status); ?> 
     
    341346<?php if ( 'all' == $comment_status || 'approved' == $comment_status ): ?> 
    342347<option value="unapprove"><?php _e('Unapprove'); ?></option> 
    343348<?php endif; ?> 
    344 <?php if ( 'approved' != $comment_status ): ?> 
     349<?php if ( 'all' == $comment_status || 'moderated' == $comment_status || 'spam' == $comment_status ): ?> 
    345350<option value="approve"><?php _e('Approve'); ?></option> 
    346351<?php endif; ?> 
    347 <?php if ( 'spam' != $comment_status ): ?> 
     352<?php if ( 'all' == $comment_status || 'approved' == $comment_status || 'moderated' == $comment_status ): ?> 
    348353<option value="markspam"><?php _e('Mark as Spam'); ?></option> 
    349354<?php endif; ?> 
     355<?php if ( 'deleted' == $comment_status ): ?> 
     356<option value="unapprove"><?php _e('Return to Pending'); ?></option> 
     357<?php endif; ?> 
    350358<?php if ( 'deleted' == $comment_status || 'spam' == $comment_status ): ?> 
    351359<option value="destroy"><?php _e('Delete Permanently'); ?></option> 
    352360<?php else: ?> 
    353 <option value="delete"><?php _e('Delete'); ?></option> 
     361<option value="delete"><?php _e('Move to Trash'); ?></option> 
    354362<?php endif; ?> 
    355363</select> 
    356364<input type="submit" name="doaction2" id="doaction2" value="<?php esc_attr_e('Apply'); ?>" class="button-secondary apply" /> 
    357365 
    358 <?php if ( 'spam' == $comment_status || 'deleted' == $comment_status ) { ?> 
    359 <input type="submit" name="destroy_all2" id="destroy_all2" value="<?php esc_attr_e('Permanently Delete All'); ?>" class="button-secondary apply" /> 
     366<?php if ( 'spam' == $comment_status ) { ?> 
     367<input type="submit" name="destroy_all2" id="destroy_all2" value="<?php esc_attr_e('Empty Quarantine'); ?>" class="button-secondary apply" /> 
     368<?php } elseif ( 'deleted' == $comment_status ) { ?> 
     369<input type="submit" name="destroy_all2" id="destroy_all2" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" /> 
    360370<?php } ?> 
    361371<?php do_action('manage_comments_nav', $comment_status); ?> 
    362372</div> 
  • wp-admin/includes/template.php

     
    21592159                                                        $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::deleted=1 delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>'; 
    21602160                                                } else { 
    21612161                                                        $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>'; 
    2162                                                         $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>'; 
     2162                                                        $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Move to Trash') . '</a>'; 
    21632163                                                } 
    21642164 
    21652165                                                $actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>';