Make WordPress Core

Changeset 29690


Ignore:
Timestamp:
09/03/2014 06:46:34 AM (9 years ago)
Author:
nacin
Message:

Media Library: Fix media trash handling.

props ocean90, obenland.
fixes #29469.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/forms.css

    r29604 r29690  
    375375.tablenav #changeit,
    376376.tablenav #delete_all,
    377 .tablenav #clear-recent-list {
     377.tablenav #clear-recent-list,
     378.wp-filter #delete_all {
    378379    margin-top: 1px;
    379380}
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r29659 r29690  
    3838        list( $post_mime_types, $avail_post_mime_types ) = wp_edit_attachments_query( $_REQUEST );
    3939
    40         $this->is_trash = isset( $_REQUEST['status'] ) && 'trash' == $_REQUEST['status'];
     40        $this->is_trash = isset( $_REQUEST['attachment-filter'] ) && 'trash' == $_REQUEST['attachment-filter'];
    4141
    4242        $mode = empty( $_REQUEST['mode'] ) ? 'list' : $_REQUEST['mode'];
     
    6464        $type_links['all'] = "<option value=''$selected>" . sprintf( _nx( 'All (%s)', 'All (%s)', $_total_posts, 'uploaded files' ), number_format_i18n( $_total_posts ) ) . '</option>';
    6565        foreach ( $post_mime_types as $mime_type => $label ) {
    66             $class = '';
    67 
    6866            if ( !wp_match_mime_types($mime_type, $avail_post_mime_types) )
    6967                continue;
     
    9997        <div class="actions">
    10098<?php
    101         if ( ! is_singular() && ! $this->is_trash ) {
    102             $this->months_dropdown( 'attachment' );
     99        if ( ! is_singular() ) {
     100            if ( ! $this->is_trash ) {
     101                $this->months_dropdown( 'attachment' );
     102            }
    103103
    104104            /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
Note: See TracChangeset for help on using the changeset viewer.