Comment Filter
Filter unwanted words in comments by replacing them with asterisks.
Not scanned yet
WordPress plugin
20 installs
Install in
Comment Filter replaces unwanted words in comment text with asterisks. It hooks into WordPress at display time, so the original comment is kept in the database and only the output is filtered.
Features:
- Case-insensitive matching, so both uppercase and lowercase words are filtered.
- Support for multibyte characters, including Chinese.
- Fast single-pass replacement, safe even for long comments.
- The word list can be customized without editing plugin code.
By default, a built-in list of words is used. To change it, add the following to your theme’s functions.php or a custom plugin:
add_filter( 'comment_filter_banned_words', function() { return 'word1|word2|word3'; } );
Separate words with the pipe character (|). To disable filtering, return an empty string.
Written by Joobi from the project's own listing. See the source page
26 Nov 2026
Version 1.1.0 released. Not scanned yet.
1.1.0
- Replaced the old loop with a single case-insensitive replacement for better performance.
- Added the
comment_filter_banned_wordsfilter for custom word lists. - Added compatibility with current WordPress and PHP versions.
- Fixed potential issues with long comments.
1.0
- First stable version.
7 Mar 2012Listed on Joobi from WordPress.org.
Follow this listing's changes (Atom feed)