Make WordPress Core


Ignore:
Timestamp:
11/10/2009 10:38:19 AM (17 years ago)
Author:
azaozz
Message:

Remove all instances of "Trash" from the UI when Trash is disabled, replace trash actions with "Delete permanently", props caesarsgrunt, see #4529

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-comments.php

    r12008 r12162  
    164164        'trash' => _n_noop('Trash <span class="count">(<span class="trash-count">%s</span>)</span>', 'Trash <span class="count">(<span class="trash-count">%s</span>)</span>')
    165165    );
     166
     167if ( !EMPTY_TRASH_DAYS )
     168    unset($stati['trash']);
     169
    166170$link = 'edit-comments.php';
    167171if ( !empty($comment_type) && 'all' != $comment_type )
    168172    $link = add_query_arg( 'comment_type', $comment_type, $link );
     173
    169174foreach ( $stati as $status => $label ) {
    170175    $class = '';
     
    276281<option value="untrash"><?php _e('Restore'); ?></option>
    277282<?php endif; ?>
    278 <?php if ( 'trash' == $comment_status || 'spam' == $comment_status ): ?>
     283<?php if ( 'trash' == $comment_status || 'spam' == $comment_status || !EMPTY_TRASH_DAYS ): ?>
    279284<option value="delete"><?php _e('Delete Permanently'); ?></option>
    280285<?php else: ?>
     
    372377<option value="untrash"><?php _e('Restore'); ?></option>
    373378<?php endif; ?>
    374 <?php if ( 'trash' == $comment_status || 'spam' == $comment_status ): ?>
     379<?php if ( 'trash' == $comment_status || 'spam' == $comment_status || !EMPTY_TRASH_DAYS ): ?>
    375380<option value="delete"><?php _e('Delete Permanently'); ?></option>
    376381<?php else: ?>
Note: See TracChangeset for help on using the changeset viewer.