=== Q Activity Logger ===
Contributors: q-digital-marketing
Tags: activity log, audit log, history, security, user tracking
Requires at least: 5.0
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A complete activity log for WordPress — see who did what and when, with clean filters, diffs and audit-grade detail.

== Description ==

Q Activity Logger records everything that happens on your WordPress site into a clean, filterable activity feed:

* **Content** — posts, pages and custom post types created, updated (with a field-by-field diff), trashed, restored and deleted.
* **Media** — uploads, edits and deletions with file size and dimensions.
* **Users** — logins, failed login attempts (collapsed into one event with a counter during brute-force floods), logouts, registrations, profile edits, role changes, password resets and application passwords.
* **Plugins & Themes** — installed, activated, deactivated, updated, deleted, theme switches, Customizer saves and widget changes.
* **WordPress Core** — updates applied (manual and automatic) and newly available versions.
* **Comments** — created, approved, spammed, trashed, edited and deleted.
* **Taxonomies & Menus** — categories, tags and navigation menus created, edited and deleted.
* **Settings** — changes to the core settings screens, with old and new values.
* **Privacy** — personal data export/erasure requests and site content exports.

= Plugin integrations =

When a supported plugin is active, Q Activity Logger records its own events too — automatically, no configuration needed:

* **WooCommerce** — new orders, order status changes, product create/update/delete, low/out-of-stock warnings, settings saves.
* **Contact Form 7** — form submissions (sent and failed).
* **Gravity Forms** — entry submissions and form saves.
* **WPForms** — form submissions.
* **Yoast SEO** and **Rank Math** — settings changes.
* **Advanced Custom Fields** — field group create/update/delete.
* **Elementor** — page/template saves.
* **Jetpack** — module activation/deactivation.
* **User Switching** — switching into and back out of another user account.

Activity from *any* plugin that flows through standard WordPress hooks (custom post types, users, media, comments, taxonomies) is logged out of the box. For a plugin without a built-in integration, developers can push events in one line with `q_activity_log()->logger->info(...)` or `do_action('q_al_log', ...)`, or register a custom logger via the `q_al_loggers` filter.

You can enable or disable each activity type and integration, and choose exactly which post types are tracked, on the Settings page.

Every event stores the acting user, log level, initiator (user, anonymous visitor, WP-CLI, cron or WordPress itself), IP address (with an optional GDPR-friendly anonymization mode) and full context, viewable in a slide-out detail drawer.

= Features =

* Reverse-chronological activity feed with date groups, avatars and level badges
* Free-text search plus filters for type, level, initiator, user and date range
* Stats overview: events today, this week, failed logins in the last 24 hours
* Repeated identical events collapse into one row with a repeat counter
* Slide-out drawer with full event context and old → new change tables
* Dashboard widget and optional admin bar quick peek
* CSV and JSON export of the (filtered) log
* Secret, hard-to-guess RSS feed to follow activity from a feed reader
* Automatic cleanup after a configurable number of days (default 60)
* Role-based access control for viewing the log
* Developer API: `q_activity_log()->logger->info('...', [...])`, the `q_al_log` action, and filters to skip or extend events

== Installation ==

1. Upload the `q-activity-logger` folder to `/wp-content/plugins/`.
2. Activate the plugin through the Plugins screen.
3. Activity starts logging immediately — find it under the "Activity Logger" menu.

== Security ==

All log views are capability-gated (`manage_q_activity_logs`), all actions are nonce-protected, and passwords are never stored in the log. IP anonymization is available for GDPR compliance.

== Changelog ==

= 1.0.0 =
* Initial release: full activity logging across posts, media, users, plugins, themes, core, comments, terms, menus, settings and privacy events.
* Activity feed UI with filters, stats, detail drawer, dashboard widget and admin bar peek.
* CSV/JSON export, secret RSS feed, retention cleanup, IP anonymization and developer API.
