Make WordPress Core


Ignore:
Timestamp:
12/12/2009 06:40:16 AM (16 years ago)
Author:
azaozz
Message:

Disable trash for attachments for now pending improvements in 3.0, fixes #11149

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upload.php

    r12375 r12377  
    244244}
    245245$type_links[] = '<li><a href="upload.php?detached=1"' . ( isset($_GET['detached']) ? ' class="current"' : '' ) . '>' . __('Unattached') . '</a>';
    246 if ( EMPTY_TRASH_DAYS )
     246if ( EMPTY_TRASH_DAYS && ( MEDIA_TRASH || !empty($_num_posts['trash']) ) )
    247247    $type_links[] = '<li><a href="upload.php?status=trash"' . ( (isset($_GET['status']) && $_GET['status'] == 'trash' ) ? ' class="current"' : '') . '>' . sprintf( _nx( 'Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>', $_num_posts['trash'], 'uploaded files' ), number_format_i18n( $_num_posts['trash'] ) ) . '</a>';
    248248
     
    289289<?php if ( $is_trash ) { ?>
    290290<option value="untrash"><?php _e('Restore'); ?></option>
    291 <?php } if ( $is_trash || !EMPTY_TRASH_DAYS ) { ?>
     291<?php } if ( $is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) { ?>
    292292<option value="delete"><?php _e('Delete Permanently'); ?></option>
    293293<?php } else { ?>
     
    393393            $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>';
    394394        if ( current_user_can('delete_post', $post->ID) )
    395             if ( EMPTY_TRASH_DAYS )
     395            if ( EMPTY_TRASH_DAYS && MEDIA_TRASH )
    396396                $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&amp;post=$post->ID", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>";
    397397            else
     
    455455<?php if ($is_trash) { ?>
    456456<option value="untrash"><?php _e('Restore'); ?></option>
    457 <?php } if ( $is_trash || !EMPTY_TRASH_DAYS ) { ?>
     457<?php } if ( $is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) { ?>
    458458<option value="delete"><?php _e('Delete Permanently'); ?></option>
    459459<?php } else { ?>
Note: See TracChangeset for help on using the changeset viewer.