=== Hirca Keywords Linker ===
Contributors: masoudb
Tags: seo, automatic linking, content, links
Donate link: https://hirca.ir
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automatically turn keyword phrases into links across your posts and pages to improve SEO and site structure.

== Description ==

**Hirca Keywords Linker** helps you build a stronger linking structure without editing every post by hand.

Define keyword phrases and destination URLs once. The plugin finds the first matching phrase in your content and inserts a clean link automatically — while carefully avoiding broken markup, existing links, and self-links.

Ideal for blogs, content sites, documentation hubs, and any WordPress site that wants better topical connection between related pages.

= Key features =

* Add up to **five keyword phrases** per destination URL
* Link only the **first occurrence** of each phrase in a post
* Prefer **longer phrases** over shorter ones (better match quality)
* Enable linking for **posts, pages, and public custom post types**
* Limit linking to **all categories** or only selected categories
* Optional limits: max links per post (default 4), skip headings, skip first paragraph
* Case-sensitive matching and open-in-new-tab options
* Fast admin workflow with **search** and **pagination**
* **Import / Export** keywords as a simple UTF-8 `.txt` file (merge or replace)
* Translation-ready (includes Persian / `fa_IR`)
* Clean uninstall that removes plugin options

= Smart linking safeguards =

Hirca Keywords Linker is designed to protect your content quality:

* Never links inside existing `<a>` tags
* Protects script, style, code, pre, iframe, and similar blocks
* Does not match keywords inside raw URLs or HTML tags
* Never creates a self-link to the current page
* Only one phrase is linked per destination URL in the same post
* Longer phrases take priority over shorter ones

= Who is this for? =

* SEO specialists managing large content libraries
* Site owners who want consistent interlinking without page builders
* Agencies that need a lightweight, no-bloat keyword linking tool
* Multilingual sites that need a translation-ready workflow

= How it works =

1. Go to **Settings → Hirca Keywords Linker**
2. Add a destination URL and one or more keyword phrases
3. Choose which post types should be processed
4. Publish or update content as usual — links are applied on the front end

No shortcodes required. No content rewrite is stored in the database until you edit the post yourself; links are generated when the content is displayed.

== Installation ==

= Automatic installation =

1. In your WordPress admin, go to **Plugins → Add New**
2. Search for **Hirca Keywords Linker**
3. Click **Install Now**, then **Activate**
4. Open **Settings → Hirca Keywords Linker**

= Manual installation =

1. Download the plugin ZIP
2. Upload the `hirca-keywords-linker` folder to `/wp-content/plugins/`
3. Activate **Hirca Keywords Linker** from the Plugins screen
4. Configure keywords and options under **Settings → Hirca Keywords Linker**

= After activation =

1. Open the **Settings** tab and choose post types / linking rules
2. Open the **Keywords** tab and add your phrases and URLs
3. Optional: use **Import / Export** to migrate keywords between sites

== Frequently Asked Questions ==

= Where do I manage keywords and settings? =

Go to **Settings → Hirca Keywords Linker**. The page has three tabs: Keywords, Settings, and Import / Export.

= Will this create duplicate links? =

No. Each phrase is linked at most once per post, and only one phrase is linked for each destination URL in the same post.

= Does it work with custom post types? =

Yes. Any public post type can be enabled in the Settings tab.

= Does the plugin modify my saved post content? =

No. Linking happens when content is displayed using the `the_content` filter. Your stored post content remains unchanged.

= Can I import and export keywords? =

Yes. Export creates a UTF-8 tab-separated `.txt` file. On import you can merge with existing keywords or replace them entirely.

= What format does the import file use? =

Tab-separated columns:

`enabled`, `url`, `title`, `phrase1`, `phrase2`, `phrase3`, `phrase4`, `phrase5`

Lines starting with `#` are treated as comments.

= Can I skip headings or the first paragraph? =

Yes. Both options are available in Settings and are useful for SEO-friendly article layouts.

= Is it translation-ready? =

Yes. The text domain is `hirca-keywords-linker`, and a Persian (`fa_IR`) translation is included.

= What happens when I delete the plugin? =

The uninstall routine removes plugin options.


== Changelog ==

= 1.0.0 =
Adds text-file import/export and consistent plugin prefixes.
