Manage text processors (functions that transform text to HTML) and implement some default ones.
This file is part of Ratatöskr. Ratatöskr is licensed unter the MIT / X11 License. See “ratatoeskr/licenses/ratatoeskr” for more information.
ratatoeskr/ | Manage text processors (functions that transform text to HTML) and implement some default ones. |
Functions | |
textprocessor_register | Register a textprocessor. |
textprocessor_apply | Apply a textprocessor on a text. |
textprocessor_apply_translation | Applys a textprocessor automatically on a Translation object. |
function textprocessor_register( $name, $fx, $visible_in_backend = True )
Register a textprocessor.
$name | The name of the textprocessor |
$fx | The textprocessor function (function($input), returns HTML) |
$visible_in_backend | Should this textprocessor be visible in the backend? Defaults to True. |
function textprocessor_apply_translation( $translationobj )
Applys a textprocessor automatically on a Translation object. The used textprocessor is determined by the $texttype property.
$translationobj | The Translation object. |
HTML
Register a textprocessor.
function textprocessor_register( $name, $fx, $visible_in_backend = True )
Apply a textprocessor on a text.
function textprocessor_apply( $text, $textprocessor )
Applys a textprocessor automatically on a Translation object.
function textprocessor_apply_translation( $translationobj )