=== 410 Link Unlinker ===
Contributors: Arnjen
Tags: links, 410, unlink, cleanup
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Removes anchor wrappers (<a href="…">…</a>) in posts/pages (and optionally postmeta) when links match a provided list (e.g., 410 Gone). Keeps the visible text.

== Description ==
Use Tools → 410 Link Unlinker to paste a list of URLs. Run a dry-run to preview, then apply. Optional: include wp_postmeta.

== Installation ==
1. Upload the plugin folder to /wp-content/plugins/
2. Activate via Plugins.
3. Go to Tools → 410 Link Unlinker.

== Frequently Asked Questions ==
= Does it delete the link text? =
No—only removes the <a> wrapper; the inner text/HTML remains.

== Changelog ==
= 1.0.7 =
* Add "Trash Matching Posts" feature to bulk-trash posts whose URLs match your 410 list (removes them from author pages, archives, etc.).

= 1.0.6 =
* Fix URL parsing to accept URLs without https:// prefix.
* Improved examples: show post/page URL slugs and meta_key names.
* Add "Show all changes" checkbox to list every modification instead of first 10.
* Fix shortcode matching to support both single and double quotes.
* Only process postmeta values that contain HTML tags (skip internal WP meta).
* Relative path matching now only applies to post_content, not postmeta (prevents false positives across domains).
* Fix PCRE regex limit error when processing large URL lists (600+ URLs now supported).

= 1.0.5 =
* Only scan published posts/pages (skip drafts for faster processing).

= 1.0.4 =
* Add examples output for shortcode attribute neutralization in postmeta.

= 1.0.3 =
* Fix URL matching bug where base domains were incorrectly matched instead of specific deep links.
* Improved pattern building to keep host-path pairs together, ensuring only exact URLs are matched.

= 1.0.2 =
* Fix WordPress.Security.ValidatedSanitizedInput.InputNotSanitized warning for $_FILES input.
* Add phpcs:ignore comments for direct database queries used in bulk operations.

= 1.0.1 =
* Add license header and metadata.
* Sanitize/unslash inputs per WP standards.
* Inline prepared queries.
* Add version to enqueued CSS.

== License ==
This plugin is licensed under the GPLv2 or later.
