Function __global->check_wordfilter
Definitions
sources/wordfilter.php
- Check the specified text for banned words.If any are found, and the member cannot bypass the word filter, an error message is displayed.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $input | string | No | No | required parameter | N/A | N/A | The sentence to check |
| $name | ?ID_TEXT | No | No | Null | N/A | N/A | The name of the parameter this is coming from. Certain parameters are not checked, for reasons of efficiency (avoiding loading whole word check list if not needed) (null: don't know param, do not check to avoid) |
| $exit | boolean | No | No | True | N/A | N/A | Whether to die on fully blocked words (useful if importing, for instance) |
| $try_patterns | boolean | No | No | False | N/A | N/A | Whether to try pattern matching (this takes more resources) |
| $perm_check | boolean | No | No | True | N/A | N/A | Whether to allow permission-based skipping, and length-based skipping |
Returns
- "Fixed" version
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Check the specified text for banned words.If any are found, and the member cannot bypass the word filter, an error message is displayed.
*
* @param string $input The sentence to check
* @param ?ID_TEXT $name The name of the parameter this is coming from. Certain parameters are not checked, for reasons of efficiency (avoiding loading whole word check list if not needed) (null: don't know param, do not check to avoid)
* @param boolean $exit Whether to die on fully blocked words (useful if importing, for instance)
* @param boolean $try_patterns Whether to try pattern matching (this takes more resources)
* @param boolean $perm_check Whether to allow permission-based skipping, and length-based skipping
* @return string "Fixed" version
*/
function check_wordfilter(string $input, ?string $name = null, bool $exit = true, bool $try_patterns = false, bool $perm_check = true) : string
* Check the specified text for banned words.If any are found, and the member cannot bypass the word filter, an error message is displayed.
*
* @param string $input The sentence to check
* @param ?ID_TEXT $name The name of the parameter this is coming from. Certain parameters are not checked, for reasons of efficiency (avoiding loading whole word check list if not needed) (null: don't know param, do not check to avoid)
* @param boolean $exit Whether to die on fully blocked words (useful if importing, for instance)
* @param boolean $try_patterns Whether to try pattern matching (this takes more resources)
* @param boolean $perm_check Whether to allow permission-based skipping, and length-based skipping
* @return string "Fixed" version
*/
function check_wordfilter(string $input, ?string $name = null, bool $exit = true, bool $try_patterns = false, bool $perm_check = true) : string

