This commit is contained in:
Javier Casares 2026-08-12 13:18:40 +00:00
commit bc1cb5e00a
32 changed files with 4254 additions and 0 deletions

29
changelog.txt Normal file
View file

@ -0,0 +1,29 @@
== Changelog ==
= 0.1.0 =
_Release date: 2026-08-12_
**Highlights**
* Phase 1 scaffold of Manager (by ROBOTSTXT) — client-side dashboard for the ROBOTSTXT plugin ecosystem. Read-only catalog view with local install-state resolution.
**Added**
* Plugin header, autoloader (Composer with manual fallback), lifecycle hooks, constants (`ROBOTSTXT_MANAGER_VERSION`, `ROBOTSTXT_MANAGER_DIR`, `ROBOTSTXT_MANAGER_URL`, `ROBOTSTXT_MANAGER_BASENAME`).
* `Robotstxt_Manager_Loader` action/filter queue (identical pattern to Core/Mollie/Sync).
* `Robotstxt_Manager_Encryption` — AES-256-CBC encrypt/decrypt for the API key, using WordPress `AUTH_KEY` + `AUTH_SALT` for key derivation. Same pattern as Core's Forgejo token encryption.
* `Robotstxt_Manager_Core_Client` — HTTP client for the remote Plugins Core REST API. Authenticated via `Authorization: Bearer <key>` header. Implements `test_connection()`, `get_catalog()` (cached in transient), `clear_catalog_cache()`.
* `Robotstxt_Manager_Settings` — Settings API page with Store URL, API Key (masked, encrypted, last-4 hint, delete-on-empty preservation), Catalog Cache TTL, Data-on-Uninstall opt-in. AJAX "Test connection" button with nonce + capability check.
* `Robotstxt_Manager_Admin` — Top-level admin menu (label "ROBOTSTXT") with catalog table view. Resolves local install/active/update state for every catalog entry using `get_plugins()` + `is_plugin_active()`. "Refresh catalog" admin-post action.
* `uninstall.php` with opt-in data deletion (default: preserve all options and transients).
* Per-project tooling: Composer, PHPCS + WPCS + PHPCompatibility, PHPStan level 9 + wp-compat, PHPUnit. `bin/preflight.sh` and `bin/deploy.sh`.
**Compatibility**
* WordPress: 7.0 - 7.1
* PHP: 8.4 - 8.5
**Tests**
* Phase 1 scaffold — plugin-header tests included. Additional tests for Core client, settings, and admin rendering in follow-up phases.