function contentReplace()
Register a method for a content replacement chain
Registered method will receive one string argument and should return a string.
For the 'inner_html' chain, the input and output should be HTML
Common chains:
inner_html The "inside" HTML of widgets (richtext, blog content, etc)
main_content The main content of inner and wide templatesUsagevoid Register::contentReplace ( string $chain , string $func ); Example// register method
Register::contentReplace('inner_html', ['Sprout\\Helpers\\ContentReplace', 'intlinks']);
// execute chain
$new_html = ContentReplace::executeChain('inner_html', $old_html);Arguments- string $chain
The chain to register the method for, e.g. 'inner_html' - string $func
callable $func The method to register
Return value
|