Replace offensive words with the defined replacement word. The list of offensive words and the replacement word are both defined in the Security Settings.
censorwords( string $text ) : bool
$text (string) (Required) Text that should be censored.
(bool) Censored text.
// In this example we have added words apple and orange as offensive words and set replacement as ****
$text = 'The apple, orange and banana are all fruits.';
echo censorwords($text);
// The ****, **** and banana are all fruits.