SproutCMS

This is the code documentation for the SproutCMS project

function censor()

Replaces the given words with a string.

Usage

string Text::censor ( string $str , array $badwords [, string $replacement [, boolean $replace_partial_words ]] );

Arguments

  1. string $str
    Phrase to replace words in
  2. array $badwords
    Words to replace
  3. string $replacement = #
    Replacement string
  4. boolean $replace_partial_words = FALSE
    Replace words across word
           boundaries (space, period, etc). This probably doesn't do what
           you think it does; check the test suite.

Return value

  • string