Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Execute a delegate only once
if($Context->SelfUrl == 'comments.php'){
function Render_CommentImage (&$CommentGrid) {
$Comment = &$CommentGrid->DelegateParameters['Comment'];
$Comment->Body = '<div>IMAGE</div>' . $Comment->Body;
}
$Context->AddToDelegate('CommentGrid', 'PostCommentOptionsRender', 'Render_CommentImage');
}
I want this delegate to run just once for the very first comment, and never run again
0
This discussion has been closed.
Comments