Media Library: Fix media trash handling.
props ocean90, obenland. fixes #29469. Built from https://develop.svn.wordpress.org/trunk@29690 git-svn-id: http://core.svn.wordpress.org/trunk@29465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cb242bb358
commit
8a9186b878
|
@ -374,7 +374,8 @@ input[type="number"].small-text {
|
|||
|
||||
.tablenav #changeit,
|
||||
.tablenav #delete_all,
|
||||
.tablenav #clear-recent-list {
|
||||
.tablenav #clear-recent-list,
|
||||
.wp-filter #delete_all {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
|
|
|
@ -374,7 +374,8 @@ input[type="number"].small-text {
|
|||
|
||||
.tablenav #changeit,
|
||||
.tablenav #delete_all,
|
||||
.tablenav #clear-recent-list {
|
||||
.tablenav #clear-recent-list,
|
||||
.wp-filter #delete_all {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -37,7 +37,7 @@ class WP_Media_List_Table extends WP_List_Table {
|
|||
|
||||
list( $post_mime_types, $avail_post_mime_types ) = wp_edit_attachments_query( $_REQUEST );
|
||||
|
||||
$this->is_trash = isset( $_REQUEST['status'] ) && 'trash' == $_REQUEST['status'];
|
||||
$this->is_trash = isset( $_REQUEST['attachment-filter'] ) && 'trash' == $_REQUEST['attachment-filter'];
|
||||
|
||||
$mode = empty( $_REQUEST['mode'] ) ? 'list' : $_REQUEST['mode'];
|
||||
|
||||
|
@ -63,8 +63,6 @@ class WP_Media_List_Table extends WP_List_Table {
|
|||
$selected = empty( $_GET['attachment-filter'] ) ? ' selected="selected"' : '';
|
||||
$type_links['all'] = "<option value=''$selected>" . sprintf( _nx( 'All (%s)', 'All (%s)', $_total_posts, 'uploaded files' ), number_format_i18n( $_total_posts ) ) . '</option>';
|
||||
foreach ( $post_mime_types as $mime_type => $label ) {
|
||||
$class = '';
|
||||
|
||||
if ( !wp_match_mime_types($mime_type, $avail_post_mime_types) )
|
||||
continue;
|
||||
|
||||
|
@ -98,8 +96,10 @@ class WP_Media_List_Table extends WP_List_Table {
|
|||
?>
|
||||
<div class="actions">
|
||||
<?php
|
||||
if ( ! is_singular() && ! $this->is_trash ) {
|
||||
if ( ! is_singular() ) {
|
||||
if ( ! $this->is_trash ) {
|
||||
$this->months_dropdown( 'attachment' );
|
||||
}
|
||||
|
||||
/** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
|
||||
do_action( 'restrict_manage_posts' );
|
||||
|
|
Loading…
Reference in New Issue