=== RedTools Internal Links Importer ===
Contributors: larrynorris
Tags: internal links, csv, seo, anchor links, automation
Requires at least: 5.0
Tested up to: 6.8
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Import a CSV file from RedTools to automatically add internal anchor links to your WordPress pages or posts, enhancing SEO and site navigation.

== Description ==
== Description ==
The RedTools Internal Links Importer allows users to upload a CSV file with columns `Source URL`, `Sentence`, `Keyword`, `Target URL`, and `Confidence` to add internal anchor links to WordPress pages or posts. Ideal for SEO professionals and website owners looking to automate internal linking strategies. Features include:

- CSV upload with data validation and cleaning (removes trailing dots).
- Paginated table display (25 rows) of imported data.
- AJAX-powered anchor link implementation with real-time progress feedback.
- Error logging for failed replacements, displayed in a summary textbox.

This plugin is designed to work seamlessly with the [Internal Linking tool](https://app.redtools.io/internal-linking-tool) on the RedTools platform, which automatically generates the required CSV file for import.

== Installation ==
1. Upload the `internal-links-importer` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to Tools > Internal Links Importer to upload your CSV file.
4. Click "Implement Anchor Links" to apply the links to your site.

== Frequently Asked Questions ==
= What CSV format is required? =
The CSV must have columns: `Source URL`, `Sentence`, `Keyword`, `Target URL`, `Confidence`. Ensure `Source URL` matches a page/post permalink and `Sentence` is in the page's main content.

= Will it work with page builders like Elementor? =
The plugin works if the `Sentence` is in the page's main content (`post_content`). For page builders, ensure content is synced to the default WordPress editor.

= How are errors handled? =
Errors (e.g., invalid URLs or unmatched sentences) are logged and displayed in the "Error Log Summary" textbox after implementation.

== Changelog ==
= 1.0.0 =
* Initial release with CSV upload, anchor link implementation, paginated table, and error logging.

== Upgrade Notice ==
= 1.0.0 =
This is the initial release, so no upgrade actions are required.

== Screenshots ==
1. The admin interface under Tools > Internal Links Importer, showing the CSV upload form and table.
2. The "Implement Anchor Links" button with progress feedback.
3. The error log summary textbox displaying failed replacements.