Configurable word censoring extension for Flarum with a per-user toggle. Censoring is on by default for all users, including guests.
- Admin-defined word list — Add words or phrases to censor, one per line
- Configurable replacement character — Choose what character replaces censored letters (default:
*) - Always on for guests — Unauthenticated visitors always see censored content
- Per-user toggle — Registered users can disable censoring from their account settings
- Display-time only — Original post content is preserved in the database; censoring is applied at render time
- HTML-safe — Only censors visible text, leaving HTML tags and attributes intact
When a post is serialized for the API response, the extension checks:
- Guest? → Always censor
- Registered user with censoring enabled (default)? → Censor
- Registered user who disabled censoring? → Show original content
Censored words are matched using word boundaries to avoid false positives (e.g., "ass" won't match "assistant"). Matching is case-insensitive.
Word list:
damn
crap
Original post: This is a damn good example
Censored view: This is a **** good example
composer require ralkage/flarum-ext-word-censor
php flarum cache:clearEnable the extension in the admin panel under Extensions > Word Censor.
Navigate to the Word Censor extension settings page:
| Setting | Description |
|---|---|
| Censored Words | One word or phrase per line. These will be replaced when displayed. |
| Replacement Character | Character used to replace each letter of a censored word. Default: * |
Registered users can toggle censoring on/off from Settings in their account page. The toggle is labeled "Enable Word Censoring".
- Flarum
^1.8 - PHP 8.0+
MIT License. See LICENSE for details.