Media List Table: account for MEDIA_TRASH in the bulk action dropdown.

See #29742.

Built from https://develop.svn.wordpress.org/trunk@29810


git-svn-id: http://core.svn.wordpress.org/trunk@29576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-10-02 03:12:18 +00:00
parent 0797823c55
commit cf31ee092b

View File

@ -82,7 +82,17 @@ class WP_Media_List_Table extends WP_List_Table {
protected function get_bulk_actions() {
$actions = array();
$actions['delete'] = __( 'Delete Permanently' );
if ( MEDIA_TRASH ) {
if ( $this->is_trash ) {
$actions['untrash'] = __( 'Restore' );
$actions['delete'] = __( 'Delete Permanently' );
} else {
$actions['trash'] = __( 'Trash' );
}
} else {
$actions['delete'] = __( 'Delete Permanently' );
}
if ( $this->detached )
$actions['attach'] = __( 'Attach to a post' );