=== Activity Log ===
Contributors: snehalpancholi
Tags: activity log, audit log, user activity, security, admin log
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Logs post changes, plugin activations, user actions, and theme switches. View the filterable log at Tools → Activity Log.

== Description ==

Activity Log records key admin actions into a custom database table. Perfect for auditing, debugging, and keeping track of who changed what.

**Logged events:**

* Post / Page created
* Post / Page updated
* Post / Page trashed
* Post / Page permanently deleted
* Plugin activated / deactivated
* User account created / deleted
* User role changed
* Theme switched

**Admin view (Tools → Activity Log):**

* Filter by event type and date range
* Paginated table with 50 entries per page
* Colour-coded event badges
* Clickable links to posts and user profiles
* "Clear Log" button with confirmation

**Auto-purge:**

A daily WP-Cron job removes entries older than the configured retention period (default: 90 days).

== Installation ==

1. Upload the `activity-log` folder to `/wp-content/plugins/`.
2. Activate the plugin. The log table is created automatically.
3. Go to **Tools → Activity Log** to view logged events.
4. Adjust log retention at **Settings → Activity Log**.

== Frequently Asked Questions ==

= Does activation log itself? =
No. The activation hook runs before the filter that captures plugin activations.

= Is the log table removed on uninstall? =
Yes. Deleting the plugin via the WordPress admin drops the `{prefix}alv_log` table and removes all options.

= Can I keep logs longer than 90 days? =
Yes. Go to **Settings → Activity Log** and set the retention period up to 3650 days (10 years).

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
