Keyword Filter
v1.1.0williamlong · 2012年3月7日 上架
Replace chosen keywords in post content with your own words.
- 正在使用
- 10+
- 评分
- 暂无
- 累计下载
- 3,999
- 最近更新
- 2026年11月26日
需要 WordPress 4.6+已测试到 7.1.5PHP 7.4+
贡献者
Keyword Filter replaces selected keywords in post content with the words you specify. It works by applying a WordPress filter to post content at display time, so the original post is kept in the database and only the output is changed.
Features:
- Case-insensitive matching for Latin text.
- Support for multibyte characters, including Chinese.
- Safe, single-pass replacement that preserves UTF-8 text.
- The replacement map can be customized without editing plugin code.
The default replacement map ships with the plugin. To set your own map, add the following to your theme’s functions.php or a custom plugin:
add_filter( 'keyword_filter_map', function() { return array( 'old' => 'new', 'example' => 'sample' ); } );
The array keys are the words to find, and the values are their replacements. Return an empty array to disable filtering.