Restrict access to the Trash folder in Posts
With the filter we prevent the Trash link from being printed. And with the action, redirect back to the post listing page if the user tries to access the URL directly (/wp-admin/edit.php?post_status=trash&post_type=post). add_filter( ‘views_edit-post’, ‘wpse_74488_remove_trash_link’ ); add_action( ‘admin_head-edit.php’, ‘wpse_74488_block_trash_access’ ); function wpse_74488_remove_trash_link( $views ) { if( !current_user_can( ‘delete_plugins’ ) ) unset( $views[‘trash’] ); return $views; … Read more