michaeluno / Task-Scheduler

Provides a task management system for WordPress
Other
14 stars 7 forks source link

Delete attachements #10

Closed Ruriko closed 7 years ago

Ruriko commented 7 years ago

So I set it to auto delete posts that are older than a day but I want it to also delete attachments since some posts contain linked attachments. Can you make it auto delete attachments as well?

michaeluno commented 7 years ago

Hi,

Are those posts with attachments built-in post types? Or are they custom post types?

Ruriko commented 7 years ago

They are built-in post types

michaeluno commented 7 years ago

Can you post screenshots so that I'll understand what you are talking about?

Ruriko commented 7 years ago

Ok so I create a post and upload some images which gets automatically added to the media library. Using task scheduler it can delete the post but it does not delete the image that's included in the post cause you can still see it in the media library.

Here is screenshot for attachments http://i.imgur.com/P8g4fX2.jpg as you can see the screenshot shows the image is attached to the post named "test". So if the post "test" is deleted it should delete that image as well

michaeluno commented 7 years ago

I see.

So when the user selects the attachment post type, the attached files should be also deleted.

I'll see what I can do.

michaeluno commented 7 years ago

It turned out to be a bug in the Delete Action module component which ignored posts without taxonomy items.

@Ruriko Can you try the 1.4.4b branch which should fix this issue?

Ruriko commented 7 years ago

yep it's working now

michaeluno commented 7 years ago

The version 1.4.4 has been released. Thanks for the report.