Make WordPress Core

Changeset 29810


Ignore:
Timestamp:
10/02/2014 03:11:49 AM (10 years ago)
Author:
wonderboymusic
Message:

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

See #29742.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r29690 r29810  
    8383    protected function get_bulk_actions() {
    8484        $actions = array();
    85         $actions['delete'] = __( 'Delete Permanently' );
     85        if ( MEDIA_TRASH ) {
     86            if ( $this->is_trash ) {
     87                $actions['untrash'] = __( 'Restore' );
     88                $actions['delete'] = __( 'Delete Permanently' );
     89            } else {
     90                $actions['trash'] = __( 'Trash' );
     91            }
     92        } else {
     93            $actions['delete'] = __( 'Delete Permanently' );
     94        }
     95
    8696        if ( $this->detached )
    8797            $actions['attach'] = __( 'Attach to a post' );
Note: See TracChangeset for help on using the changeset viewer.