Function __global->reasonable_html_reduce
Definitions
sources/tempcode.php
- Reduce down a template parameter to a maximum reasonable length, to avoid too much data being stuck in Tempcode trees.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $text | Tempcode | No | No | required parameter | N/A | N/A | Text, provided in HTML format |
| $max_length | integer | No | No | 1000 | N/A | N/A | Maximum length |
Returns
- Reduced length version of $text if required
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Reduce down a template parameter to a maximum reasonable length, to avoid too much data being stuck in Tempcode trees.
*
* @param Tempcode $text Text, provided in HTML format
* @param integer $max_length Maximum length
* @return Tempcode Reduced length version of $text if required
*/
function reasonable_html_reduce(object $text, int $max_length = 1000) : object
* Reduce down a template parameter to a maximum reasonable length, to avoid too much data being stuck in Tempcode trees.
*
* @param Tempcode $text Text, provided in HTML format
* @param integer $max_length Maximum length
* @return Tempcode Reduced length version of $text if required
*/
function reasonable_html_reduce(object $text, int $max_length = 1000) : object

