This commit is contained in:
Javier Casares 2026-07-18 16:18:39 +00:00
commit ef4259b3c2

View file

@ -3,9 +3,9 @@ Contributors: javiercasares
Tags: seo, noindex, nofollow, noarchive, robots
Requires at least: 5.7
Tested up to: 7.1
Stable tag: 2.0.2
Stable tag: 3.0.1
Requires PHP: 7.2
Version: 2.0.2
Version: 3.0.1
License: GPL-3.0-or-later
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
@ -114,6 +114,46 @@ Extract the contents of the ZIP and upload the contents to the `/wp-content/plug
== Changelog ==
= 3.0.1 [2026-07-18] =
**Fixed**
* Self-healing v3 migration. If `noindex_seo_config_version` claims migration completed (version >= 3) but the consolidated `noindex_seo_settings` option is somehow missing, `noindex_seo_check_migration()` now re-runs the migration automatically. This recovers silently from partial failures: object-cache staleness after the write, request interrupted mid-migration, a third-party plugin clearing options, or DB write errors that did not raise a PHP error. Without this guard, the front-end would fall back to all-zero defaults (site fully indexable) until someone re-saved the settings page.
**Compatibility**
* WordPress: 5.7 - 7.1
* PHP: 7.2 - 8.5
**Tests**
* Added test for the self-healing migration path.
= 3.0.0 [2026-07-18] =
**Major release — storage consolidation.** Settings are now stored in a single autoloaded option (`noindex_seo_settings`) instead of ~110 individual options. Reduces `wp_options` autoload weight on every page load. Legacy options are preserved (marked non-autoloaded) for one major version to allow safe rollback to 2.x; they will be removed in 4.0.
**Added**
* **"Apply recommended defaults" button** on the settings page. One click enables all 12 contexts flagged as "Recommended" in the UI (privacy policy, date archives, pagination, search results, attachment pages, preview/customize-preview, and 404). Previously required ~60 individual checkbox toggles.
* **Filterable conflict-detection list.** The list of plugins that may conflict with noindex SEO is now passed through `apply_filters('noindex_seo_conflicting_plugins', ...)`. Third-party code can extend or replace the list without editing the plugin.
**Changed**
* **Storage consolidated**: 110 directive options (`{directive}_seo_{context}`) + 5 config options (`noindex_seo_config_*`) merged into one `noindex_seo_settings` array. Reads go through new accessors (`noindex_seo_get_settings()`, `noindex_seo_get_setting()`, `noindex_seo_get_config()`). The hourly transient cache is preserved on top.
* **Transient invalidation is now automatic**: any update to `noindex_seo_settings` clears the `noindex_seo_options` transient via the `update_option_noindex_seo_settings` hook. Previously only the admin form save cleared it, leaving WP-CLI / REST / programmatic edits stale for up to one hour.
* **Migration**: existing 2.x installs are migrated automatically on `plugins_loaded` (idempotent, version-gated by `noindex_seo_config_version`). Legacy options are kept and marked non-autoloaded so a rollback to 2.x restores the pre-3.0 state.
* **Uninstall retrocompatibility**: `uninstall.php` deletes both the new consolidated option and all legacy individual options (via wildcard SQL). Sites that upgrade from 2.x and later uninstall will be cleaned up completely regardless of whether migration ran.
**Compatibility**
* WordPress: 5.7 - 7.1
* PHP: 7.2 - 8.5
**Tests**
* Added PHPUnit test suite (previously the project shipped only a plugin-header smoke test). Coverage: contexts helper, settings accessors, v2→v3 migration, form save, bulk actions, meta box save, conflict-detection filter.
= 2.0.2 [2026-07-18] =
**Fixed**