Opened 5 years ago
Closed 5 years ago
#49448 closed feature request (wontfix)
Suggestion: Deleting media along with the post it is attached to
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
Good evening!
There is a suggestion. Please tell me, is it possible to make sure that when deleting a record, WordPress would ask the user whether to delete the media files attached to this record or not? There is simply a news site and now it turns out that the moderator has to clean the media library manually, which takes a lot of time. That is, the moderator must delete old entries and, in addition to everything, manually clean the media library. He has to look at each record for the presence of a picture and then search for it in the library and delete it manually. And if you also take into account that several pictures can be generated there (themes and plugins that can add your picture size too). Agree, for a news site it is not very convenient and quite a long time to delete all this manually. I don’t know how for small sites, but for my project it’s not convenient. If we consider the option of using plugins, then the plugins that could do this are already outdated and the developers do not support them. But for writing your own plugin there is not enough knowledge yet. I would like to have as a standard feature in WordPress, to use as few plugins on the site as possible. Please tell me, is it possible to make the WordPress ask the user whether to delete pictures that are attached to the record? And the person would choose, if so then all the pictures along with the recording would be deleted. And if not, then everything would have remained untouched. I think many users would like such an idea.
Best regards,
Shuriks
Change History (4)
#2
@
5 years ago
- Summary changed from Suggesion! Deleting pictures along with the recording attached to it to Suggestion: Deleting media along with the post it is attached to
- Type changed from enhancement to feature request
- Version 5.3.2 deleted
This would be a nice and useful core feature, but to do it reliably it would require restructuring how media is linked to posts, from many-to-one to many-to-many, via a new database table. That's possible as a big project, but would probably be a backwards compatibility nightmare.
Deleting content massively may be seen as bad practice, and we may not wan to encourage such.
In the current situation, I see this as plugin territory.
#4
@
5 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
Closing per comment:1 and comment:2. As noted above, there's a code snippet in comment:1:ticket:12108 or plugins like Autoremove Attachments if you'd like to implement this on your site.
Hi there, welcome to WordPress Trac! Thanks for the ticket.
Just noting that this was previously suggested in #12108. In general, deleting attachments along with the post is not feasible, as they can be used in other posts without being directly attached to them.
There's a code snippet in comment:1:ticket:12108 or plugins like Autoremove Attachments if you'd like to implement this on your site.