You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,13 @@
1
1
# Changelog
2
2
3
-
## Unreleased
4
-
5
-
-**Feature: public integration API (`wp_sudo_check()` / `wp_sudo_require()`)** β added first-party helpers for third-party plugins/themes to require an active sudo session without registering full action rules. `wp_sudo_require()` can redirect to the challenge page in session-only mode (or return `false` when redirecting is disabled/unavailable) and emits `wp_sudo_action_gated` with surface `public_api` for audit visibility.
6
-
-**Docs: developer reference update** β documented the new public helper API, args, usage example, and added `public_api` to the documented `wp_sudo_action_gated` surface list.
7
-
-**494 unit tests, 1286 assertions.**
3
+
## 2.12.0
4
+
5
+
-**Feature: WP-CLI operator commands** β added `wp sudo status`, `wp sudo revoke --user=<id>`, and `wp sudo revoke --all` for session inspection and revocation workflows.
6
+
-**Feature: Stream audit bridge** β added optional `bridges/wp-sudo-stream-bridge.php`, mapping all 9 WP Sudo audit hooks into Stream records. Bridge remains inert when Stream APIs are unavailable and supports late plugin load order.
7
+
-**Feature: public integration API (`wp_sudo_check()` / `wp_sudo_require()`)** β added first-party helpers for third-party plugins/themes to require an active sudo session without registering full action rules. `wp_sudo_require()` can redirect to the challenge page in session-only mode (or return `false` when redirecting is disabled/unavailable) and emits `wp_sudo_action_gated` with surface `public_api`.
8
+
-**Docs: release alignment** β updated developer reference and manual testing docs for Stream bridge and public API helpers; refreshed roadmap and contributing guidance for current development priorities and repo-local integration test paths.
Copy file name to clipboardExpand all lines: readme.md
+15-7Lines changed: 15 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -184,8 +184,8 @@ WP Sudo is built for correctness and contributor legibility, not just functional
184
184
185
185
**Test-driven development.** New code requires a failing test before production code is written. The suite is split into two deliberate tiers:
186
186
187
-
-**Unit tests** (478 tests, 1228 assertions) β use [Brain\Monkey](https://brain-wp.github.io/BrainMonkey/) to mock all WordPress functions. Run in ~0.5s with no database. Cover request matching, session state machine, policy enforcement, and hook registration.
188
-
-**Integration tests** (130 tests) β run against real WordPress + MySQL via `WP_UnitTestCase`. Cover full reauth flows, bcrypt verification, transient TTL, REST and AJAX gating, Two Factor interaction, multisite session isolation, upgrader migrations, and all 9 audit hooks.
187
+
-**Unit tests** (494 tests, 1286 assertions) β use [Brain\Monkey](https://brain-wp.github.io/BrainMonkey/) to mock all WordPress functions. Run in ~0.5s with no database. Cover request matching, session state machine, policy enforcement, and hook registration.
188
+
-**Integration tests** (135 tests) β run against real WordPress + MySQL via `WP_UnitTestCase`. Cover full reauth flows, bcrypt verification, transient TTL, REST and AJAX gating, Two Factor interaction, multisite session isolation, upgrader migrations, and all 9 audit hooks.
189
189
190
190
**Static analysis and code style.** PHPStan, Psalm (with WordPress stubs/plugin), and PHPCS (WordPress-Extra + WordPress-Docs + WordPressVIPMinimum) run on every push and pull request via GitHub Actions, alongside the full test matrix (PHP 8.1β8.4, WordPress latest + trunk). A nightly scheduled run catches WordPress trunk regressions early. Type coverage is published to Shepherd on default-branch pushes (`main`/`master`).
191
191
@@ -197,16 +197,16 @@ WP Sudo is built for correctness and contributor legibility, not just functional
No production dependencies. Dev dependencies (PHPUnit, PHPStan, Psalm, PHPCS, Brain\Monkey, Mockery) live in `vendor/` and are not shipped.
208
208
209
-
*Last updated: 2026-03-05. See CLAUDE.md for the update command.*
209
+
*Last updated: 2026-03-08. See CLAUDE.md for the update command.*
210
210
211
211
## Screenshots
212
212
@@ -240,6 +240,14 @@ No production dependencies. Dev dependencies (PHPUnit, PHPStan, Psalm, PHPCS, Br
240
240
241
241
## Changelog
242
242
243
+
### 2.12.0
244
+
245
+
-**Feature: WP-CLI operator commands** β added `wp sudo status`, `wp sudo revoke --user=<id>`, and `wp sudo revoke --all` for session inspection and revocation workflows.
246
+
-**Feature: Stream audit bridge** β added optional `bridges/wp-sudo-stream-bridge.php`, mapping all 9 WP Sudo audit hooks into Stream records with inert behavior when Stream APIs are unavailable.
247
+
-**Feature: public integration API (`wp_sudo_check()` / `wp_sudo_require()`)** β added first-party helpers for third-party plugins/themes to require active sudo sessions without full Gate-rule registration.
248
+
-**Docs and release hygiene** β updated developer reference/manual testing for Stream + public API, refreshed roadmap priorities, and regenerated `bom.json`.
249
+
-**494 unit tests, 1286 assertions. 135 integration tests in CI.**
250
+
243
251
### 2.11.1
244
252
245
253
-**Docs release + metadata alignment** β corrected post-v2.11.0 documentation drift: roadmap completion markers, RC re-test guidance, and release notes alignment across `CHANGELOG.md`, `readme.md`, and `readme.txt`.
@@ -150,7 +150,7 @@ WP Sudo is built for correctness and contributor legibility, not just functional
150
150
151
151
Architecture: a single SPL autoloader maps the WP_Sudo\* namespace to includes/class-*.php. The Gate class detects the entry surface (admin UI, AJAX, REST, WP-CLI, Cron, XML-RPC, Application Passwords, WPGraphQL), matches the incoming request against a registry of 29+ rules, and challenges, soft-blocks, or hard-blocks based on surface and policy. All gating decisions happen server-side in PHP hooks β JavaScript is used only for UX.
152
152
153
-
Testing: the suite is split into two tiers. Unit tests (478 tests, 1228 assertions) use Brain\Monkey to mock WordPress functions and run in ~0.4s. Integration tests (130 tests) run against real WordPress + MySQL and cover full reauth flows, AJAX and REST gating, Two Factor interaction, multisite isolation, uninstall cleanup, and all 9 audit hooks.
153
+
Testing: the suite is split into two tiers. Unit tests (494 tests, 1286 assertions) use Brain\Monkey to mock WordPress functions and run in ~0.4s. Integration tests (135 tests) run against real WordPress + MySQL and cover full reauth flows, AJAX and REST gating, Two Factor interaction, multisite isolation, uninstall cleanup, and all 9 audit hooks.
154
154
155
155
CI: GitHub Actions runs PHPStan level 6 and PHPCS on every push and PR, the full test matrix across PHP 8.1-8.4 and WordPress latest + trunk, and a nightly scheduled run against WordPress trunk.
156
156
@@ -168,6 +168,13 @@ Extensibility: the action registry is filterable via wp_sudo_gated_actions. Nine
168
168
169
169
== Changelog ==
170
170
171
+
= 2.12.0 =
172
+
* **Feature: WP-CLI operator commands** β added `wp sudo status`, `wp sudo revoke --user=<id>`, and `wp sudo revoke --all` for session inspection and revocation workflows.
173
+
* **Feature: Stream audit bridge** β added optional `bridges/wp-sudo-stream-bridge.php`, mapping all 9 WP Sudo audit hooks into Stream records with inert behavior when Stream APIs are unavailable.
174
+
* **Feature: public integration API (`wp_sudo_check()` / `wp_sudo_require()`)** β added first-party helpers for third-party plugins/themes to require active sudo sessions without full Gate-rule registration.
175
+
* **Docs and release hygiene** β updated developer reference/manual testing for Stream + public API, refreshed roadmap priorities, and regenerated `bom.json`.
176
+
* **494 unit tests, 1286 assertions. 135 integration tests in CI.**
177
+
171
178
= 2.11.1 =
172
179
* **Docs release + metadata alignment** β corrected post-v2.11.0 documentation drift: roadmap completion markers, RC re-test guidance, and release notes alignment across `CHANGELOG.md`, `readme.md`, and `readme.txt`.
173
180
* **Version annotation fixes** β corrected `@since` annotations introduced in the v2.11.0 development cycle so Phase 3/4 additions no longer reference the nonexistent `2.10.3` version.
Copy file name to clipboardExpand all lines: wp-sudo.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
* Plugin Name: Sudo
4
4
* Plugin URI: https://github.com/dknauss/wp-sudo
5
5
* Description: Action-gated reauthentication for WordPress. Dangerous operations require password confirmation before they proceed β regardless of user role.
0 commit comments