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

See #29742.


git-svn-id: https://develop.svn.wordpress.org/trunk@29810 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-10-02 03:11:49 +00:00
parent 6dca7d1023
commit ec93f031b3
1 changed files with 11 additions and 1 deletions

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' );