Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How to insert an code segment into a function in class.format.php
I need to edit something in class.format.php like function LinksCallBack()
But, it's not good to edit directly core. So, I want to config it by a custom plugin.
Anybody help me, thanks in advance!
But, it's not good to edit directly core. So, I want to config it by a custom plugin.
Anybody help me, thanks in advance!
0
Comments
If one doesn't exist, it could be added into core.
Or just let us know what you're trying to do and where you need the event
No.
LinksCallback is
1) static
2) protected
3) Gdn_Format is not pluggable
May add thus before $Result But I'm not sure that there is a good solution.
I bet it would override a static/protected method though. Vanilla looks for _Create methods before it looks for a "real" method afaik.
I've definitely thought about making Gdn_Format pluggable but didn't have a compelling enough argument to do it yet.
I was thinking about the more low-level API calls into the models, what with the OP question referring to the underlying supporting API of Vanilla - methods which never touch the dispatcher or are exposed directly to users. I should have been clearer.
static function can be overriden with magic method __callStatic but it is PHP 5.3