How to remove the Unattached filter on Media Library List?

For example, at /wp-admin/upload.php are displayed the following filters by:

All (6) | Images (6) | Unattached (6)

Read More

How can I remove the “Unattached (6)” filter by?

Thanks in advance.

Related posts

Leave a Reply

1 comment

  1. As it turns out, with the introduction of the WP_List_Table class, view filter are now hookable and specifically you can filter out that detached link like so..

    add_filter( 'views_upload', 'upload_views_filterable' );
    function upload_views_filterable( $views ) {
        unset( $views['detached']);
        return $views;
    }
    

    Bye bye detached link!… 🙂