=== ZS Action Scheduler Optimizer ===
Contributors: zaferoz
Donate link: https://devnoro.com.tr
Tags: action scheduler, cleanup, cleaner, optimization, retention
Requires at least: 6.2
Tested up to: 7.0
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Optimize Action Scheduler by cleaning completed, failed, and canceled actions, truncating logs, and controlling the retention period.

== Description ==

ZS Action Scheduler Optimizer provides a simple administration page under Tools for maintaining Action Scheduler data.

The plugin:

* Checks that the Action Scheduler actions and logs tables exist before performing maintenance.
* Deletes completed, failed, and canceled actions when requested.
* Truncates the Action Scheduler logs table when cleanup is requested.
* Lets administrators configure the Action Scheduler retention period.
* Displays the current table sizes and record counts.

Because cleanup permanently deletes database records, create a database backup before using the cleanup option on a production site.

== Installation ==

1. Upload the `zs-action-scheduler-optimizer` folder to the `/wp-content/plugins/` directory, or install the plugin through WordPress.
2. Activate the plugin through the Plugins screen.
3. Go to Tools > ZS Action Scheduler Optimizer.

== Usage ==

1. Navigate to Tools > ZS Action Scheduler Optimizer in the WordPress dashboard.
2. Choose whether to delete completed, failed, and canceled actions.
3. Select the desired Action Scheduler retention period.
4. Click Save Changes.

== Changelog ==

= 1.0.3 =
* Updated compatibility metadata for WordPress 7.0.
* Hardened admin form handling with stricter input validation and capability checks.
* Updated database queries to use WordPress identifier placeholders for table names.
* Updated the text domain to match the WordPress.org plugin slug.
* Added a plugin-specific retention setting with backward-compatible fallback for existing installations.
* Improved admin notices, escaping, and code formatting.

= 1.0.2 =
* Updated plugin code to allow translations.

= 1.0.1 =
* Added checks to ensure the required Action Scheduler tables exist before performing operations.
* Updated plugin version and tested up to WordPress version 6.4.3.

= 1.0.0 =
* Initial release of the plugin.

== Developer Information ==

Author: Zafer Oz
Author URI: https://devnoro.com.tr
