mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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:
parent
0797823c55
commit
cf31ee092b
@ -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