=== Beardo Multisite Activation Console ===
Contributors: beardotools
Donate link: https://beardo.tools/donate/
Tags: multisite, network, plugins, activation, audit
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Network-admin console to view and safely change plugin activation state (network, per-site, off) across every subsite, with an audit log.

== Description ==

Beardo Multisite Activation Console gives super admins one screen to see and safely change the activation state of every installed plugin across an entire multisite network.

**What it does**

* Activation matrix — every plugin's state (network active, active per site, or off) across all subsites in a single DataViews grid
* Safe transitions — one state change per request, so a fatal error on one subsite never takes down the whole batch
* Dry-run validation — backend health checks run before any change is executed
* Stale dual-state cleanup — detects plugins that are both network active and redundantly active per site, and strips the redundant entry without deactivating anything
* Audit log — every state transition is recorded network-wide with the acting user, target site, action, and result, filterable by user, site, and plugin
* Guardrails — a protected list stops the console from deactivating itself or a drop-in and locking a super admin out mid-operation

**Safety first**

Every request is gated to super admins with the `manage_network_plugins` capability, protected by REST cookie authentication and nonces, and every posted value is validated against a server-side allowlist before anything runs.

**Support & Documentation**

* For support, visit [help.beardo.tools](https://help.beardo.tools)
* Publisher site: [beardo.tools](https://beardo.tools)

== External Services ==

This plugin makes no external HTTP requests. It reads and writes only local
WordPress data: the network's plugin activation state, the sites in the
network, and its own audit log table. No data is sent to any third-party
service, and no tracking, telemetry, or analytics of any kind is collected.

== Third-Party Libraries ==

The admin interface is a React application built from the plugin's own source
in `src/` using @wordpress/scripts. The shipped `build/index.js` is compiled
output — not obfuscated code — and contains only the plugin's source plus the
standard WordPress packages it imports (@wordpress/components,
@wordpress/dataviews, @wordpress/element, @wordpress/api-fetch,
@wordpress/i18n, @wordpress/icons), all GPL-compatible.

The full, unminified source is available in the plugin's public repository.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`
2. **Network Activate** it from **Network Admin → Plugins**
3. Open **Network Admin → Plugins → Activation Console**

This plugin requires a WordPress multisite installation. It has no effect on single-site installs.

== Frequently Asked Questions ==

= Does this work on a single-site WordPress install? =

No. The console manages activation state across a multisite network, so it requires a multisite installation and must be network activated.

= Can it break my network by deactivating something critical? =

The console executes one transition per request so a fatal on one subsite is isolated, runs a backend dry-run before executing, and maintains a protected list (filterable via `beardo_mac_protected_plugins`) of plugins it will never touch — including itself.

= Who can use the console? =

Only super admins with the `manage_network_plugins` capability. Every REST request is nonce-protected and validated server-side.

= What is recorded in the audit log? =

Every state transition: the acting user, the plugin, the action, the scope, the target site, the result, and a timestamp. The log is stored in one network-wide table and can be filtered by user, site, and plugin.

= What happens to my data if I uninstall? =

Uninstalling removes the audit log table. No other data is created or modified.

== Screenshots ==

1. Activation matrix — every plugin's state across all subsites, with the safe-transition actions menu open
2. Audit log — every state transition recorded network-wide, filterable by user, site, and plugin

== Changelog ==

= 1.0.0 =
* Initial public release.
* Activation matrix — every plugin's state (network active, per-site active, or off) across all subsites in a single DataViews grid
* Safe transitions — one state change per request, so a fatal error on one subsite never takes down the whole batch
* Dry-run validation — backend health checks run before any change is executed
* Stale dual-state cleanup — detects and strips redundant per-site entries for network-active plugins without deactivating anything
* Dead-reference cleanup — removes activation entries for plugins no longer present on disk
* Audit log — every state transition recorded network-wide with acting user, target site, action, and result, filterable by user, site, and plugin
* Guardrails — a filterable protected list (`beardo_mac_protected_plugins`) prevents the console from deactivating itself or locking out a super admin
* Admin theme compatibility — console colors flow through a plugin-scoped CSS token layer, and the focus ring follows the user's admin color scheme
* Full RTL support

This release follows an internal beta series; 1.0.0 is the first version published to WordPress.org.

== Upgrade Notice ==

= 1.0.0 =
First public release.
