=== Auto Delete Post - Ultimate plugin for deleting a post automatically ===
Contributors: palashwpdev
Donate link: https://buymeacoffee.com/palash_wp
Tags: auto delete post, delete post, delete page, delete inactive users, cleanup
Requires PHP: 7.4
Requires at least: 5.4
Tested up to: 7.1
Version: 2.1.0
Stable tag: 2.1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Auto-delete old posts and pages, clean up unused media, remove inactive user accounts, and redirect visitors from deleted URLs. Simple, automatic cleanup.

== Description ==
Auto Delete Post is a comprehensive WordPress plugin that automatically deletes posts, pages, and custom post types after a specified time. Set a deletion date and time when publishing content, and the plugin will automatically remove it when the specified time arrives. Perfect for time-sensitive content, temporary posts, or automatically cleaning up outdated material.

**Key Features:**
*   Schedule automatic deletion for any post, page, or custom post type
*   Choose between moving posts to trash or permanent deletion
*   Support for all public post types in WordPress
*   Dedicated settings page to configure which post types to include
*   Custom meta box on post edit screen to set deletion time
*   Quick edit functionality for bulk scheduling
*   Custom column showing scheduled deletion times
*   Real-time reliable deletion processing
*   Automatic removal of deletion schedule when posts are restored from trash
*   Set post redirection option trying to visit deleted post/page
*   Delete attached media files while deleting any post
*   Enable User Cleanup to automatically delete users who have been inactive for a set number of days
*   Target specific user roles for cleanup, leaving other roles untouched
*   Automatically reassign a deleted user's posts to the current admin account

== Installation ==

**The easy way.**

Go to your WordPress Dashboard. Navigate to Plugins > Add New and then search for "Auto Delete Post". Click on Install and then Activate the Plugin.

That's it, Auto Delete Post Plugin is now activated on your site!

**The hard way..**

Download "Auto Delete Post WordPress Plugin"  and then extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.

== Frequently Asked Questions ==
=  Is this plugin compatible on latest WordPress ?  =
Yes

= Can I choose which post types are affected by auto-deletion? =
Yes, you can select which post types should have the auto-deletion functionality available via the plugin's Settings page under the "Auto Delete Posts" menu.

= What happens when a post is scheduled for deletion? =
You can choose whether posts should be moved to trash or permanently deleted when the scheduled time arrives. This is configured in the plugin's Settings page.

= Can I schedule multiple posts for deletion at once? =
Yes, you can use the quick edit functionality on the posts list page to set deletion times for multiple posts quickly.

= Can I cancel an auto-deletion after scheduling it? =
Yes, you can cancel an auto-deletion by removing the scheduled time from the post's edit screen or clearing the field in quick edit.

= Can I redirect my deleted post or pages? =
Yes, you can set a specific post or page for post redirection when user tries to visit deleted post/page.

= Can I delete attached media files when I permanently delete a post? =
Yes, enable the "Delete Attached Media" option in settings. When a post is permanently deleted, its attached media files (featured image and any files attached to that post, of any file type) will also be deleted — but only if they aren't still in use by another post, page, or public post type.

= What does the User Cleanup setting do? =
Enabling "User Cleanup" in the plugin settings lets the plugin automatically delete users who haven't logged in for a number of days you specify. You can set the inactivity threshold in days, and choose which user role(s) the cleanup should target, so other roles are left untouched.

= What happens to a deleted user's posts? =
Before a user is deleted, the plugin reassigns any posts they authored to the current admin account, so their content stays on the site instead of being removed or left without an author.

== Screenshots ==

1. Set the default time zone from the WordPress settings option to work correctly according to your timezone
2. Select any post types where you want to enable this functionality and choose between moving to trash or permanent deletion in the plugin settings.
3. Select a time and date from the custom meta box field of this plugin on the post edit screen.
4. You can also select the time from the quick edit option, no need to go to the edit section of any post.
5. View post deletion time in the right column of all post list page.
6. Select any post or page that you may want to set as post redirection.
7. Enable "Delete Attached Media" to automatically remove unused attachments when a post is permanently deleted.
8. Enable "User Cleanup" to automatically delete users inactive for a set number of days, target specific roles, and reassign their posts to the current admin.

== Changelog ==
= 2.1.0 =
* Added new "Enable User Cleanup" option to automatically delete users inactive for a configurable number of days.
* Added target role setting to restrict user cleanup to specific user roles.
* Deleted users' posts are now automatically reassigned to the current admin account.

= 2.0.2 =
* Updated readme.txt file for correct documentation
* Added new "Delete Attached Media" option to automatically remove unused media files (all file types) when a post is permanently deleted.
* Media is only deleted if it's not still in use by another post, page, or public post type.

= 2.0.1 =
* Checked compatibility with latest version of WP
* Added new "Delete Attached Media" option to automatically remove unused media files (all file types) when a post is permanently deleted.
* Media is only deleted if it's not still in use by another post, page, or public post type.
* Fixed translation issue with untranslated strings in settings screens.

= 2.0.0 =
* Checked compatibility with latest version of WP
* Solved translation issue of some text and added Bangla translation ready file.
* Added general settings time date format support in the all post column.

= 1.1.9 =
* Solved post direction select field only displaying last 5 posts issue.
* Fixed post does not match when typing the post name in the redirect input field.

= 1.1.8 =
* Added post redirection option for deleted post/page

= 1.1.7 =
* Updated the banner image

= 1.1.6 =
* Fixed fatal error caused by missing main class initialization.

= 1.1.6 =
* Fixed fatal error caused by missing main class initialization.

= 1.1.5 =
* Checked compatibility with latest version of WP
* Updated tested up to version to 6.7.2

= 1.1.4 =
* Added date time field in the quick edit section of post

= 1.1.3 =
* Solved unable to restore post from trash issue.

== Upgrade Notice ==

= 2.1.0 =
New "Enable User Cleanup" option added: delete inactive users by role after a set number of inactive days, with automatic post reassignment to the admin.