Title: Half Baked Link Injection
Author: emrysh
Published: <strong>March 3, 2026</strong>
Last modified: March 4, 2026

---

Search plugins

![](https://ps.w.org/half-baked-link-injection/assets/icon.svg?rev=3473941)

# Half Baked Link Injection

 By [emrysh](https://profiles.wordpress.org/emrysh/)

[Download](https://downloads.wordpress.org/plugin/half-baked-link-injection.3.0.10.zip)

 * [Details](https://wordpress.org/plugins/half-baked-link-injection/#description)
 * [Reviews](https://wordpress.org/plugins/half-baked-link-injection/#reviews)
 *  [Installation](https://wordpress.org/plugins/half-baked-link-injection/#installation)
 * [Development](https://wordpress.org/plugins/half-baked-link-injection/#developers)

 [Support](https://wordpress.org/support/plugin/half-baked-link-injection/)

## Description

Half Baked Link Injection lets you define simple rules that automatically replace
whole-word phrases with links when WordPress renders post and page content.

It is designed for clean, predictable linking that stays out of your way. Rules 
are applied only to `the_content`, and existing links are never modified. This makes
it useful for SEO hygiene, internal linking, and turning recurring terms into consistent
references without editing each post manually.

#### How it works

Create one or more injection rules. Each rule includes:
 * A phrase (whole-word 
matching is always used) * A destination URL (internal relative links or external
URLs) * Optional settings like case sensitivity, where it applies, and how often
it triggers

When a post or page is displayed, the plugin scans only the text portions of the
content and injects links where appropriate. It will not touch phrases inside existing`
<a>` tags, and it skips script and style blocks to avoid breaking markup.

#### Targeting and control

Rules can be scoped and prioritized so you stay in control when phrases overlap 
or your site grows.
 * Post type targeting: apply a rule to Posts, Pages, or both*
Priority ordering: lower numbers win when multiple rules could match the same spot*
Tie-breaking: if priorities match, newer rules win

#### Occurrence options

Control how frequently each phrase is linked:
 * First * First + every Nth * Every
Nth * All

This is useful when you want a light touch on long articles.

#### External links done properly

When a rule points to an external URL, the plugin:
 * Adds `target="_blank"` * Ensures`
rel` includes `noopener noreferrer` * Lets you append additional rel tokens like`
nofollow` or `sponsored`

Relative URLs stay relative and do not get `target="_blank"`.

#### Built for safety and performance

 * No recursion into `the_content`
 * Processes content safely by splitting HTML and touching only text tokens
 * Skips existing `<a>` tags
 * Skips `<script>` and `<style>` blocks

#### Privacy and data

This plugin does not send any data off-site. Rules are stored locally in your WordPress
database in a single option.

#### Uninstall

Uninstalling the plugin removes stored rules from your database.

## Screenshots

 * [[
 * The rules list screen, showing priority, phrase, destination, and scope.
 * [[
 * Adding or editing a rule, including whole-word and occurrence options.
 * [[
 * Internal link picker for selecting posts and pages.

## Installation

 1. Upload the plugin files to the `/wp-content/plugins/half-baked-link-injection` 
    directory, or install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the Plugins screen in WordPress.
 3. Go to Settings and open Half Baked Link Injection.
 4. Add one or more injection rules and save.

## FAQ

### Does it change existing links?

No. If a phrase appears inside an existing `<a>` tag, it is ignored and not replaced.

### Does it work on excerpts, titles, or widgets?

No. Rules are applied to post and page content only via `the_content`.

### What does whole-word matching mean?

It uses whole-word boundaries, so it will not match partial words. For example, “
cat” will not match “catch”.

### How are conflicts handled when multiple rules could match?

Rules are evaluated by priority (lower wins). If priorities match, newer rules win.
Existing links are never modified, and the plugin will not create nested links.

### Can I add nofollow or sponsored to external links?

Yes. Add tokens in the rule’s Rel field. For external URLs, `noopener noreferrer`
are always added.

### Where are rules stored?

Rules are stored locally in your WordPress database in a single option.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Half Baked Link Injection” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ emrysh ](https://profiles.wordpress.org/emrysh/)

[Translate “Half Baked Link Injection” into your language.](https://translate.wordpress.org/projects/wp-plugins/half-baked-link-injection)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/half-baked-link-injection/),
check out the [SVN repository](https://plugins.svn.wordpress.org/half-baked-link-injection/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/half-baked-link-injection/)
by [RSS](https://plugins.trac.wordpress.org/log/half-baked-link-injection/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 3.0.10

 * Docs: Clarify data storage/privacy and uninstall behavior.

#### 3.0.9

 * Fix: Remove discouraged load_plugin_textdomain() call (translations auto-load
   on WordPress.org).

#### 3.0.8

 * Tweak: Align admin/AJAX capability checks (edit_posts).
 * Tweak: Load translations via load_plugin_textdomain().

#### 3.0.7

 * Fix: Plugin Check nonce/sanitization warnings in rules save handler.

#### 3.0.6

 * Fix: Add plugin owner to Contributors in readme.
 * Fix: Sanitize/validate posted rules earlier to satisfy review + Plugin Check.
 * Fix: Prefix plugin class name to satisfy Plugin Check.

#### 3.0.5

 * Fix: Plugin Check input-sanitization warnings in admin handlers.

#### 3.0.4

 * Fix: Overlay N value now saves correctly (occurrence mode value alignment).

#### 3.0.3

 * Fix: Show N input in Add New Rule overlay for Nth modes; correct N value saving.

#### 3.0.2

 * Fix: Show/hide N input in Add New Rule overlay (correct field IDs).

#### 3.0.1

 * Admin: Add New Rule overlay now includes N value for Nth occurrence modes.

#### 3.0.0

 * Version bump.

#### 2.0.36

 * Change: Occurrence modes updated to: First, First + every Nth (1-10), Every Nth(
   1-10), All.

#### 2.0.35

 * Fix: harden Add rule (overlay) save handler to avoid fatals (safe fallbacks for
   UUID, limits, and sanitizers).

#### 2.0.34

 * Fix: resolve critical error on save (missing sanitize_post_types and MAX_RULES
   constant).

#### 2.0.33

 * Fix: restore stable admin JS (Remove buttons work again) and make Add rule overlay
   submit via admin-post without breaking the page.

#### 2.0.32

 * Fix: Add rule overlay save form is no longer nested (nested forms prevented submission
   in some browsers).

#### 2.0.31

 * Admin: Add Injection overlay now saves via admin-post with a minimal payload (
   no AJAX, no full settings form submit) to avoid timeouts.

#### 2.0.30

 * Fix: Add Injection overlay AJAX save now includes its own nonce (previous build
   never localized addRuleNonce).

#### 2.0.29

 * Admin: Add Injection overlay now saves the new rule via AJAX to avoid full-page
   submits/timeouts.

#### 2.0.26

 * Fix: Add Injection overlay now uses the same row-creation logic as the main screen,
   so new rules are populated correctly and save reliably.

#### 2.0.25

 * Fix: enqueue wp-util on settings screen so the Add Injection overlay can render
   new rows.

#### 2.0.24

 * Fix: wire up Add rule and Cancel buttons inside the Add Injection overlay.

#### 2.0.23

 * Fix: Add rule overlay now reliably adds rows (ensure wp-util dependency and add
   a fallback Add button inside the modal).

#### 2.0.22

 * Fix: ensure link picker modal appears above the Add Injection overlay.

#### 2.0.21

 * Fix: link picker now works inside the Add Injection overlay; selected URLs populate
   the overlay URL field.

#### 2.0.20

 * Fix: Add New Rule now opens the overlay dialog (previous build still appended
   a new row directly).

#### 2.0.19

 * Admin: add new injections via an overlay dialog (instead of appending a new row
   at the bottom).

#### 2.0.18

 * Admin: block saving duplicate phrases (case-insensitive). If duplicates are detected,
   nothing is saved.

#### 2.0.17

 * Hotfix: revert admin UI enhancements that caused timeouts on some hosts. Core
   injection behavior unchanged.

#### 2.0.14

 * Enhancement: prevent self-link injections; Admin: block saving duplicate phrases(
   case-insensitive) with an error.

#### 2.0.7

 * Plugin Checker: fix escaping for dynamic name attributes; add translators comment;
   harden request method check; add PHPCS annotation for sanitized POST arrays.

#### 2.0.6

 * Fix: correct admin asset gating without request vars; resolve activation WSOD
   in 2.0.5.

#### 2.0.4

 * Compliance: update Tested up to header; minor i18n cleanup for admin UI text.

#### 2.0.3

 * Performance: avoid expensive regex runs when phrase not present; add per-request
   replacement cap; faster internal token splitting.

#### 2.0.2

 * Initial release.

## Meta

 *  Version **2.0.8**
 *  Last updated **2 months ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **6.9.4**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [content](https://wordpress.org/plugins/tags/content/)[internal links](https://wordpress.org/plugins/tags/internal-links/)
   [links](https://wordpress.org/plugins/tags/links/)[seo](https://wordpress.org/plugins/tags/seo/)
 *  [Advanced View](https://wordpress.org/plugins/half-baked-link-injection/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/half-baked-link-injection/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/half-baked-link-injection/reviews/)

## Contributors

 *   [ emrysh ](https://profiles.wordpress.org/emrysh/)

## Support

Issues resolved in last two months:

     0 out of 1

 [View support forum](https://wordpress.org/support/plugin/half-baked-link-injection/)