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:
parent
6dca7d1023
commit
ec93f031b3
@ -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' );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user