=== Siternet Post Deleter ===
Contributors: siternet
Tags: delete posts, bulk delete, cleanup, media
Requires at least: 5.0
Tested up to: 6.9
Stable tag: 1.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Short Description: Safely delete WordPress posts in batches with smart media cleanup and featured image protection.

== Description ==

Siternet Post Deleter is a safe and controlled tool for bulk deleting WordPress posts in batches.

Instead of deleting all posts at once, the plugin allows administrators to remove posts step-by-step using a configurable batch size. This reduces the risk of server overload and accidental data loss.

Key features:

- Batch-based deletion (adjustable size)
- Optional category filtering
- Permanent deletion (no trash)
- Safe media cleanup
- Featured image protection logic
- Admin-only access with capability checks
- Nonce-protected destructive actions

When deleting posts, the plugin also removes associated media. However, it includes a safety mechanism that prevents deletion of images still used as featured images in other posts.

This makes it suitable for content cleanup, migrations, and maintenance tasks.

== Installation ==

1. Upload the `siternet-post-deleter` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' screen in WordPress admin.
3. In the WordPress admin sidebar, open 'Siternet Post Deleter'.
4. (Optional) Set 'Category to delete' to target only a specific post category.
5. Set 'Posts per batch' and click 'Save settings'.
6. Click 'Delete Everything' (and confirm the checkbox) to delete the first batch. Repeat until completion.

== FAQ ==

= What does the plugin delete? =

The plugin targets the default post type (`post`) and permanently deletes:
- Posts selected for the current batch
- Their featured images (if they are not used as featured images by other posts)
- Attachments attached to those posts (with the same featured-image safety check)

= Does it delete pages or custom post types? =

No. This plugin only processes the built-in `post` post type.

= Can I delete only posts from one category? =

Yes. Use the 'Category to delete' setting to limit deletion to a specific WordPress category.

= Is the deletion permanent? =

Yes. The plugin uses permanent deletion (no trash) for both posts and attachments.

= What if I reuse the same image on multiple posts? =

The plugin will not delete an attachment if it is still used as a featured image by posts outside the current batch.

= Can I delete in smaller steps? =

Yes. Use the 'Posts per batch' setting to control how many posts are deleted per click.

== Changelog ==

= 1.1.1 =
* Fix WordPress.org compliance issues: correct text domain and readme format.

= 1.1.0 =
* Production-ready rework with:
  * WordPress Settings API for batch size
  * Nonce protection and explicit confirmation for deletion
  * Batch result reporting via admin notices
  * Featured-image safety check to reduce unintended media removal

