WordPress.org

Make WordPress Core

Ticket #20175: trash-patch.patch

File trash-patch.patch, 811 bytes (added by mvd7793, 16 months ago)

Fixes the bug in ticket 20175

  • wp-admin/includes/class-wp-posts-list-table.php

     
    185185                        $actions['untrash'] = __( 'Restore' ); 
    186186                else 
    187187                        $actions['edit'] = __( 'Edit' ); 
     188                if (current_user_can( get_post_type_object($this->screen->post_type)->cap->delete_posts)) { 
     189                        if ( $this->is_trash || !EMPTY_TRASH_DAYS ) 
     190                                $actions['delete'] = __( 'Delete Permanently' ); 
     191                        else 
     192                                $actions['trash'] = __( 'Move to Trash' ); 
    188193 
    189                 if ( $this->is_trash || !EMPTY_TRASH_DAYS ) 
    190                         $actions['delete'] = __( 'Delete Permanently' ); 
    191                 else 
    192                         $actions['trash'] = __( 'Move to Trash' ); 
     194                } 
    193195 
    194196                return $actions; 
    195197        }