跳到内容

Linkable

v1.0.0

VOID Technology · 2025年8月26日 上架

Automatically link keywords in your content to internal pages or posts. Simple, fast, and Gutenberg-compatible.

正在使用
20+
评分
5.0 / 5
累计下载
779
最近更新
2026年5月22日
3 条评价需要 WordPress 5.8+已测试到 7.0.9PHP 7.4+

Linkable is a lightweight WordPress plugin that automates internal linking by converting defined keywords into links to selected posts or pages.

Core functionality:
* Automatically links keywords to chosen posts or pages
* Works on singular posts and pages by filtering the_content at priority 20
* Searches for keyword matches inside <p>, <li>, <b>, <em>, and <i> tags
* Skips self-links by excluding the current post from the keyword map
* Uses the Yoast SEO title for link tooltips when Yoast is active, otherwise falls back to the WordPress title
* Preserves existing <a> tags and shortcodes by backing them up before processing and restoring them afterward

Keyword management:
* Keywords are stored per post and per page as JSON in the linkable_tags post meta field
* linkable_tags is registered with REST support, sanitized via sanitize_text_field, and restricted to users with edit_posts

Settings:
* Accessible via Settings Linkable
* max_links_per_target: limits how many times the same target can be linked from one post (default 1)
* first_occurrence_only: when enabled, each keyword is linked only once per post

Performance:
* Builds a global keyword map from all published posts and pages with linkable_tags
* Caches the keyword map with a transient (global_linkable_tag_map) for one hour
* Query optimized to fetch only IDs and avoid unnecessary meta/term caching

Editor compatibility:
* Works with both the block editor and the classic editor
* Enqueues an admin sidebar panel script (static/js/admin-sidebar-panel.js) with WordPress dependencies and versioning via filemtime

Security:
* URLs are properly escaped with esc_url
* Link titles are sanitized and HTML-escaped
* Meta registration includes capability and sanitization checks

License

This plugin is licensed under the GPLv2 or later.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums