LeKeyLinks
LeKeyLinks
Description
LeKeyLinks helps you add internal links automatically. After you define keywords and target URLs in the admin area, matching text in post content is replaced with links while existing links and code blocks are left alone.
Features
- Chinese and English keywords (English uses word boundaries)
- Keyword priority and per-keyword maximum replacements
- Per-post total link limit (default 5, configurable) to reduce processing cost
- Skips text inside existing
<a>tags - Skips
<pre>,<code>,<script>,<style>, and similar regions - Keyword list caching to reduce database queries
- Fast content pre-check before DOM parsing
- Optional replacement in excerpts (
the_excerpt) - Link styling: bold, color, and rel tokens (noopener, nofollow, sponsored, ugc)
- Per-post skip via classic editor, block editor, or
_lekl_skipmeta - Feeds are not processed; content replacement defaults to singular views
Management
- Add, edit, delete, search, and paginate keywords
- Central settings screen for switches and styles
Installation
- Upload the
lekeylinksfolder to/wp-content/plugins/, or install the ZIP via Plugins Add New Upload Plugin. - Activate LeKeyLinks on the Plugins screen.
- Open the Keyword Links menu, add keywords and destination URLs.
- Open Keyword Links Settings to configure the per-post link limit and styles.
Faq
Possible reasons: the keyword reached its max replacements; the post reached the per-post link limit; the match is inside an existing link or code block; the post is marked to skip replacement; the plugin is disabled; or you are not on a singular view and excerpt replacement is off.
Max replacements applies to one keyword. The per-post link limit caps the total number of auto-inserted links in one post (or one excerpt pass). Both apply, and keywords are processed from higher to lower priority.
Enable the per-post skip panel in Settings, then check the option in the editor. You can also set post meta _lekl_skip to 1.
The PHP DOM extension (libxml) is required. PHP 7.4 or newer is recommended.
Reviews
Changelog
1.0.6
- Plugin Check: Tested up to 7.1; use %i for table names; remove report markdown from plugin root
1.0.5
- Plugin Check: English readme, Requires WP 6.2+, translators comments, output escaping
- Plugin Check: prefixed globals, dbDelta/custom-table phpcs notes, remove load_plugin_textdomain
- Link URLs limited to http/https; admin capability checks retained
1.0.4
- Security: admin write actions require manage_options; link URLs limited to http/https
- Compliance: ABSPATH guards, Domain Path / Requires headers, uninstall.php, dbDelta
- Duplicate keyword check; max_replace clamped to 0–100
1.0.3
- Per-post link limit; skip pre/code regions; performance and PHP 8.2 compatibility
1.0.2
- Keyword list transient cache; per-post skip panels; excerpt replacement; rel extras
1.0.1
- Settings: master switch, bold links, link color
1.0.0
- Initial release


