This commit is contained in:
Javier Casares 2026-11-03 17:02:51 +00:00
commit 7b3c00cacc

View file

@ -1,5 +1,38 @@
== Changelog ==
= 3.2.0 =
_Release date: 2026-09-18_
**Highlights**
* Two roadmap features: JSON export/import of the settings (#6) and runtime conflict verification against the `wp_robots` API (#10).
**Added**
* **Export / Import of settings (JSON).** Two new controls on the settings page: "Export settings" downloads the consolidated settings as a JSON file (`noindex-seo-settings-{date}.json`), and "Import settings" restores the global settings from a previously exported file. Imports are strictly validated and sanitized: plugin marker check, 1 MB size limit, `is_uploaded_file()` verification, the upload is never persisted to the uploads directory, every directive is normalized to 0/1, config values go through the same safelists as the settings form, and contexts that do not exist on the importing site (e.g. custom post types from another install) are dropped. Per-post and per-term granular overrides are content data and are never touched by an import. Both actions require `manage_options` and a nonce; success and error notices survive the redirect.
* **Runtime conflict verification (TODO #10).** When no known SEO plugin conflicts, `noindex_seo_detect_conflicts()` now also inspects the callbacks actually registered on the `wp_robots` filter (WordPress 5.7+): anything that is not a core callback or one of ours — a foreign function, a class method, or a closure from a theme or unknown plugin — produces a dismissible admin notice naming the detected callback. The core callback safelist is filterable via `noindex_seo_core_robots_callbacks`. The notice honours the existing "disable compatibility warnings" opt-out.
**Changed**
* Nothing.
**Fixed**
* Nothing.
**Security**
* No security changes; the new endpoints follow the canonical checklist (capability + nonce on both actions, strict input validation, safelisted config values, no persistence of uploads) and PHPCS/PHPStan/composer audit stay clean.
**Compatibility**
* WordPress: 4.7 - 7.2
* PHP: 5.6 - 8.5
**Tests**
* PHPUnit: 9.6.36 (165 tests, all passing): export payload shape and JSON round-trip, import sanitizer (happy path, normalization, unknown-context dropping, malformed-payload rejection), handler guards, foreign-callback detection (functions, class methods, closures, own-prefix skipping, filterable safelist) and the runtime notice.
= 3.1.6 =
_Release date: 2026-09-18_