[pmwiki-users] call a function after a markup executes
Patrick R. Michaud
pmichaud at pobox.com
Fri Feb 2 17:45:41 CST 2007
On Fri, Feb 02, 2007 at 05:20:56PM -0600, JB wrote:
> Is there a way to call a function after a markup executes?
> Markups are stored in variables and later executed in a loop.
> I think it is done in the MarkupToHTML function in pmwiki.php.
> I have one markup that might be called several times by one page
> but after it has completed I want to execute a function 1 time.
> I do not want to have to add any extra syntax to the page source.
> Would it be possible to insert a function call into the markup loop
> execution sequence?
Yes. One can put statements to be executed (including
function calls) into $MarkupFrame['posteval']:
$MarkupFrame['posteval']['mymarkup'] = '$out = MyCloseFunction($out);';
In this case, $out is the HTML conversion of the markup.
More information about the pmwiki-users