=== URL Autolinker by Jerin.ca ===
Contributors: jerinpallath0
Tags: links, seo, autolink, internal links, external links
Requires at least: 5.6
Tested up to: 6.9
Requires PHP: 7.2
Stable tag: 2.14.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automatically link saved website names/aliases (keywords) in posts and pages — with optional Pro upgrades for advanced controls and AI suggestions.

== Description ==

**URL Autolinker by Jerin.ca** helps you automatically add hyperlinks in your content.

In **Free mode**, you add URLs and aliases (keywords). The plugin scans your post/page content and converts those keywords into clickable links.

In **Pro mode (optional)**, you can unlock advanced link controls (follow/nofollow, new tab), link limits, exclusions/filters, performance options, and AI-powered link suggestions (service-based). Pro is activated with a license key.

= Free Features =
- Save unlimited URLs with aliases (keywords).
- Automatically link keywords to saved URLs in post/page content.

= Pro Features (Optional) =
- **Link attributes:** follow/nofollow controls and open links in a new tab.
- **Link limits:** maximum links per alias per paragraph and total auto-links per post.
- **Targeting controls:** post type whitelist and post/page blacklist controls.
- **Content exclusions:** exclude specific HTML areas (headings, lists, tables, code blocks, etc.).
- **Safety behavior:** optionally skip targets that are already manually linked.
- **Performance:** optional caching of compiled rules for faster processing on large sites.
- **AI Links (service-based):**
  - Smart Suggestions (suggest internal links + anchor phrases for an entire post/page)
  - Zero-Link Posts (surface content that likely needs internal links)
- **Pro UI/pages:** Pro-only pages/sections inside the plugin admin (when Pro is enabled).
- **License validation:** remote license status checks and subscription status caching.

Note: The free plugin provides core alias-to-link automation. Pro features are optional and require an active license.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/url-autolinker/` directory, or install the plugin through the WordPress Plugins screen.
2. Activate the plugin through the “Plugins” screen in WordPress.
3. In your WordPress admin menu, open **URL Autolinker**.
4. Add your URLs and aliases (keywords).
5. Save changes — your content will now auto-link based on your saved rules.

(Optional) If you have a Pro license, open the Pro/Buy Pro area inside the plugin, enter your license key, and verify it to enable Pro features.

== Frequently Asked Questions ==

= What is included in the free version? =
The free version includes:
- saving unlimited URLs with aliases (keywords)
- automatically linking those keywords in post/page content

= What does Pro add? =
Pro adds link attribute controls (follow/nofollow, new tab), link limits, post targeting controls, HTML exclusion options, performance caching, and AI-powered link suggestions (service-based), plus Pro-only admin pages.

= Will this plugin change or break my existing links? =
The free version focuses on inserting links for your saved aliases. Pro includes an option to skip text that is already linked manually, which helps avoid double-linking.

= Does this work with custom post types? =
Pro includes post type targeting controls. The base auto-linking behavior runs on content processed through `the_content`.

= Does the plugin contact external servers? =
Free mode does not require external requests.
If you enable Pro, the plugin may contact the Pro service for license validation and AI features (if used). If you operate a Pro service, it’s recommended to publish a privacy policy/terms page on your Pro site and reference it in your plugin UI and/or documentation.

= Is there a Pro version? =
Yes. Pro is optional and activated with a license key.

== Screenshots ==

1. Saved URLs table where you add and manage URL/alias rules.
2. Example of saved links list with edit/delete options.
3. Pro features banner and Pro pages (AI Links / Pro controls).

== Changelog ==

= 2.14.5 =
* Maintenance release.

= 2.14.4 =
* Pro (AI Links): Smart Suggestions now runs on the full post/page in one request (no line-by-line paragraph scanning).
* Pro (AI Links): Added "Add selected to Saved URLs" so suggestions can be saved as normal auto-link rules instead of directly editing posts.

= 2.14.0 =
* Pro: Added AI Links page with Smart Suggestions + Zero-Link Posts.
* Pro: Tabbed UI with full-width layout and loading spinner.

= 2.13.12 =
* Fix: Auto-linking now works reliably in long posts/paragraphs even when content contains HTML entities (e.g., ampersands) by safely inserting generated links into the DOM.
* Fix: Excluding <div> no longer accidentally disables auto-linking inside normal paragraphs (common in block builders).
* Improvement: More Unicode-friendly matching + chunked rule patterns to reduce PCRE edge cases on large keyword sets.

= 2.13.11 =
* Pro gating: Stats pages now enforce Pro access (blocked + CTA) unless Pro is enabled.
* Added: "Enable Pro features" toggle (keeps key saved but disables Pro behavior when off).
* Update: "Update All Posts" is available for all users.
* UI: "Support the Developer" banner hides automatically when Pro is enabled.

= 2.13.10 =
* Pro gating: lock Pro-only tabs/pages when API key is inactive (blurred UI + CTA).
* Free mode: Saved Links remain available; auto-linking runs only when Pro is active.

= 2.13.9 =
* Added: Pro API key license validation (remote check + cached status).
* Added: "Check License Now" button on Buy Pro page.
* Added: Daily background license re-check via WP-Cron.

= 2.13.8 =
* Fix: Removed file-scope uninstall variable to satisfy plugin checks.
* Tweak: Admin headings updated (smaller, bold, uppercase, more readable).

= 2.13.7 =
* Fix: Stable tag aligned with plugin version for WordPress.org packaging.
* Fix: Added nonce verification for statistics refresh actions.
* Fix: Improved admin asset versioning to reduce caching issues.
* Fix: Minor security hardening and code-quality improvements.

= 2.13.1 =
* Fix: General Settings and Link Settings tabs now render correctly.

= 2.13.0 =
* Added General/Content/Link/Advanced settings tabs.
* Added uninstall retention option, admin bar indicator toggle, batch size control, and minimum editor role setting.
* Added post type whitelist, post/page blacklist (and optional child pages), case sensitive matching, HTML exclusion areas, and per-paragraph global link limit.
* Added global nofollow + customizable link output template.
* Added cache toggle and improved cache clearing.

= 2.12.6 =
* Fixed admin tabs on Statistics pages (stats menu tabs now open correctly).
* Minor version bump.

= 2.12.5 =
* Improved admin data saving with pagination-safe merging and better duplicate prevention.
* Added export/import and bulk update enhancements.

= 2.12.4 =
* Security hardening: added nonce verification and stricter sanitization.
* Compatibility: replaced parse_url() with wp_parse_url() and removed PHP 7.4-only syntax.
* Admin UI: bundled local icon and improved escaping/output handling.
* Misc: updated "Tested up to" and aligned readme stable tag.

= 2.0 =
* Added searchable, sortable admin table.
* Added per-paragraph and total post limits.
* Improved sanitization and validation.
* Introduced Pro banner for upcoming features.

= 1.0 =
* Initial release with basic alias-to-URL auto-linking.

== Upgrade Notice ==

= 2.14.5 =
Maintenance release.

== License ==

This plugin is licensed under the GPLv2 or later.
See https://www.gnu.org/licenses/gpl-2.0.html for details.