=== Sedattelli - Bulk Delete Comments & Users with IP Ban ===
Contributors:      sedattelli
Tags:              comment management, user management, ip ban, spam, security
Requires at least: 6.2
Tested up to:      7.0
Stable tag:        2.3
Requires PHP:      7.4
License:           GPLv2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

Bulk delete spam comments and user accounts, automatically ban their IPs to prevent spam from returning.

== Description ==

**Comment and User Cleanup - By Sedat Telli** is a security and maintenance plugin designed to simplify WordPress administration.

=== Features ===

* **Bulk Comment Management** – Filter spam, approved or pending comments and bulk delete them.
* **Bulk User Management** – List unwanted users and delete them with one click.
* **Automatic IP Banning** – IP addresses of deleted comments or users are automatically added to the blacklist.
* **Blacklist Management** – Manually add or remove IP addresses from the blacklist.
* **Comment Blocking** – New comment attempts from banned IPs are blocked instantly.
* **Registration Blocking** – New account creation from banned IPs is prevented.
* **Real-time Status Indicator** – Each row in the comment list shows whether the IP is banned.
* **Multi-language Support** – English, Turkish, German, French, Spanish, Arabic, Russian.

=== Security ===

All form actions are protected with WordPress nonces. Database queries use `$wpdb->prepare()` to prevent SQL injection. All output is sanitized with `esc_html()` and `esc_attr()`.

== Installation ==

1. Download the plugin ZIP file.
2. In your WordPress admin panel, go to **Plugins → Add New → Upload Plugin**.
3. Select the ZIP file, upload it and click **Activate**.
4. Use the **Comment and User Cleanup** menu item in the left sidebar.

Alternatively:

1. Upload the plugin folder to `wp-content/plugins/`.
2. Activate the plugin from the WordPress admin panel.

== Frequently Asked Questions ==

= How does IP banning work? =

When a comment or user is deleted, their IP address is automatically added to the blacklist in the database. New comment and registration attempts from that IP are blocked.

= Can I add IPs manually? =

Yes. Go to the Blacklist page and enter an IP address with an optional reason to add it manually. You can also remove banned IPs from the same page.

= Can an Administrator account be deleted? =

No. The account with ID 1 and the currently logged-in account can never be deleted.

= Which IP formats are supported? =

Valid IPv4 (e.g. 185.234.218.110) and IPv6 addresses are supported. Local addresses (127.0.0.1, ::1) cannot be banned for security reasons.

= Does the plugin bulk-ban IPs from existing comments? =

No. Only the IP of a comment is added when you delete it. To bulk-ban existing IPs, select all comments on the Comments page and delete them.

= Is WordPress Multisite supported? =

The plugin has been tested on single-site installations only.

== Screenshots ==

1. Main dashboard – total comment, user and banned IP statistics
2. Comment management – filter, select and bulk delete
3. User management – role-based filtering and bulk delete
4. Blacklist – view, add and remove banned IPs

== Changelog ==

= 2.3 =
* Plugin renamed for WordPress.org compliance
* All database queries use `$wpdb->prepare()` with proper escaping
* Inline JavaScript replaced with `wp_add_inline_script()`
* All outputs properly escaped with `esc_html()`, `esc_attr()`, `absint()`
* Ban table now created automatically when plugin loads
* Fixed manual IP add form submit button
* User roles now display correctly
* Code refactored to meet WordPress security guidelines

= 2.2 =
* Initial public release
* Bulk comment and user deletion
* Automatic IP banning
* Blacklist management page

== Upgrade Notice ==

= 2.3 =
Updated plugin name for WordPress.org compliance. Strongly recommended to upgrade.
